Opened 10 years ago

Closed 10 years ago

#418 closed defect (invalid)

No interface to change default site in sites table generated by django-admin.py init

Reported by: jmadson@… Owned by: adrian
Component: contrib.admin Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There does not seem to be any interface to changing the "domain" and "name" fields on the sites table generated by

django-admin.py init

It's fairly disconcerting to see "mysite.com" on the flat pages create/edit form and not have any idea how to modify it, short of changing it by hand in the database.

Change History (1)

comment:1 Changed 10 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

There's a Python interface. Just do the following in a Python prompt:

from django.models.core import sites
s = sites.get_object()
s.domain = 'foo.com'
s.name = 'Foo'
s.save()
Note: See TracTickets for help on using tickets.
Back to Top