Hello everyone, I am talking to a friend to find a good solution for
this question and finally write our own CMS. I am really thinking
about how to create a flexible CMS and don't break django or don't
rework a lot of stuff.
So, what I do believe is that we have to focus on a Management System
then Content, and a flexible system should be able to go as far as we
want.
So, I like the idea of a page, but I do believe that a "portlet" is
more useful then a page content. So, with this in mind, we have to
think about a subapplication to be shown on a page, and not a bit of a
rock to put on the screen. But, of course, the simplest portlet will
be just a "content-link", but if I want something more complex, I can
do it and without the necessity of to write a new template tag,
because, if I am not a programmer I will get stucked and Django
solution won't be my solution.

A CMS is to make my website easier to grow, and not to create
barriers.

And about managing multiple objects of a model, we MUST remember that
THERE IS Django's  Manager and that's what we have to work on. So, I
think that our answer for this question resides on there. Django is
flexible, powerful, but "young" and don't have "much" automated
because WE don't know the perfect solution yet. But I don't believe it
will be far from the actual implementation.

Not rework, but improve Django, that's the way for a Real django
powered CMS that I would like to see.





On 27 jun, 01:03, sime <[EMAIL PROTECTED]> wrote:
> Hi Kyle, I've run into the same problems before. I think you'll find
> Django admin is great for simple operations involving single records
> and the most basic relations. But for anything beyond that, you'll
> probably need to roll your own admin page.
>
> On Jun 25, 1:15 am, Kyle Fox <[EMAIL PROTECTED]> wrote:
>
> > I hope I can explain this well, because I've been wracking my poor
> > little brain trying to figure out how to do this :)
>
> > I'm trying to create a flexible CMS.  I want it to be easy for users
> > to create a Page, and attach all kinds of content ("components") to
> > that page.  These components would all be Model classes.  Here are two
> > simple examples of the components I had in mind:
>
> > class TextSnippet(models.Model):
> >     body = models.TextField()
>
> > class Photo(models.Model):
> >     image = models.ImageField(upload_to="photos")
>
> > The idea is that a user add an arbitrary number of these components to
> > a Page model.  A Page model is nothing more than a container to hold
> > components, and a URL associated with the Page, something like:
>
> > class Page(models.Model):
> >         url = models.CharField( maxlength=100, unique=True,
> > validator_list=[validators.isAlphaNumericURL])
>
> > The problem is that I can't figure out a good way to associate
> > instances of TextSnippet and Photo with a page.  It's obviously a many-
> > to-many between the components and pages (a component like a photo can
> > be on many pages, and a page can have many components), but I also
> > need to store more information about that particular page-component
> > relationship, for example a IntegerField that specifies the
> > component's position on that page.  Here's what I've come up with so
> > far:
>
> > class PageComponent(models.Model):
> >         page = models.ForeignKey(Page, related_name="components",
> > edit_inline=models.TABULAR)
> >         content_type = models.ForeignKey(ContentType)
> >         object_id = models.IntegerField(core=True)
> >         position = models.IntegerField(default=0, blank=True)
>
> > It "works" not too bad.  Conceptually (from the shell), I think it
> > does what I want.  However, I'm having a HECK of a time getting the
> > Page form in the admin to work in an intuitive way.  When adding
> > components to a page, the user sees a drop-down list of content_types,
> > and has to enter an object_id.  It works for me because I know what to
> > put for the object_id, but a regular user wouldn't....
>
> > I think this would require me to write a custom form class for adding
> > and editing a page, but with these relationships I really don't even
> > know where to begin :S
>
> > If anyone can provide advice (or just flat out tell me if I'm thinking
> > about this wrong), it would be much appreciated!
>
> > Thanks,
> > Kyle


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to