This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
forked from buchanae/basket
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from pmclanahan/read-only-mode
Add a read-only-mode for use with replicant DB
- Loading branch information
Showing
3 changed files
with
27 additions
and
26 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
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
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 |
---|---|---|
@@ -1,21 +1,15 @@ | ||
from django.conf import settings | ||
from django.conf.urls import patterns, include | ||
from django.conf.urls import include, url | ||
from django.contrib import admin | ||
|
||
|
||
admin.autodiscover() | ||
|
||
|
||
urlpatterns = patterns('', | ||
(r'^admin/doc/', include('django.contrib.admindocs.urls')), | ||
(r'^admin/', include(admin.site.urls)), | ||
(r'^news/', include('news.urls')) | ||
urlpatterns = ( | ||
url(r'^news/', include('news.urls')), | ||
) | ||
|
||
if settings.DEBUG: | ||
# Remove leading and trailing slashes so the regex matches. | ||
media_url = settings.MEDIA_URL.lstrip('/').rstrip('/') | ||
urlpatterns += patterns('', | ||
(r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve', | ||
{'document_root': settings.MEDIA_ROOT}), | ||
if not settings.DISABLE_ADMIN: | ||
admin.autodiscover() | ||
urlpatterns += ( | ||
url(r'^admin/doc/', include('django.contrib.admindocs.urls')), | ||
url(r'^admin/', include(admin.site.urls)), | ||
) |