Barry
unread,Dec 1, 2010, 2:03:29 PM12/1/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-lfc
Are new content types (subclasses of lfc.models.BaseContent) Django
models with all the CMS stuff mixed in? Can I do almost anything in
the definition of a BaseContent that I can do with a plain Django
model, but then I get permissions and workflow and all the other tabs
for free?
Specific things I'm worrying about are ForeignKey and ManyToManyField
items, linking to other possible BaseContent items and plain Django
models. For example, I want to implement a departmental directory with
Students having a ManyToManyField item to Staff members who are their
supervisors. Then my template for Students will list the supervisors,
and the supervisor's template will list the Students they supervise.
If I make Student and Staff as BaseContent items, can I do this with a
ManyToManyField? And can I customise the admin form to use the neato
'filter_horizontal' widget, or set the radio_fields item to get radio
buttons for choices?
Can BaseContent types inherit sensibly? My non-LFC app has a basic
'Person' class with name, email etc, then Staff and Student are
subclasses of that with extra fields (Staff have a job_title, Student
has year_start for example). Will that all work?
Setting this all up in a non-LFC context is pretty easy, I just wonder
if there may be trouble doing it in LFC. If there's an easier way of
integrating an existing app into LFC than creating all new content
types, then that would be interesting. Could I create one content
type, 'Directory', say, that handled all URLs below it? Then the
personnel data would be managed in the Django admin and just presented
by the Directory content object. Not sure if this is possible, or it
breaks LFCs idea of one URL->one content item...
Other suggestions welcome. I'd like to integrate it into the
templates so as to keep the sense of the navigation, breadcrumbs, and
portlets. I'd have to make a new search view though that did the LFC
search for content and a new Directory search for my other stuff...
Anyway, general ideas on integrating stuff that doesn't really map
neatly into the 'content' paradigm into LFC please!
Barry