Fix some reviewing considerations.
- appropriate naming for migration - remove __future__ imports. - remove "CofProfile" left in kfet/models.py
This commit is contained in:
parent
25c3106168
commit
815a5f274c
3 changed files with 3 additions and 7 deletions
|
@ -5,16 +5,12 @@ when you run "manage.py test".
|
||||||
|
|
||||||
Replace this with more appropriate tests for your application.
|
Replace this with more appropriate tests for your application.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
from __future__ import print_function
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db.utils import IntegrityError
|
from django.db.utils import IntegrityError
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from gestion.models import Profile, User
|
from gestion.models import Profile, User
|
||||||
|
|
||||||
|
|
||||||
def create_profile(username):
|
def create_profile(username):
|
||||||
"""
|
"""
|
||||||
In order to create a profile, I need to create a User first.
|
In order to create a profile, I need to create a User first.
|
||||||
|
|
|
@ -152,9 +152,9 @@ class Account(models.Model):
|
||||||
|
|
||||||
# Surcharge Méthode save() avec gestions de User et Profile
|
# Surcharge Méthode save() avec gestions de User et Profile
|
||||||
# Args:
|
# Args:
|
||||||
# - data : datas pour User et CofProfile
|
# - data : datas pour User et Profile
|
||||||
# Action:
|
# Action:
|
||||||
# - Enregistre User, CofProfile à partir de "data"
|
# - Enregistre User, Profile à partir de "data"
|
||||||
# - Enregistre Account
|
# - Enregistre Account
|
||||||
def save(self, data = {}, *args, **kwargs):
|
def save(self, data = {}, *args, **kwargs):
|
||||||
if self.pk and data:
|
if self.pk and data:
|
||||||
|
|
Loading…
Reference in a new issue