Ticket #9739: AdminDateTimePatch.diff
File AdminDateTimePatch.diff, 1.2 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/options.py
509 509 continue 510 510 if isinstance(f, models.ManyToManyField): 511 511 initial[k] = initial[k].split(",") 512 if isinstance(f, models.DateTimeField): 513 initial[k] = initial[k].split(",") 512 514 form = ModelForm(initial=initial) 513 515 for FormSet in self.get_formsets(request): 514 516 formset = FormSet(instance=self.model()) -
docs/ref/contrib/admin.txt
1071 1071 ('^basic-admin/(.*)', basic_site.root), 1072 1072 ('^advanced-admin/(.*)', advanced_site.root), 1073 1073 ) 1074 1075 Prefilling variables in amin interface 1076 -------------------------------------- 1077 1078 It's easy to offer prefilled values of variables. When you direct user into 1079 it, all you need it to add the values to the ULR:: 1080 1081 /admin/authors/add?name=John&surname=Smith&hired=2008-01-28,12:30:00