-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add very basic automatic url configuration. Fixes #2.
- Loading branch information
1 parent
48f14be
commit 177b242
Showing
6 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'''This module can be set as a ROOT_URLCONF (or included into one).''' | ||
|
||
from django.conf import settings | ||
from django.conf.urls import include, patterns, url | ||
|
||
urlpatterns = patterns('') | ||
|
||
for app_name in settings.INSTALLED_APPS: | ||
try: | ||
urlpatterns += patterns( | ||
'', | ||
url( | ||
r'^%s/' % app_name.replace("_","-"), | ||
include("%s.urls" % app_name), | ||
), | ||
) | ||
except ImportError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.conf.urls import patterns, url | ||
|
||
urlpatterns = patterns('', | ||
url(r'^index/$', 'django_autoconfig.tests.app_urls.views.index'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def index(_request): | ||
return |