- Django Overview
- Reference: http://blog.javachen.com/2014/01/11/how-to-create-a-django-site.html
http://djangobook.py3k.cn/2.0/chapter05/
- Django Design MVC Concept
- Web Work Flow
- Choose the Django Reason: MVC, admin management, Automation orm, everything is python.
- Django Project Development Approximate steps
- Usage overview
- Projects and apps, using the model feature must create an app
- You can use Pydev's own Django support for rapid development. Create new project, create new app, configure URLs, and achieve views. URL advanced usage, not generally used.
- Templates, static, and model are added incrementally. RESTful style web development. settings.py needs to be set correctly:
Views can be directly rendered back:
- Rendering can take parameters
- POST request
- Django log processing: Configuring log
Reference: http://davidbj.blog.51cto.com/4159484/1433741
- Horizon Custom Development
- Reference: Http://www.tuicool.com/articles/b2UVniF
http://www.chenshake.com/secondary-development-of-openstack-dashboard/
Http://www.open-open.com/lib/view/open1389792987430.html
- Brief introduction
http://www.metacloud.com/openstack-horizon-controlling-cloud-using-django/
- Horizon defines the public reusable components, openstack_dashboard specific components for OpenStack, dashboards the main parts of the front-end page, containing the front-and back-end code for each pannel. Such as:
- Admin inside, two x pannelgroup
And only admin is visible:
- Dashboard extension Pannel
Reference: http://docs.openstack.org/developer/horizon/topics/tutorial.html
- Create Pannel
Under the Cd/var/www/horizon directory:
mkdir Openstack_dashboard/dashboards/admin/mypanel
Register and automatically generate the relevant code structure:
./run_tests.sh-n-M StartPanel mypanel--dashboard=openstack_dashboard.dashboards.admin--target=openstack_ Dashboard/dashboards/admin/mypanel
- Register: Modify the openstack_dashboard/dashboards/admin/dashboard.py under Admin, add Mypannel:
- Restart httpd, refresh the page, Mypannel display in the page:
- horizon custom development can be consulted:
http://docs.openstack.org/developer/horizon/py-modindex.html
http://my.oschina.net/zhouxingxing/blog/90283
http://www.cloudcraft.cn/add-your-panel-ui-to-horizon/
modify index.html file:
 
- View can pass parameters to the front end through the context.
According to the other modules, according to gourd painting scoop, seven changes to eight changed to be done.
- DataView implementation in Pannel
Add tables--Modify views, reference tables--return tables data--front-Section rendering
Specific code can refer to:
https://github.com/yongluo2013/osf-openstack-training/blob/master/code/horizon/openstack_dashboard/dashboards/ Admin/documents/templates/documents/index.html
Appendix:
013.Dashboard Front-end page structure:
013. Standard Django Application Stack:
013. Enhanced Horizon Application Stack:
"OpenStack" OpenStack Series 14 Dashboard Custom development