for example, i have this models:
(like here: http://www.djangoproject.com/documentation/models/many_to_one/)
from django.db import models
class Reporter(models.Model):
first_name = models.CharField(max_le
Ooops, mean "How", not "Who" ... srry...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send em
Mean, "two reporters", of course
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
Thanks, but i've already read that and there's no answer for my
question. In SQL this would be some query with nested joins.. but i
don't know how to make this query in django..
On 3 мар, 19:17, Alex Gaynor wrote:
> On Tue, Mar 3, 2009 at 11:13 AM, [CPR]-AL.exe wrote:
>
&g
So, it seems, that there is no way to do what i want?
On 3 мар, 19:17, Alex Gaynor wrote:
> On Tue, Mar 3, 2009 at 11:13 AM, [CPR]-AL.exe wrote:
>
> > for example, i have this models:
> > (like here:http://www.djangoproject.com/documentation/
/en/dev/topics/db/sql/
>
> > if needed.
>
> On Mar 5, 4:25 am, "[CPR]-AL.exe" wrote:
>
> > So, it seems, that there is no way to do what i want?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Oh, nevermind, i figured out how to make nested joins only with q
objects!
On 9 мар, 17:26, "[CPR]-AL.exe" wrote:
> Thanks, but i thought that there's some django-way to do such a
> thing... is there a way i can add raw SQL query to Q object? That will
> (perhaps) solv
Hello.
Is there any way to render a template, omitting the "extends" tag?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To un
Hello there.
I've created a field+widget set that i use to render a number of
checkboxes and a TextInput with comma-separated values.
The problem is, when i set required = True, I get a ValidationError if
only checkboxes are selected (but i don't get it if TextInput is
filled)
Here are the clas
class CheckboxSelectWithTextInputWidget(forms.MultiWidget):
def __init__(self,choices, attrs=None):
widgets = (
forms.CheckboxSelectMultiple(choices = choices),
forms.TextInput(),
)
super(CheckboxSelectWithTextInputWidget,self).__init__
(widget
de, TextInput is required:
>
> forms.TextInput(),
>
>
> On May 18, 1:15 pm, "[CPR]-AL.exe" wrote:
> > class CheckboxSelectWithTextInputWidget(forms.MultiWidget):
> >
> > def __init__(self,choices, attrs=None):
> >
> >
It is required
On 19 май, 08:05, Thierry wrote:
> Isn't required the default behaviour of Field:
>
> http://docs.djangoproject.com/en/dev/ref/forms/fields/
>
> From the above code, TextInput is required:
>
> forms.TextInput(),
>
> On May 18, 1:15 pm, &q
So, what is the best way to throw a ValidationError only if None of
values a entered in subclassed field?
On 19 май, 23:10, Sam Chuparkoff wrote:
> On Mon, 2009-05-18 at 10:13 -0700, [CPR]-AL.exe wrote:
> > I've created a field+widget set that i use to render a number of
> &
I understood that, i just thought there is some nicer way to do it :)
Thx.
On Wed, May 20, 2009 at 11:52 PM, Sam Chuparkoff wrote:
>
> On Wed, 2009-05-20 at 07:09 -0700, [CPR]-AL.exe wrote:
> > So, what is the best way to throw a ValidationError only if None of
> > v
Hello.
I have a simple form with only ImageField declared in it and I've got
the following problem: when I am trying to upload something that is
not am image, i get no errors at all.
Form.is_valid() returns True.
What should I do to validate the imagedata?
--~--~-~--~~
Hi there.
I'm trying to do something like this:
SELECT *
FROM table
WHERE tablefield IN (
SELECT tablefield
FROM table
GROUP BY tablefield
HAVING (COUNT(tablefield ) > 1)
)
Tried it in many ways, but didn't suceed. Is there a way to do it with
Django ORM without having to iterate over object
To make it more clear: I have something like a forum and want to find
duplicate messages (meaing the message field should be identical) to
create a report for the moderator.
On 19 янв, 14:02, "[CPR]-AL.exe" wrote:
> Hi there.
>
> I'm trying to do something like this:
&
> SELECT id from table GROUP BY tablefield HAVING (COUNT(tablefield) > 1)
>
> On Wed, Jan 19, 2011 at 11:02 AM, [CPR]-AL.exe wrote:
>
>> Hi there.
>>
>> I'm trying to do something like this:
>>
>> SELECT *
>> FROM table
>> WHERE tablefield
there are many cases where a developer will
> purposely bypass the ORM at bottlenecks and directly query SQL for
> optimization.
>
>
>
>
>
>
>
> On Wed, Jan 19, 2011 at 11:07 AM, [CPR]-AL.exe wrote:
> > Umm... Don't know, actually. That seems, that it would be okay, too
f you need to grab the ORM'd row, just do "row_orm =
> model.get(id=iterated_id_here)"
>
> This is what I tend to do for raw sql queries.
>
>
>
>
>
>
>
> On Wed, Jan 19, 2011 at 11:26 AM, [CPR]-AL.exe wrote:
> > Hmm, yeah, but that still iterate
Wait, wat... o.O I'l try that now, thx.
On Wed, Jan 19, 2011 at 2:50 PM, Tom Evans wrote:
> On Wed, Jan 19, 2011 at 11:26 AM, [CPR]-AL.exe
> wrote:
> > Hmm, yeah, but that still iterates over the objects and filters out
> > them by count on the application server,
Oh, no, that wouldn't work with CharField. Or, maybe I'm doing
something wrong.
About a queryset - I mistaken aggregate() for annotate().
On 19 янв, 14:52, "[CPR]-AL.exe" wrote:
> Wait, wat... o.O I'l try that now, thx.
>
>
>
>
>
>
>
>
&
ges=Count('message')).filter(num_messages__gt
= 1)
But results vary with the query in my first statement. Or, maybe i'm
not doing it right.
On 19 янв, 14:58, "[CPR]-AL.exe" wrote:
> Oh, no, that wouldn't work with CharField. Or, maybe I'm doing
> something wrong.
&g
23 matches
Mail list logo