Django

Code

Changeset 415

Show
Ignore:
Timestamp:
08/05/05 17:43:35 (3 years ago)
Author:
adrian
Message:

Changed 'django-admin startapp' so that it doesn't create the 'urls' directory. People have said they're a bit overwhelmed by the multiple url directories, and this one isn't necessary for basic Django usage. You can always make it yourself if you know what you're doing and want to decouple/distribute your apps.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/tutorial01.txt

    r360 r415  
    121121        __init__.py 
    122122        models/ 
    123             __init__.py 
    124             polls.py 
    125         urls/ 
    126123            __init__.py 
    127124            polls.py 
  • django/trunk/docs/tutorial03.txt

    r366 r415  
    370370so let's move the URLs within the app directory. 
    371371 
    372 Just copy the file ``myproject/settings/urls/main.py`` to 
    373 ``myproject/apps/polls/urls/polls.py``, which had already been created, as a 
    374 stub, by ``django-admin.py startapp``. 
     372Create a directory ``myproject/apps/polls/urls/``, and put a blank file called 
     373``__init__.py`` into it. (The ``__init__.py`` file is necessary for Python to 
     374treat the directory as a package.) Then copy the file 
     375``myproject/settings/urls/main.py`` to ``myproject/apps/polls/urls/polls.py``. 
    375376 
    376377Then, change ``myproject/settings/urls/main.py`` to remove the poll-specific