2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-04-04 09:51:47 +01:00

Clean up indenting in models

add registration required modules
This commit is contained in:
Sam Wenham 2018-04-14 21:14:19 +01:00
parent e6b12e99e6
commit 1974d0758a
2 changed files with 26 additions and 23 deletions

View File

@ -268,7 +268,7 @@ class LogbookEntry(TroggleModel):
def __init__(self, *args, **kwargs):
if "cave" in kwargs.keys():
if kwargs["cave"] is not None:
kwargs["cave_slug"] = CaveSlug.objects.get(cave = kwargs["cave"], primary = True).slug
kwargs["cave_slug"] = CaveSlug.objects.get(cave=kwargs["cave"], primary=True).slug
kwargs.pop("cave")
return super(LogbookEntry, self).__init__(*args, **kwargs)

View File

@ -75,6 +75,8 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'troggle.middleware.SmartAppendSlashMiddleware'
)
@ -91,6 +93,7 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.redirects',
'django.contrib.messages',
#'troggle.photologue',
#'troggle.reversion',
#'django_evolution',