Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
615986c3
Commit
615986c3
authored
Apr 19, 2013
by
Giorgos Korfiatis
Browse files
snf_django: Add missing import for IntDecimalField
Needed for formfield() method.
parent
b6552593
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-django-lib/snf_django/lib/db/fields.py
View file @
615986c3
...
...
@@ -33,6 +33,7 @@
from
django.core
import
exceptions
from
django.db.models
import
DecimalField
,
SubfieldBase
from
django
import
forms
from
django.utils.translation
import
ugettext_lazy
as
_
from
south.modelsinspector
import
add_introspection_rules
import
decimal
...
...
@@ -72,7 +73,7 @@ class IntDecimalField(DecimalField):
def
formfield
(
self
,
**
kwargs
):
defaults
=
{
'form_class'
:
forms
.
IntegerField
}
defaults
.
update
(
kwargs
)
return
super
(
Int
eger
Field
,
self
).
formfield
(
**
defaults
)
return
super
(
Int
Decimal
Field
,
self
).
formfield
(
**
defaults
)
add_introspection_rules
(
[],
[
"^snf_django\.lib\.db\.fields\.IntDecimalField"
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment