I'm looking at using Django for a project at work, which is an e-
commerce storefront that *must* be able to support multiple
storefronts, each storefront filtering a subset of the master products
database.  For example, we might have a furniture store with the URL
furniture.mycompany.com or a recycled products store with the URL
green.mycompany.com.  There is also the requirement to allow different
full domain names that point to a certain storefront, e.g.
www.mycompanyfurniture.com should be the same as
furniture.mycompany.com

In addition, one site needs to have certain tables kept separate (it's
another company that we do the processing work for) than the rest, but
use the master products and categories table.  Orders, customers,
pricing, etc. need to be separate entities since they will be
different from the other tables.

Technically speaking, how would I best go about doing this?  The view
for each subsection would need to be different to filter specific
products, but the models are the same (e.g. products) and there is
only one database table.  Basically each storefront would have its own
base template that sets the look and feel, but all the other templates
(list, details, search, etc) would be the same as the "main"
storefront.

In Django, is the concept of an "app" analogous to the "module"
mindset I'm referring to here?  For example, would a directory
structure like this fulfil this requirement?:

myproject
 |- manage.py
 |- urls.py
 |- main_store
  |- models.py
  |- views.py
  |- templates
   |- base.html
   |- index.html
 |- furniture_store
  |- models.py (not used, uses main_store's)
  |- views.py
  |- templates
   |- base.html (?? use main_store's templates for everything except
base ??)
 |- green_store
  |- models.py (not used, uses main_store's)
  |- views.py
  |- templates
   |- base.html (?? use main_store's templates for everything except
base ??)
 |- companyb
  |- models.py (only what differs, since products et all are
identical)
  |- views.py
  |- templates
   |- base.html
   |- index.html

Running this over in my head is giving me a headache because it seems
very convoluted.  I'm not even sure if Django would be my best choice
in a situation like this because of the almost infinite flexibility
required and the fact that there needs to be separate pieces of the
same application (the main store) as well as a totally separate
application (the other company's store) but I don't want to duplicate
the entire thing; our current spaghetti-code system (VBScript) does
exactly this and it makes fixing anything insanely difficult.

Any suggestions to point me in the right direction would be
appreciated... like I said I'm not sure if Django fits my needs in
this case.
--~--~---------~--~----~------------~-------~--~----~
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