Ticket #9739: AdminDateTimePatch.diff

File AdminDateTimePatch.diff, 1.2 KB (added by gilhad, 16 years ago)
  • django/contrib/admin/options.py

     
    509509                    continue
    510510                if isinstance(f, models.ManyToManyField):
    511511                    initial[k] = initial[k].split(",")
     512                if isinstance(f, models.DateTimeField):
     513                    initial[k] = initial[k].split(",")
    512514            form = ModelForm(initial=initial)
    513515            for FormSet in self.get_formsets(request):
    514516                formset = FormSet(instance=self.model())
  • docs/ref/contrib/admin.txt

     
    10711071        ('^basic-admin/(.*)', basic_site.root),
    10721072        ('^advanced-admin/(.*)', advanced_site.root),
    10731073    )
     1074
     1075Prefilling variables in amin interface
     1076--------------------------------------
     1077
     1078It's easy to offer prefilled values of variables. When you direct user into
     1079it, 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
Back to Top