Hi André,

On 02/04/2016 02:05 PM, André Meyer-Vitali wrote:
> There's quite some confusion here about the best way to structure a
> Django project.
> 
> I'm developing a photography related web site with a news section (based
> on the poll tutorial) and a contest app (among others). The contest app
> should be reused every month for a new contest. How does this work? What
> need to change? The  templates, app, database? I hope that the app does
> not need to change, but how can the monthly instances be accessed
> separately? So far, I couldn't find information and examples for more
> complicated web sites. Where can I find this?

I recommend simply modifying your contest app so that it knows about
multiple contests, not just one. That would be the usual way to approach
this.

(Django does have the "url namespace" feature, which lets you mount
multiple "instances" of an app's urlconf at different URLs, but that
feature doesn't do anything for you at the model or database layer, so
all the "instances" of the app would still share the same data. So I
doubt that this feature actually helps with your problem. Personally,
I've never actually found a good use case for url namespaces, outside of
contrib.admin.)

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56B3C318.3060406%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to