Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@415 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a537a4efa1de8333c07817189b6de2711da89ff0 1 parent 59c3ebc
Adrian Holovaty authored August 05, 2005
0  django/conf/app_template/urls/__init__.py
No changes.
5  django/conf/app_template/urls/app_name.py
... ...
@@ -1,5 +0,0 @@
1  
-from django.conf.urls.defaults import *
2  
-
3  
-urlpatterns = patterns('{{ project_name }}.apps.{{ app_name }}.views',
4  
-#    (r'', ''),
5  
-)
3  docs/tutorial01.txt
@@ -122,9 +122,6 @@ That'll create a directory structure like this::
122 122
         models/
123 123
             __init__.py
124 124
             polls.py
125  
-        urls/
126  
-            __init__.py
127  
-            polls.py
128 125
         views/
129 126
             __init__.py
130 127
 
7  docs/tutorial03.txt
@@ -369,9 +369,10 @@ We've been editing the URLs in ``myproject/settings/urls/main.py``, but the
369 369
 URL design of an app is specific to the app, not to the Django installation --
370 370
 so let's move the URLs within the app directory.
371 371
 
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``.
  372
+Create 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
  374
+treat the directory as a package.) Then copy the file
  375
+``myproject/settings/urls/main.py`` to ``myproject/apps/polls/urls/polls.py``.
375 376
 
376 377
 Then, change ``myproject/settings/urls/main.py`` to remove the poll-specific
377 378
 URLs and insert an ``include()``::

0 notes on commit a537a4e

Please sign in to comment.
Something went wrong with that request. Please try again.