Dougoc / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

UUIDField doesn't have self.auto #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. >>> x = UUIDField(); x.auto
2. crashes at fields/__init__.py line 188
3.

What is the expected output? What do you see instead?
AttributeError: 'UUIDField' object has no attribute 'auto'

What version of the product are you using? On what operating system?
(0, 4, 'pre')
Python 2.6
Mac OS 10.5.5

Please provide any additional information below.
I'm a Python/django noob, but it looks like you forgot to actually set the
self.auto in the __init__, so it fails in the pre_save.
Also, I wonder why you stuck these very useful classes in __init__.py
instead of a real fields.py file.
I worked around by deriving a new class from UUIDField that adds
self.auto = True

Original issue reported on code.google.com by BryanBin...@gmail.com on 17 Nov 2008 at 9:33

GoogleCodeExporter commented 9 years ago
fix is in svn, thanks for the report !!

on the __init__ note: because it follows the Django structure.

Original comment by v.oostv...@gmail.com on 18 Nov 2008 at 6:20