Re: Escape percent sign in QuerySet.extra()

2012-12-02 Thread Joseph Mutumi
Sorry I hadn't seen your comment, have you tried %%% ? On Mon, Dec 3, 2012 at 7:28 AM, Joseph Mutumi wrote: > I think to escape a % use %% > > > On Sun, Dec 2, 2012 at 1:16 PM, Martin Svoboda > wrote: > >> Hi, >> I want use postgresql pg_trgm module in django. pg_trgm defines special >> operato

Re: Escape percent sign in QuerySet.extra()

2012-12-02 Thread Joseph Mutumi
I think to escape a % use %% On Sun, Dec 2, 2012 at 1:16 PM, Martin Svoboda wrote: > Hi, > I want use postgresql pg_trgm module in django. pg_trgm defines special > operator percent sign. How should I escape it in django query extra method? > > # Pure SQL > SELECT content, similarity(content, 'te

Re: Help with manage.py sql

2012-12-02 Thread Lachlan Musicman
On Mon, Dec 3, 2012 at 1:43 PM, David Brotman wrote: > Hi: > > I am really new to django and I am going thru the online tutorial (polls) > app and I got to the point in the tutorial where I enter the command: > > python manage.py sql polls > > Nothing happens. No error message or anything else dis

Re: Help with manage.py sql

2012-12-02 Thread Larry Martell
On Sunday, December 2, 2012, David Brotman wrote: > Hi: > > I am really new to django and I am going thru the online tutorial (polls) > app and I got to the point in the tutorial where I enter the command: > > python manage.py sql polls > > Nothing happens. No error message or anything else displa

Help with manage.py sql

2012-12-02 Thread David Brotman
Hi: I am really new to django and I am going thru the online tutorial (polls) app and I got to the point in the tutorial where I enter the command: python manage.py sql polls Nothing happens. No error message or anything else displayed. It just goes to a prompt. I included 'polls' in the insta

Re: Can't undestrand Url pagination and template

2012-12-02 Thread Lachlan Musicman
On Sun, Dec 2, 2012 at 11:46 PM, joy wrote: > Hello, i'm new to Django and i'm still learning how to use it. I got a book > but somethings doesn't work, i cannot work with templates, and every advice > given from the book look not precise and obsolete (the book speaks about a > previous version of

Re: Can't undestrand Url pagination and template

2012-12-02 Thread Satinderpal Singh
On Sun, Dec 2, 2012 at 5:16 PM, joy wrote: > Hello, i'm new to Django and i'm still learning how to use it. I got a book > but somethings doesn't work, i cannot work with templates, and every advice > given from the book look not precise and obsolete (the book speaks about a > previous version of

Re: Escape percent sign in QuerySet.extra() method

2012-12-02 Thread Chris Cogdon
On Sunday, December 2, 2012 1:55:05 AM UTC-8, Martin Svoboda wrote: > > Hello, > I'm want to use functionality of postgresql module > pg_trgmin django. > pg_trgm uses special operator % (percent sign). I don't know how > should I escape it

Re: Admin UI Improvements for Ordered List Using Through Inline?

2012-12-02 Thread smcoll
Take a look at https://github.com/tkaemming/django-orderable. i've used it several times. On Saturday, December 1, 2012 3:24:49 AM UTC-6, Andrew Brown wrote: > > Greetings, > > I'm hopeful someone can point me in the right direction to improve the > admin UI for my app. I need to allow for the

Re: datetime deosn't work, first part of the manual

2012-12-02 Thread joy
Sorry, i got it... Il giorno domenica 2 dicembre 2012 17:55:42 UTC+1, joy ha scritto: > > return self.pub_date >= timezone.now() - datetime.timedelta(days=1) > NameError: global name 'datetime' is not defined > > But the timezone module is imported in modules.py > > should i define it somewhere

datetime deosn't work, first part of the manual

2012-12-02 Thread joy
return self.pub_date >= timezone.now() - datetime.timedelta(days=1) NameError: global name 'datetime' is not defined But the timezone module is imported in modules.py should i define it somewhere else? Joy -- You received this message because you are subscribed to the Google Groups "Django u

Re: Admin UI Improvements for Ordered List Using Through Inline?

2012-12-02 Thread Joni Bekenstein
Check out grappelli: http://www.grappelliproject.com/ On Saturday, December 1, 2012 6:24:49 AM UTC-3, Andrew Brown wrote: > > Greetings, > > I'm hopeful someone can point me in the right direction to improve the > admin UI for my app. I need to allow for the creation and display of an > ordered

Escape percent sign in QuerySet.extra() method

2012-12-02 Thread Martin Svoboda
Hello, I'm want to use functionality of postgresql module pg_trgmin django. pg_trgm uses special operator % (percent sign). I don't know how should I escape it in query extra method. # pure SQL SELECT content, similarity(content, 'string')

Strange behaviour when adding negative timedelta to mysql backed DateTimeField

2012-12-02 Thread Oleksiy Pikalo
I got this weird behavior, specific to mysql backend, and specific to adding a negative timedelta to DateTimeField. Full stackoverflow question I currently have a workaround where I subtra

Escape percent sign in QuerySet.extra()

2012-12-02 Thread Martin Svoboda
Hi, I want use postgresql pg_trgm module in django. pg_trgm defines special operator percent sign. How should I escape it in django query extra method? # Pure SQL SELECT content, similarity(content, 'text') AS sml FROM table WHERE content % 'text' ORDER BY sml DESC, content; # Extra throws

Can't undestrand Url pagination and template

2012-12-02 Thread joy
Hello, i'm new to Django and i'm still learning how to use it. I got a book but somethings doesn't work, i cannot work with templates, and every advice given from the book look not precise and obsolete (the book speaks about a previous version of django. Anyone has a good tutorial on templates.