Opened 9 years ago
Last modified 9 years ago
#26665 closed Bug
default callable called twice — at Initial Version
| Reported by: | Nitesh Lohchab | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | 1.9 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
callable assigned to default parameter of a field called twice when adding a model entry via admin.
behaviour to reproduce this:
def abc():
print "this is abc"
return "abc"
class testt(models.Model):
text = models.CharField(max_length=12, default=abc)
Now when you try to add this model via admin you will "this is abc" printed twice.
Note:
See TracTickets
for help on using tickets.