pip install numpy import numpy as np a = np.array([1, 2, 3]) a.ndim(Dimensitons) a.shape(Shape) a.dtype(Data type) a.reshape([2, 4]) row, column, depth a.astype('int32') np.zeros([2, 3]) np.ones([2, 3]) np.empty((2, 3)) np.random.random((2, 3)) np.linspace(2, 10, 5) np.arange(2, 10, 2) np.arange(16) a = np.array([1, 2, 3, 4, 5, 6, 7, 8]) a[2] a[3:5] a[:4:2] = 0 a[::-1] a = np.arange(16, dtype='i..
Install Node.js Install Angular cli(npm install -g @angular/cli) Create a new Angular project(ng new testapp) Test it using local server(ng serve) Build the project(ng build) Integrating with Django project Copy the js files to the static folder on your Django project (helloapp/static) Copy index.html generated by angular project to the templates folder – override the existing one (first/templat..
context를 수정하고 싶을 때 def get_context_data queryset를 수정하고 싶을 때 def get_context_object_name request에서 값을 찾을 때 self.request.GET.get('','') http://ccbv.co.uk/projects/Django/2.2/django.views.generic.list/ListView/ ListView -- Classy CBV def get_paginator(self, queryset, per_page, orphans=0, allow_empty_first_page=True, **kwargs): """Return an instance of the paginator for this view.""" return self.pag..