Your message dated Tue, 18 Dec 2012 16:37:09 -0500
with message-id <[email protected]>
and subject line Re: Bug#670442: python-django-south: Problems with default 
date, when USE_TZ=True
has caused the Debian Bug report #670442,
regarding python-django-south: Problems with default date, when USE_TZ=True
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
670442: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670442
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-django-south
Version: 0.7.3-1
Severity: normal

My model has:
from django.db import models
from django.utils import timezone
...
class Valve(m.Model):
    time = models.DateTimeField(default=timezone.now)

South doesn't understand this.

In fact, South should simply ignore computed defaults altogether.
They're not part of the database schema, after all.

$ ./manage.py migrate rainman
Running migrations for rainman:
 - Migrating forwards to 0003_auto__add_rainmeter.
 > rainman:0003_auto__add_rainmeter
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 443, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 
196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 
232, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/pymodules/python2.7/south/management/commands/migrate.py", 
line 105, in handle
    ignore_ghosts = ignore_ghosts,
  File "/usr/lib/pymodules/python2.7/south/migration/__init__.py", line 191, in 
migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 221, 
in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, 
database)
  File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 292, 
in migrate_many
    result = self.migrate(migration, database)
  File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 125, 
in migrate
    result = self.run(migration)
  File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 93, in 
run
    south.db.db.current_orm = self.orm(migration)
  File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 246, 
in orm
    return migration.orm()
  File "/usr/lib/pymodules/python2.7/south/utils.py", line 62, in method
    value = function(self)
  File "/usr/lib/pymodules/python2.7/south/migration/base.py", line 422, in orm
    return FakeORM(self.migration_class(), self.app_label())
  File "/usr/lib/pymodules/python2.7/south/orm.py", line 46, in FakeORM
    _orm_cache[args] = _FakeORM(*args)  
  File "/usr/lib/pymodules/python2.7/south/orm.py", line 125, in __init__
    self.models[name] = self.make_model(app_label, model_name, data)
  File "/usr/lib/pymodules/python2.7/south/orm.py", line 318, in make_model
    field = self.eval_in_context(code, app, extra_imports)
  File "/usr/lib/pymodules/python2.7/south/orm.py", line 236, in eval_in_context
    return eval(code, globals(), fake_locals)
  File "<string>", line 1
    SouthFieldClass(default=datetime.datetime(2012, 4, 25, 16, 32, 45, 683390, 
tzinfo=<UTC>))
                                                                                
      ^
SyntaxError: invalid syntax


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (650, 'unstable'), (600, 'stable'), (550, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-django-south depends on:
ii  python          2.7.2-10
ii  python-django   1.4-1
ii  python-support  1.0.14

python-django-south recommends no packages.

python-django-south suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 0.7.4-1

On Wed, Apr 25, 2012 at 06:44:44PM +0200, Matthias Urlichs wrote:
> My model has:
> from django.db import models
> from django.utils import timezone
> ...
> class Valve(m.Model):
>     time = models.DateTimeField(default=timezone.now)
> 
> South doesn't understand this.
> 
> In fact, South should simply ignore computed defaults altogether.
> They're not part of the database schema, after all


> Versions of packages python-django-south depends on:
> ii  python          2.7.2-10
> ii  python-django   1.4-1

python-django-south as included in stable does not support python-django
1.4, which is not in squeeze (but is in squeeze-backports).

This bug was reported upstream in <http://south.aeracode.org/ticket/1012>
and was fixed in 0.7.4, see:
    <http://south.readthedocs.org/en/0.7.6/releasenotes/0.7.4.html>


-- 
Luke Faraone;; Debian & Ubuntu Developer; Sugar Labs, Systems
lfaraone on irc.[freenode,oftc].net -- http://luke.faraone.cc
PGP fprint: 5189 2A7D 16D0 49BB 046B DC77 9732 5DD8 F9FD D506

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to