damned-lies r1366 - in trunk: . languages people
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1366 - in trunk: . languages people
- Date: Mon, 19 Jan 2009 20:54:48 +0000 (UTC)
Author: claudep
Date: Mon Jan 19 20:54:48 2009
New Revision: 1366
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1366&view=rev
Log:
2009-01-19 Claude Paroz <claude 2xlibre net>
* languages/models.py: Allow for empty team in Language class.
* people/models.py: Also exclude empty values while cleaning unactivated
accounts (forms like to enter empty values in models :-( ).
Modified:
trunk/ChangeLog
trunk/languages/models.py
trunk/people/models.py
Modified: trunk/languages/models.py
==============================================================================
--- trunk/languages/models.py (original)
+++ trunk/languages/models.py Mon Jan 19 20:54:48 2009
@@ -5,7 +5,7 @@
class Language(models.Model):
name = models.CharField(max_length=50, unique=True)
locale = models.CharField(max_length=15, unique=True)
- team = models.ForeignKey(Team, null=True, default=None)
+ team = models.ForeignKey(Team, null=True, blank=True, default=None)
class Meta:
db_table = 'language'
Modified: trunk/people/models.py
==============================================================================
--- trunk/people/models.py (original)
+++ trunk/people/models.py Mon Jan 19 20:54:48 2009
@@ -50,10 +50,10 @@
@classmethod
def clean_unactivated_accounts(cls):
- accounts = cls.objects.filter(activation_key__isnull=False)
+ accounts = cls.objects.filter(activation_key__isnull=False,
+ date_joined__lt=(datetime.datetime.now()-datetime.timedelta(days=10))).exclude(activation_key='')
for account in accounts:
- if account.date_joined + datetime.timedelta(days=5) <= datetime.datetime.now():
- account.delete()
+ account.delete()
def save(self):
if not self.password or self.password == "!":
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]