Vers Django 1.8
- https://docs.djangoproject.com/fr/1.9/releases/1.8/#assigning-unsaved-objects-to-relations-raises-an-error - https://docs.djangoproject.com/fr/1.9/releases/1.8/#s-template-related-settings
This commit is contained in:
parent
69b0b13ad3
commit
6e875e4cb8
2 changed files with 12 additions and 8 deletions
|
@ -28,8 +28,6 @@ SECRET_KEY = 'ax0|dG^AhtYfXPXgu3*e|k3l^yKpbK;$~(_%q/5C!H9yHA(Z(2'
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
TEMPLATE_DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
|
@ -74,6 +72,17 @@ DATABASES = {
|
|||
}
|
||||
}
|
||||
|
||||
# Templates
|
||||
|
||||
TEMPLATES = [{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
os.path.join(BASE_DIR, 'templates/gestion/'),
|
||||
os.path.join(BASE_DIR, 'templates/'),
|
||||
],
|
||||
}]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
||||
|
||||
|
@ -96,11 +105,6 @@ STATICFILES_DIRS = (
|
|||
os.path.join(BASE_DIR, 'media/partitions'),
|
||||
)
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, 'templates/gestion/'),
|
||||
os.path.join(BASE_DIR, 'templates/'),
|
||||
)
|
||||
|
||||
AUTH_PROFILE_MODEL = 'gestion.ErnestoUser'
|
||||
|
||||
LOGIN_URL = "/login"
|
||||
|
|
|
@ -69,8 +69,8 @@ class ChangeDoodleName(forms.ModelForm):
|
|||
def save(self, *args, **kwargs):
|
||||
super(ChangeDoodleName, self).save(*args, **kwargs)
|
||||
self.instance.profile.doodlename = self.cleaned_data['doodlename']
|
||||
self.instance.save()
|
||||
self.instance.profile.save()
|
||||
self.instance.save()
|
||||
|
||||
class Meta:
|
||||
model = ErnestoUser
|
||||
|
|
Loading…
Reference in a new issue