Don't come with MySQL by default

This commit is contained in:
Skia 2016-09-14 13:19:56 +02:00
parent 6cf253365b
commit 64761a83ed
2 changed files with 3 additions and 2 deletions

View File

@ -8,4 +8,4 @@ pytz
djangorestframework
django-phonenumber-field
django-ajax-selects
mysqlclient
# mysqlclient

View File

@ -9,7 +9,6 @@ from django.contrib.auth.forms import PasswordResetForm
from core.models import User
import MySQLdb
def validate_type(value):
@ -35,6 +34,7 @@ class Subscriber(User):
super(Subscriber, self).save()
if create and settings.IS_OLD_MYSQL_PRESENT:
try: # Create user on the old site: TODO remove me!
import MySQLdb
db = MySQLdb.connect(**settings.OLD_MYSQL_INFOS)
c = db.cursor()
c.execute("""INSERT INTO utilisateurs (id_utilisateur, nom_utl, prenom_utl, email_utl, hash_utl, ae_utl) VALUES
@ -83,6 +83,7 @@ class Subscription(models.Model):
subject_template_name='core/new_user_email_subject.jinja', from_email="ae@utbm.fr")
self.member.make_home()
if settings.IS_OLD_MYSQL_PRESENT:
import MySQLdb
try: # Create subscription on the old site: TODO remove me!
LOCATION = {
"SEVENANS": 5,