From 3cb9075a4d850cb277da39c5d1304d6c7bd5aa4e Mon Sep 17 00:00:00 2001 From: Evarin Date: Tue, 25 Apr 2017 23:18:52 +0200 Subject: [PATCH] Debugs --- .gitignore | 5 +++-- avisstage/models.py | 2 +- experiENS/settings.py | 1 - requirements-prod.txt | 1 + requirements.txt | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) delete mode 120000 experiENS/settings.py create mode 100644 requirements-prod.txt diff --git a/.gitignore b/.gitignore index a2ad5af..f4a55e2 100644 --- a/.gitignore +++ b/.gitignore @@ -104,10 +104,11 @@ test.py # Migrations migrations/ -*.venv/ +*venv/ *~ \#* .#* *.sqlite3 .sass-cache -/static/ \ No newline at end of file +/static/ +settings.py \ No newline at end of file diff --git a/avisstage/models.py b/avisstage/models.py index b26a664..7f44d61 100644 --- a/avisstage/models.py +++ b/avisstage/models.py @@ -44,7 +44,7 @@ class Normalien(models.Model): # Hook à la création d'un nouvel utilisateur : récupération de ses infos par LDAP def create_user_profile(sender, instance, created, **kwargs): if created: - profil = Normalien.objects.get_or_create(user=instance) + profil, created = Normalien.objects.get_or_create(user=instance) try: ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) l = ldap.initialize("ldaps://ldap.spi.ens.fr:636") diff --git a/experiENS/settings.py b/experiENS/settings.py deleted file mode 120000 index f1c999f..0000000 --- a/experiENS/settings.py +++ /dev/null @@ -1 +0,0 @@ -settings_dev.py \ No newline at end of file diff --git a/requirements-prod.txt b/requirements-prod.txt new file mode 100644 index 0000000..658130b --- /dev/null +++ b/requirements-prod.txt @@ -0,0 +1 @@ +psycopg2 diff --git a/requirements.txt b/requirements.txt index 77b2457..97ef6e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,5 @@ python-ldap django-tinymce django-braces django-taggit-autosuggest +pytz +django-tastypie