et. I hope that makes
sense without giving examples of all the queries.
This is just one way to do what I think you're trying to do. It may
not be the best way. But hopefully it gives you some ideas about how
to use Django models.
Alan
On Jan 27, 4:03 pm, adj7388 wrote:
> Without knowing
Without knowing your problem domain, you might want to start off with:
class League(models.Model):
name = models.CharField(max_length=200)
class Team(models.Model):
name = models.CharField(max_length=200)
league = models.ForeignKey(League)
Generally you don't want a model with a plur
Here is an approach I have used. I can't tell from your question
whether this will help you or not.
class AccountEntryModelForm(ModelForm):
def __init__(self, organization=None, operation=None, *args,
**kwargs):
super(ModelForm, self).__init__(*args, **kwargs)
self.organizatio
> This particular object is used by the admin:
>
> http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contri...
>
> Read through that carefully and you'll see the 'boolean' option and a
> few other useful tricks.
Well, this is embarrassing. I had actually read (err, skimmed?) that
page
This question refers to line 205 here:
http://bitbucket.org/ubernostrum/django-registration/src/b6b213d84d32/registration/models.py
In a nutshell:
class RegistrationProfile(models.Model):
def activation_key_expired(self):
...
expiration_date =
datetime.timedelta(days=settings.ACC
Still learning. Always learning. I guess I learn best when I break
stuff and do dumb things.
Thanks to all who replied for the great advice and tips.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
Good grief. After spending hours trying to figure out what was wrong,
I immediately found the problem after making this post. Here's the
solution:
I had overridden UserProfile.__init__() like this:
class UserProfile(models.Model):
def __init__(self, website='http://www.default.com'):
while i
Django newbie issue. Just trying to understand. I'm setting up a
simple UserProfile class to link to User (as described in several
places in documentation). Here's what I have --- a simple example of
storing the user's website in a profile
#In myapp/models.py
class UserProfile(models.Model):
d
8 matches
Mail list logo