Code

Opened 9 years ago

Closed 9 years ago

#181 closed defect (invalid)

Site and FlatFile don't appear in the Admin interface

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

Description

As alluded to in your Model documentation, there's a FlatFile model, and a Site model.

I was hoping to extend the Site model with a OneToOne relationship so that I could have multiple blogs in one admin interfacce, with its various options such as blog name and short name, and subtitle, and so on. For the moment I've created a separate blog object with this data, but I can only really create one, as I can't add or remove any sites.

I tried monkey patching the Site object, but that doesn't seem to have worked.

So please could you enable the Site object in the Admin interface, or document how to do so through some equivalent of monkey patching, or tell us why we shouldn't use the object ;)

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by adrian

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

Sites are such a core part of Django that we made the conscious decision not to have them editable in the admin. Generally you only add and change sites once, and you never have to worry about it again. Do so in the Python interactive prompt:

>>> from django.models.core import sites
>>> s = sites.Site('www.test.com', 'Test.com')
>>> s.save()

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.