Invalid page numbers now raise Http404, not found
This commit is contained in:
59
settings.py
59
settings.py
@@ -15,7 +15,7 @@ PROJECT_NAME = 'mayan'
|
||||
|
||||
DEBUG = False
|
||||
DEVELOPMENT = False
|
||||
TEMPLATE_DEBUG = True
|
||||
TEMPLATE_DEBUG = False
|
||||
|
||||
ADMINS = ()
|
||||
SENTRY_ADMINS = ('root@localhost',)
|
||||
@@ -149,31 +149,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
# 'django.contrib.messages.context_processors.messages',
|
||||
)
|
||||
|
||||
#===== Configuration options ===============
|
||||
#--------- Grappelli ----------------
|
||||
#GRAPPELLI_ADMIN_TITLE = PROJECT_TITLE
|
||||
#--------- Django -------------------
|
||||
LOGIN_URL = '/login/'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
#-------- LoginRequiredMiddleware ----------
|
||||
LOGIN_EXEMPT_URLS = (
|
||||
r'^favicon\.ico$',
|
||||
r'^about\.html$',
|
||||
r'^legal/', # allow the entire /legal/* subsection
|
||||
r'^%s-site_media/' % PROJECT_NAME,
|
||||
|
||||
r'^accounts/register/$',
|
||||
r'^accounts/register/complete/$',
|
||||
r'^accounts/register/closed/$',
|
||||
|
||||
r'^accounts/activate/complete/',
|
||||
r'^accounts/activate/(?P<activation_key>\w+)/$',
|
||||
|
||||
r'^password/reset/$',
|
||||
r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
r'^password/reset/complete/$',
|
||||
r'^password/reset/done/$',
|
||||
)
|
||||
#===== User configuration options ===============
|
||||
#--------- Pagination ------------------
|
||||
#PAGINATION_DEFAULT_PAGINATION = 10
|
||||
#--------- Web theme app ---------------
|
||||
@@ -254,7 +230,6 @@ LOGIN_EXEMPT_URLS = (
|
||||
#SEARCH_LIMIT = 100
|
||||
|
||||
# Override
|
||||
SEARCH_SHOW_OBJECT_TYPE = False
|
||||
#----------- django-celery --------------
|
||||
import djcelery
|
||||
djcelery.setup_loader()
|
||||
@@ -264,7 +239,35 @@ BROKER_USER = "guest"
|
||||
BROKER_PASSWORD = "guest"
|
||||
BROKER_VHOST = "/"
|
||||
CELERYBEAT_SCHEDULER='djcelery.schedulers.DatabaseScheduler'
|
||||
#======== End of configuration options =======
|
||||
#======== End of user configuration options =======
|
||||
#--------- Grappelli ----------------
|
||||
#GRAPPELLI_ADMIN_TITLE = PROJECT_TITLE
|
||||
#--------- Django -------------------
|
||||
LOGIN_URL = '/login/'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
#-------- LoginRequiredMiddleware ----------
|
||||
LOGIN_EXEMPT_URLS = (
|
||||
r'^favicon\.ico$',
|
||||
r'^about\.html$',
|
||||
r'^legal/', # allow the entire /legal/* subsection
|
||||
r'^%s-site_media/' % PROJECT_NAME,
|
||||
|
||||
r'^accounts/register/$',
|
||||
r'^accounts/register/complete/$',
|
||||
r'^accounts/register/closed/$',
|
||||
|
||||
r'^accounts/activate/complete/',
|
||||
r'^accounts/activate/(?P<activation_key>\w+)/$',
|
||||
|
||||
r'^password/reset/$',
|
||||
r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
r'^password/reset/complete/$',
|
||||
r'^password/reset/done/$',
|
||||
)
|
||||
#--------- Pagination ----------------
|
||||
PAGINATION_INVALID_PAGE_RAISES_404 = True
|
||||
#---------- Search ------------------
|
||||
SEARCH_SHOW_OBJECT_TYPE = False
|
||||
|
||||
try:
|
||||
from settings_local import *
|
||||
|
||||
Reference in New Issue
Block a user