List Info

Thread: Does anyone know a good method for creating one time pages with Django?




Does anyone know a good method for creating one time pages with Django?
country flaguser name
United States
2007-11-07 08:47:50
Hi,

Could anyone recommed a good method for creating one time
pages with
Django. What I want to do is create something like a
homepage class
that would contain things like the message of the day.
However I only
want ever want one copy of the homepage - I don't want the
user to be
able to create additional ones.

At the moment I done this by creating a single instance of
the
homepage, removed the add more link from the index page and
linked
directly to the edit page for this instance. However this
seems messy
and I feel like I'm working against Django. Is there a
better way of
doing it?

Thanks,

Ben


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Does anyone know a good method for creating one time pages with Django?
country flaguser name
United States
2007-11-07 08:57:53
> However this seems messy
> and I feel like I'm working against Django. Is there a
better way of
> doing it?

Consider using "flatpages": http://www.djangoproject.com/documentation/flatpages/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Does anyone know a good method for creating one time pages with Django?
country flaguser name
United States
2007-11-07 09:11:42
Thanks, flat pages look really useful.

Unfortunately I don't think they solve my problem here - the
rest of
the page needs to be dynamic and driven by custom content;
it's only a
subset of the page elements that I want to be static in this
way. I
suppose what I'm looking for is a kind of properties section
for the
site. It might not exist in Django of course - typically I
would
imagine this kind of thing would exist in the template.
Unfortunately
the site needs to be managed by a non technical user so they
wont be
up to editing templates.

If nothing does exist I'm sure I can write something better
but
deadlines are pressing at the moment and it seemed like a
proplem
someone else was likely to have encountered before.

Ben

On Nov 7, 2:57 pm, RajeshD <rajesh.dha...gmail.com> wrote:
> > However this seems messy
> > and I feel like I'm working against Django. Is
there a better way of
> > doing it?
>
> Consider using "flatpages":http://www.djangoproject.com/documentation/flatpages/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Does anyone know a good method for creating one time pages with Django?
user name
2007-11-07 09:39:38
On 11/7/07, mrbengriffithsgooglemail.com
<mrbengriffithsgooglemail.com> wrote:
> Unfortunately I don't think they solve my problem here
- the rest of
> the page needs to be dynamic and driven by custom
content; it's only a
> subset of the page elements that I want to be static in
this way. I
> suppose what I'm looking for is a kind of properties
section for the
> site. It might not exist in Django of course -
typically I would
> imagine this kind of thing would exist in the template.
Unfortunately
> the site needs to be managed by a non technical user so
they wont be
> up to editing templates.

I'm working on an app[1] that might help you out. It's
basically a way
to easily create a site with modules, similar to how
Google's homepage
works, but your apps would provide the modules for the site.
You'd be
able to let users add/remove/customize some modules, while
others
would always be there, regardless of the current user's
preferences.
They'd even show up for users who aren't logged in.

I'm still doing a lot of work on it at the moment, though,
so I don't
expect it to do everything you're looking for until sometime
in the
next couple weeks. It currently works to an extent, but it's
fairly
primitive, doesn't have all the options it needs, and has
no
documentation. If it sounds like what you need, though, I'll
keep you
posted on my progress.

-Gul

[1] http://code.
google.com/p/django-modular/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )