Dynamic ModelForm fields

2011-01-30 Thread a.esmail
Hello, I tried my best with no luck. Here are the relevant code snippets: ## Item model: class Item(models.Model): category = models.ForeignKey(Category, related_name='items') activation_code = models.CharField(max_length=64) is_active =

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread a.esmail
On Feb 5, 3:21 am, Ken Chida wrote: > I tried my best to search for an answer but my efforts yielded nothing.   > Allow me to give you a simple example to illustrate my problem.  Let's > pretend that I want to have a login form on every single page on my > website.  Obviously, the login form will

What are the disadvantages of using a custom user model?

2015-08-30 Thread a.esmail
Hello, I am evaluating whether it is better to use a custom user model in django or just extend django.contrib.auth.models.User. The default User model offers a lot of the functionality that I don't need in my project and doesn't have a lot of fields that I will need. My question is, what should

Re: What are the disadvantages of using a custom user model?

2015-08-31 Thread a.esmail
Thank you James. That was an extremely helpful answer. Highly appreciated. On Monday, August 31, 2015 at 10:36:06 AM UTC+3, James Schneider wrote: > > > Hello, > > I am evaluating whether it is better to use a custom user model in > django or > > just extend django.contrib.auth.models.User. >

Re: What are the disadvantages of using a custom user model?

2015-08-31 Thread a.esmail
though be > warned that changing the user model while the project is live is a real > PITA. > > Best, > Gergely > On 31 Aug 2015 06:11, "a.esmail" > > wrote: > >> Hello, >> I am evaluating whether it is better to use a custom user model in d