django directory layout explanation -


So I have a project that has something like this that looks like something called 'project': < / P>

  * Media (DIR) * MATPLATES (DIR) * Admin * (DIR) * Cool projects (DIR) * Cool projects (DIR) * * Cool project (DIR) * * * __init__ Py * * * admin.py * * * Model_jew * * * check.py * * * urls.py * * * views.py * * __init__.py * * settings.py * * urls.py  

So I have some questions Yes

1) Is cool project project considered

2) Is cool project 'application' considered

3) Media 'CSS, javascript file etc. Is there a suitable place for them? Out of the project

4) There are specific files in 'summerplates' that contain the Django markup (eg {%%}) and are used because my urls.py indicates them. Is this file proper out of these files?

5) If I want to include some arbitrarily javascript file (say jquery), then I can only create a new entry in urls.py (if so, then it is cold project site or Should be in cool project) and then link to that URL?

  1. "Project" is not really a useful concept Django. The Django tutorial mentions this, but developers have often mentioned on the mailing lists that they do not want to present it to them. Actually, a project is just a container for your code - but in reality the code is anywhere on the Python Path Could stay.

  2. Yes, and you can have multiple applications until they are all added to INSTALLED_APPS in Settings.py.

  3. It does not matter where they live you will need something to serve them - in development, it can be done with built-in servers, but in production Tell Apache (or whatever) directly in the file.

  4. It does not matter. It's an idea that loads the template, and then it's OK to set up correctly in settings.py.

  5. No, not at all. As mentioned, static assets remain in your media folder, and are not served through Django.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -