On 4 Feb., 11:48, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Feb 4, 6:23 am, äL <lamberto.gri...@gmail.com> wrote:
>
> > I have an SQL statement in views.py:
>
> > karatekas = Karateka.objects.extra(where = ["bsc = 1 OR skr =
> > 1"]).sel
I have an SQL statement in views.py:
karatekas = Karateka.objects.extra(where = ["bsc = 1 OR skr =
1"]).select_related()
This statement runs in a loop an no data will come back.
If I change the little word "OR" to "AND",
karatekas = Karateka.objects.extra(where = ["bsc = 1 AND skr =
I get all values?
From a table it's easy:
Just type "nations = Country.objects.all()"
With a choice-list "objects.all()" doesn't work.
äL
On 8 Nov., 13:42, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On 11/8/07, äL <[EMAIL PROTECTED]> wrote:
&
'
### END CODE ###
Do I have an error in the import syntax? How can I import ROLE?
Thanks for your help
regards,
äL
On 6 Nov., 21:27, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 11/6/07, äL <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello Karen
>
: roles,
'user' : request.user})
### END CODE ###
Do I need to import ROLE like Karateka or do I have an other error in
my code?
Regards,
äL
On 24 Okt., 00:06, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 10/23/07, Greg <[EMAIL PROTECT
I would like to do the same. But if I try
class Meta:
ordering = ['name']
the drop down menu is still ordered by ID and not by name.
Because name is in an other model (foreign key). This is my code:
### CODE ###
class Person(models.Model):
nameLast = models.CharField
Guettler <[EMAIL PROTECTED]> wrote:
> Am Freitag, 26. Oktober 2007 10:53 schrieb äL:
>
> > I use Django to manage addresses. To publish the data I have a list
> > and a detailed view. In the detail view I can change the name,
> > address, phone, etc. of the person. To do t
I use Django to manage addresses. To publish the data I have a list
and a detailed view. In the detail view I can change the name,
address, phone, etc. of the person. To do that I created an edit
form.
Now, everythin is fine. Only if I try to change and save the birthday
(witch is a datefield)
I would like to order a list in a view by foreign key. If I try
ordering how in the
code below my list is ordered by 'person'. And this means that the
list
ist ordered by the ID of the table Person. But I need a list ordered
by 'nameLast'.
Thus I changed ordering 'person' into 'person.nameLast'.
>
> http://www.djangosnippets.org/snippets/282/
>
> On Oct 9, 3:22 am, äL <[EMAIL PROTECTED]> wrote:
>
> > Inhttp://code.djangoproject.com/wiki/CookBookRequiredGroupLoginI
> > found how
> > to show a template only if the user is in a specific group (admin).
>
> > Now
In http://code.djangoproject.com/wiki/CookBookRequiredGroupLogin I
found how
to show a template only if the user is in a specific group (admin).
Now I would like to do the same in a template. How can I hide a link,
for example,
if the user is not in the admin group? I'm looking for something
11 matches
Mail list logo