Re: Extending and Entity with the Django User model

2010-05-12 Thread x13
ence with the previous one): class MyUser(models.Model):     user = models.ForeignKey(User, unique=True)     entity = models.OneToOneField(Entity, primary_key=True)     cheers, x13 -- You received this message because you are subscribed to the Google Groups "Django users" group.

Extending and Entity with the Django User model

2010-05-12 Thread x13
maybe works: class MyUser(models.Model): user = models.ForeignKey(User, unique=True) entity = models.ForeignKey(Entity, unique=True) .... Any opinions? Thanks in advance. x13 -- You received this message because you are subscribed to the Google Groups "Django users" gro

Quotas for Django models

2010-05-08 Thread x13
create a new Photo, but I prefer to do it in the save() method (and avoid to check the condition in every view). Any ideas to resolve this please? Thanks, and sorry for my English mistakes. x13 -- You received this message because you are subscribed to the Google Groups "Django use

Re: Problems with first block

2010-04-27 Thread x13
Did you read the tutorial? http://docs.djangoproject.com/en/1.1/topics/templates/#topics-templates Seems to be a syntax problem It's not {{ block dtd }} ... {{ endblock dtd }} the properly syntax (for last Django version) would be: {% block dtd %} ... {% endblock %} Notice you shoul

Select previous and next from a table

2010-03-31 Thread x13
Hello, I'm trying to figure out a simple way to get a known record from a database but also get the "previous" and "next" records too. My model is a Photo table with user's votes : ID Votes 1 24 2 5 3 102 4 21 5 10 So, if I query for the photo with ID=4 (21 votes) I'd like

Re: Newbie Question - How to Get Javascript Loaded?

2010-02-03 Thread x13
Did you configure your Django webapp (settings.py) for serving static files? Take a look here: http://docs.djangoproject.com/en/dev/howto/static-files/ May be this resolve your problem. x13 On Feb 3, 8:02 pm, jpuopolo wrote: > Hi, All... > > Experienced engineer, new to Django.