QuerySet API - istartswith - use UPPER instead of ILIKE with PostgreSQL
backend
which conflict with Documentation
(https://docs.djangoproject.com/en/dev/ref/models/querysets/)
as documentation's example shows SQL equivalent as " ILIKE "
Is this due to my backend being PostgreSQL? or is there se
for your time in advance.
Naoko
--
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
django-users+unsubscr...@googlegroups.com
I was missing this from schema:
ALTER SEQUENCE tablename_colname_seq OWNED BY tablename.colname;
Now everything is happy. Thank you!
On 5/28/11 8:32 AM, "Naoko Reeves" wrote:
> Malcolm, Thank you for your advice!
> I changed my model as follows:
> poll_key = models.Au
; print p5.pk
None
On 5/28/11 12:23 AM, "Malcolm Box" wrote:
> You need to tell django what the db column name for your pollkey field is.
> Look at the dbname field option in the docs.
>
>
> Sent from my iPhone, please excuse any typos
>
> On 28 May 2011, at 05:13
te:
> Doesn't autofield with primary_key=True handle this for you (instead of
> making it an IntegerField):
>
> https://docs.djangoproject.com/en/1.3/ref/models/fields/#autofield
>
> Hope this helps!
> Casey
>
> On 05/27/2011 07:22 PM, Naoko Reeves wrote:
>> Hi, I h
erField):
>
> https://docs.djangoproject.com/en/1.3/ref/models/fields/#autofield
>
> Hope this helps!
> Casey
>
> On 05/27/2011 07:22 PM, Naoko Reeves wrote:
>> Hi, I have a Django newbie question.
>> My goal is to auto increment primary key with non Django standard
l(poll_question="P1")
p1.poll_key
# this will return let's say 37
p1.save()
# saves just fine.
# instantiating new object
p2 = Poll(poll_question="P2")
p2.poll_key
# this also return 37.
I know I must be doing something wrong... but could you pint me to right
direction? I
7 matches
Mail list logo