1. create create_method 2. create new forms.py file 3. import form into the views.py 4. register url for create view 5. create.htmlform.as_p (????) 6. post method 7. 8. better methodform.save(commit=False) 는 여기서 ModalForm을 사용하기 때문이다 . 9. insert into the db 10. directly go to the detail view when creating new item 11. message handling 12. detail_view.html 13. views.py 14. completed create_view.py..
1. create method about Detail View 2. mapping urls 3. add list 4. detail_view.html 5. how to handle errorsa. add the modules b. use reserved method c. using try catch d. condition clause 6. variable id mapping on url 7. id=None 8. html 9. flexible html
views we looked at the request see the user associated request1. display user and check authenticated on web page 'request.user' shows who the user is when logout, annoymousUser2. redirect to the different sites by authentication decorator : I can instead having a template that is been shown or raising something like 404 errorimport 3. how to specify logics by authenticationa. when you want to o..
Context is the variable or the dictionary that we have to update that allows template to work with any particular data. so when we did html response we can write string of our own data inside of itbut inside of template, it is little bit different how does template gets data to work with. how do I have actually list items over here 1. specify query set - key:value structure, into the context 2. ..
templates make html smarter 1. rendering through template 2. make new folder named with 'templates' inside of blog folder 3. make a file named 'list-view.html' inside of templates folder 4. actually, it would be better hierarchically to make subfolder into templates folder and put html into it
1. model 등록후, setting.py 에 추가된 앱(폴더)를 등록해준다. 2. 디비 및 변경된 데이타들이 있으니 migration 해 준다 3. blog/admin.py 어드민 사이트 생성해준다. 4. adimin 계정을 만들고, 어드민 사이트를 기동한다 5. 어드민 사이트 접속 6. blog/views.pyList method 를 구현해서 모델데이타를 얻는다 7. create urls.py in blog 8. urls.py 에 blog 앱에 등록된 url 을 추가해준다
1. function based view 1. setup the python project in the virtual environment. virtualenv is a tool to create isolated Python environments. 2. Django install 3. djviews project 생성 4. djviews 를 src 이름으로 변경 5. sublime editor 에서 djviews 프로젝트를 추가 6. save as with the name as adding prefix djviews 8. add file with the name, 'views.py' 9. using manage.py file, start pythonblog 라는 application 하나 생성 10. ..