User Tools

Site Tools


devel:django_introduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
devel:django_introduction [2008/08/29 09:10]
jodal Clearify a bit.
devel:django_introduction [2008/09/24 09:16]
jodal Document recommended file structure for static media specific to an app.
Line 85: Line 85:
  
 Further, the file ''​ipdevinfo.tool''​ defines the name, description,​ icon and URL of the IP Device Info tool in NAV's toolbox. The file ''​htaccess''​ is the only file which is installed into the ''​ipdevinfo/''​ folder in the web server'​s document root. It simply states that all URLs starting with ''​http://​nav.example.com/​ipdevinfo/''​ are to be handled by a Python program, namely Django'​s mod_python handler, using ''​nav.django.settings''​ as configuration. In other words, the htaccess file should be identical for all Django apps in NAV. Further, the file ''​ipdevinfo.tool''​ defines the name, description,​ icon and URL of the IP Device Info tool in NAV's toolbox. The file ''​htaccess''​ is the only file which is installed into the ''​ipdevinfo/''​ folder in the web server'​s document root. It simply states that all URLs starting with ''​http://​nav.example.com/​ipdevinfo/''​ are to be handled by a Python program, namely Django'​s mod_python handler, using ''​nav.django.settings''​ as configuration. In other words, the htaccess file should be identical for all Django apps in NAV.
 +
 +Finally, the folder ''​media/''​ contains all static media which is needed by the app. Typically, this should be ''​media/​style/''​ for CSS-files, ''​media/​js/''​ for JavaScript, and ''​media/​images/''​ for images. Files should typically be named after the app to avoid name collisions with other apps when installed, i.e. ''​media/​style/​ipdevinfo.css''​ and subfolders like ''​media/​images/​ipdevinfo/''​.
  
 How to install everything mentioned here is defined in ''​Makefile.in''​. How to install everything mentioned here is defined in ''​Makefile.in''​.
devel/django_introduction.txt ยท Last modified: 2010/01/13 11:30 by eide