I have two SQL functions that I'd like to use in Django. They both
work no problem if I paste them into psql (PostgreSQL's shell). As I
have the same problem with both, I'll just post and explain the
simpler one. It looks like this:
CREATE OR REPLACE FUNCTION skater_name_match(INTEGER,VARCHAR)
RET
Sorry for the double post *blush* Not sure how that happened...
The model looks something like this:
class Competition(MessageboardOwner):
name = models.CharField(max_length=256)
type = models.IntegerField(choices=COMPETITION_TYPE_CHOICES)
start = models.DateField()
end = models.D
As I haven't had any replies so far, I'll add some more information...
The empty label appears if I redefine the form like this:
class CompetitionSearchForm(forms.ModelForm):
class Meta:
model = Competition
fields = ('name','type')
It disappears again if I make the changes I
As I haven't had any replies so far, I'll add some more information...
The empty label appears if I redefine the form like this:
class CompetitionSearchForm(forms.ModelForm):
class Meta:
model = Competition
fields = ('name','type')
It disappears again if I make the changes I
When you execute manage.py sql wkw, the output is just how your
current models translate into SQL. To see what's actually in the
database you should do manage.py dbshell and then use whatever command
your database supports (\d wkw_lawyer in PostgreSQL and DESCRIBE
wkw_lawyer in MySQL).
Try doing
Hi,
I have the following problem... I've got a form, which looks like
this:
class CompetitionSearchForm(forms.Form):
name = forms.CharField(required=False)
type = forms.ChoiceField(choices=COMPETITION_TYPE_CHOICES,
required=False)
The tuple COMPETITION_TYPE_CHOICES is used in a model cl
Thanks :)
On Oct 22, 5:52 pm, Tom Evans wrote:
> On Thu, 2009-10-22 at 07:57 -0700, Monika Sulik wrote:
> > Hi,
>
> > I was wondering what exactly are the advantages of having code like
> > this:
>
> > class Foo (models.Model):
> > bar_m2m = mode
Hi,
I was wondering what exactly are the advantages of having code like
this:
>>
class Foo (models.Model):
bar_m2m = models.ManyToManyField(Bar,through='Foo_Bar')
class Bar (models.Model):
pass
class Foo_Bar (models.Model):
foo = models.ForeignKey(Foo)
8 matches
Mail list logo