Grouped Select in admin django

2015-05-05 Thread Luis Salvay
I have a model "Company" having many to many relationships with Country and City while country and city have one to many relationship between them. The problem is that when loading an "enterprise" have to select the countries atienede the company and the cities they serve, but the list of

Re: design pattern to handle multiple groups from the same view

2015-05-05 Thread Filipe Ximenes
An alternative [but not a simple one] is to have this customisations as a generic configuration in a database table. If changes are "visual" only, you could have multiple templates and only change the one you are rendering for given client. Or have this handled by template tags. "Partial

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Bernardo Brik
Hi Ken, The problem with using Session is that the data will still be there when you finish your “wizard". You have to manually delete it. It is state, which is not good. Each request to your server should be an decoupled operation. It’s ok to store in Session global state, like the current

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Ken Nguyen
Hi Bernardo, I appreciate the feedback. I've heard of many ways to pass data between methods in views such as session, write to a file, or use formwizard. It is still a problem accessing the session from the "cleaned_data"? This is my first time hearing about query string, care to explain

design pattern to handle multiple groups from the same view

2015-05-05 Thread Abraham Varricatt
Hello everyone, I'm working on an e-commerce site. There is a generic version of the site available to the open internet and customized versions available to enterprise users. Now, when I say 'customized', I'm mostly talking about really minor customization's. If the current user belongs to

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Bernardo Brik
Hi Ken, This is a good solution. I like the part that you are redirecting instead of rendering directly form2 from form1 view, that was a code smell that I missed. I don’t like that you are using Session to save the data. You could run into problems of having to invalidate that, clean data, when

Re: Two projects fail to import the same main app when I turn on both in Apache

2015-05-05 Thread Tom Evans
On Tue, May 5, 2015 at 10:32 AM, Thomas Levine <_...@thomaslevine.com> wrote: > Hi, > > For like the first time ever I want to make complicated websites, > so using Django finally seems like a good idea. And it is! All the > small building blocks that I had never thought of are already here. >

Two projects fail to import the same main app when I turn on both in Apache

2015-05-05 Thread Thomas Levine
Hi, For like the first time ever I want to make complicated websites, so using Django finally seems like a good idea. And it is! All the small building blocks that I had never thought of are already here. Anyway, the part that's relevant to my present concern is that I haven't deployed Django

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Ken Nguyen
I've finally figured it out after weeks of troubleshooting and here's how I do it. In the original post, my views takes in the request from form1 and renders it to form2. I would get the dreadful "Management Form Data is Missing" error no matter what I did and it led to asking a bunch of

Re: django 1.8 customize site title

2015-05-05 Thread drakkan
the problem was caused by django-admin-bootstrapped Il giorno lunedì 4 maggio 2015 18:46:08 UTC+2, André Luiz ha scritto: > > You can do it in in urls.py for example[1] > > [1]: https://gist.github.com/dvl/0bed149bee4556b32d7a > > 2015-05-02 5:55 GMT-03:00 drakkan : > >> Hi,