From c486cc03f237f2067b8736f198a7e5efb1b451f9 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 3 Jul 2016 01:29:26 +0200 Subject: [PATCH] =?UTF-8?q?Le=20ban=20a=20comme=20date=20de=20d=C3=A9but?= =?UTF-8?q?=20sa=20cr=C3=A9ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cotisations/templates/cotisations/index.html | 2 ++ users/__pycache__/models.cpython-34.pyc | Bin 6709 -> 6724 bytes users/migrations/0007_auto_20160702_2322.py | 19 +++++++++++++++ users/migrations/0008_user_registered.py | 22 ++++++++++++++++++ .../0007_auto_20160702_2322.cpython-34.pyc | Bin 0 -> 642 bytes .../0008_user_registered.cpython-34.pyc | Bin 0 -> 878 bytes users/models.py | 4 ++-- users/templates/users/index.html | 2 ++ 8 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 users/migrations/0007_auto_20160702_2322.py create mode 100644 users/migrations/0008_user_registered.py create mode 100644 users/migrations/__pycache__/0007_auto_20160702_2322.cpython-34.pyc create mode 100644 users/migrations/__pycache__/0008_user_registered.cpython-34.pyc diff --git a/cotisations/templates/cotisations/index.html b/cotisations/templates/cotisations/index.html index ce326948..0248920c 100644 --- a/cotisations/templates/cotisations/index.html +++ b/cotisations/templates/cotisations/index.html @@ -13,6 +13,7 @@ Prix unitaire Moyen de paiement Date + {% for facture in facture_list %} @@ -23,6 +24,7 @@ {{ facture.prix }} {{ facture.paiement }} {{ facture.date }} + Editer {% endfor %} diff --git a/users/__pycache__/models.cpython-34.pyc b/users/__pycache__/models.cpython-34.pyc index 4d9f3b10b7c155696bc19173f9e2bb89f094f3a6..d62f0a8983eb44b668e68f32a0080328bb9e1498 100644 GIT binary patch delta 2297 zcmbtVO>9#~5Z?8_<7daQNJ;2Nw67Ziaa@bG1o}HO*X1_PS zpM9A1|D^@H=I5`SbNt}{ne%_)5g+1lc*1`i7GCygoSEIs>|$Rto=-3{%*-Bkld*h~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2PgDcTR_!%0EEl`4~FSeTad-G^! z!4cc=6ZFM4H&C%T$&K1R!9gHfy#yULM5bJEO*CUW#uG`ov^@lIq?=8 zc_m*tap?naV(e8_oOm>Up800(ilhAJ`!64VL;%0xzr#sCr)%GkK>8!l0DS~)1d+F6 z&@uE3S_VCbmP7Oo86b!66y%^7Y!cX0JONDLLz(`eLQqETcpkddh)U>gQbuZ9#xC!> zwUJXd4%VeT1+`uI^!t;Ma!%J?kWk+7yp!RPXEOWO-8`vvAPWd!l}MfF*lYPZ`}Mm1v<=BggnThWAP zA|N;Qv(x&lZbb9EX->9ZO+rOHw9QErEaO>}(ii+!W$O8F=V>-XY+_1r8E)jT9#8Nl cFbB?%{lIh3p7`wL%fs}q{9Eg1I*y;Rf5+yZ<^TWy literal 0 HcmV?d00001 diff --git a/users/migrations/__pycache__/0008_user_registered.cpython-34.pyc b/users/migrations/__pycache__/0008_user_registered.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d92dba68decc869680ab31636a648881eb00a7c1 GIT binary patch literal 878 zcmZ{iOK;Oa5Xb+1#IL##pbv3CaLuJjgVa(9p(3GjYA;km%4KCTo5+zLVQn{%Yxpwo zk@kedDHlEfCuZ$d<-*!Cnwj;?{$|#{+yLa_!@%G2AsAS? z-xTSzBq_4AmMY1rfvuxFovWly%c9a=&YK*ywA0kntEox5TYGGrvs4u;2?NTU6B~4Z zIdeOZE*6a8m_s`r@*zDed=Qg_pa?QBY_tQ4LA#&_pogG7=n?2KWQdJ#ZD7+A&>l8$ zP2~u*&s`kq@bV5-_nJzoN*|6!qf?PIbt%T9KqahqP0E0GXgYoFvSX|g)~=>uC9Z29uAJv8d6QTwb?=SKwX)$6pF zmAb!FlFzu2;x_r>YGAKB#`XUg2Rk|tEuj!P5`u}FOtKvd@wrJd!)rW}OIeUCrm3uy z!)NQ@EzyNxSFUk)-zBxYPIKADbU^IZ?5dvGjmjlob$h?xp`LT7Rew%~H;EdqR;!_s z<8s)}b9nzR40*Dzgo%p#ksU3+Dvv9KELF@Zc0xC_Jbuosc4rWpR%T7zD27*Nayq0% zQq0RE`qbig(EGQ+rcSf!$l$KaqC-~CIIFF8kK0)o$Kconef+Xq(Pik-ic Cs@@#{ literal 0 HcmV?d00001 diff --git a/users/models.py b/users/models.py index 86b3b7dd..aeea40c3 100644 --- a/users/models.py +++ b/users/models.py @@ -21,6 +21,7 @@ class User(models.Model): pwd_ssha = models.CharField(max_length=255) pwd_ntlm = models.CharField(max_length=255) state = models.IntegerField(choices=STATES, default=STATE_ACTIVE) + registered = models.DateTimeField(auto_now_add=True) def __str__(self): return self.pseudo @@ -50,7 +51,7 @@ class ListRight(models.Model): class Ban(models.Model): user = models.ForeignKey('User', on_delete=models.PROTECT) raison = models.CharField(max_length=255) - date_start = models.DateTimeField(help_text='%m/%d/%y %H:%M:%S') + date_start = models.DateTimeField(auto_now_add=True) date_end = models.DateTimeField(help_text='%m/%d/%y %H:%M:%S') def __str__(self): @@ -113,7 +114,6 @@ class DelRightForm(ModelForm): class BanForm(ModelForm): def __init__(self, *args, **kwargs): super(BanForm, self).__init__(*args, **kwargs) - self.fields['date_start'].label = 'Date de début' self.fields['date_end'].label = 'Date de fin' class Meta: diff --git a/users/templates/users/index.html b/users/templates/users/index.html index a2f9ce5d..651ca085 100644 --- a/users/templates/users/index.html +++ b/users/templates/users/index.html @@ -10,6 +10,7 @@ Prénom Nom Pseudo + Inscrit le Modifier @@ -18,6 +19,7 @@ {{ user.name }} {{ user.surname }} {{ user.pseudo }} + {{ user.registered }} Editer {% endfor %}