Re: unique_together

2006-10-21 Thread seemant
Ramiro Morales wrote: > Well that´s, nothing more nothing less, the expected behaviour: > > http://www.djangoproject.com/documentation/model_api/#unique-together I guess I must have read the description wrong (I still don't see how the description implies that a NULL field gets ignored or

Re: list_display_links

2006-10-21 Thread freelance.telecom.googlepages.com
Get freelance or telecom-job here!! http://freelance.telecom.googlepages.com On Oct 20, 4:22 pm, patrickk <[EMAIL PROTECTED]> wrote: > while it´s fine to use __str__ within list_display, I get an error > when using __str__ in list_display_links. > > list_display = ('contenttype', '__str__',

Re: unique_together

2006-10-21 Thread Ramiro Morales
Seemant, On 10/21/06, seemant <[EMAIL PROTECTED]> wrote: > > OK, I've just made a discovery everyone. It works if you have a > to_verse. But if to_verse is "None" or NULL or whatever, then it just > adds it. So Genesis 1:1-2 will catch uniqueness but Genesis 1:1 will > not. Well that´s,

Using django.core.urlresolvers

2006-10-21 Thread Ed
The reverse(...) method seems to be what I'm looking for, as mentioned by Don in my previous post (http://groups.google.com/group/django-users/browse_thread/thread/dacbcbd7252564ab). However, it doesn't seem to work when I use generic views, since the reverse method lookups are based on the view.

Using django.core.urlresolvers

2006-10-21 Thread Ed
The reverse(...) method seems to be what I'm looking for, as mentioned by Don in my previous post (http://groups.google.com/group/django-users/browse_thread/thread/dacbcbd7252564ab). However, it doesn't seem to work when I use generic views, since the reverse method lookups are based on the view.

Re: unique_together

2006-10-21 Thread seemant
OK, I've just made a discovery everyone. It works if you have a to_verse. But if to_verse is "None" or NULL or whatever, then it just adds it. So Genesis 1:1-2 will catch uniqueness but Genesis 1:1 will not. Thanks! Seemant --~--~-~--~~~---~--~~ You received

Re: unique_together

2006-10-21 Thread seemant
Yeah, I'm not that bright :/ Thanks Ramiro. OK, so I do get the expected error: sqlite> delete from "sermons_scripture"; sqlite> insert into "sermons_scripture" (id, book, chapter, from_verse,to_verse, passage) values (1, "1", 1, 1, 2, "passage"); sqlite> insert into "sermons_scripture" (id,

Re: URL generation, symbolic referencing possible?

2006-10-21 Thread ed chan
Thanks Don, I looked at urlresolvers.py and it is exactly the type of thing i'm looking for.  This thread was posted, as you said, several months ago.  Are there any plans to standardize this feature / implementation? Ed.On 10/21/06, Don Arbow <[EMAIL PROTECTED]> wrote: On Oct 21, 2006, at 1:47

Re: URL generation, symbolic referencing possible?

2006-10-21 Thread Don Arbow
On Oct 21, 2006, at 1:47 PM, Ed wrote: > > Hello, currently url patterns are hard coded into urls.py, in the > templates, and in some cases the views which return redirects. This is > becoming a dangerous practice in our application development. If one > url needs to be changed due to an update

Re: URL generation, symbolic referencing possible?

2006-10-21 Thread James Bennett
On 10/21/06, Ed <[EMAIL PROTECTED]> wrote: > Is there a contrib module or do I need to roll my own URL helper class > that allows my developers to do something like the following in > urls.py: There's been some largely-unsung work toward cleaning up some of this with respect to models and

URL generation, symbolic referencing possible?

2006-10-21 Thread Ed
Hello, currently url patterns are hard coded into urls.py, in the templates, and in some cases the views which return redirects. This is becoming a dangerous practice in our application development. If one url needs to be changed due to an update in the application design, it would break many

Re: unique_together

2006-10-21 Thread Ramiro Morales
Seemant, On 10/21/06, seemant <[EMAIL PROTECTED]> wrote: > sqlite> insert into "sermons_scripture" (id, book, chapter, from_verse, > to_verse, passage) values (1, "1", 1, 1, 2, "passage"); > sqlite> insert into "sermons_scripture" (id, book, chapter, from_verse, > to_verse, passage) values (1,

Re: Syntax highlighter

2006-10-21 Thread Kjell Magne Fauske
A long time ago I implemented syntax highlighting for my web site using SilverCity. I also wrote about how I did it [1] . SilverCity is a nice library, but I would probably have chosen Pygments or a Javascript library today. - Kjell Magne [1] http://www.fauskes.net/nb/syntaxhighlighting/

Re: unique_together

2006-10-21 Thread seemant
Hi Rajesh, I rm'd the db entirely, and re-syncdb'd, and then I did as you suggested: sqlite> delete from "sermons_scripture"; sqlite> insert into "sermons_scripture" (id, book, chapter, from_verse, to_verse, passage) values (1, "1", 1, 1, 2, "passage"); sqlite> insert into "sermons_scripture"

Re: Exercise: How would you design these models

2006-10-21 Thread Josh
> So then I changed how I did it to this model, to try and enforce the > "a profile can have many images and a picture can only have 1 > UserProfile" restraint above: > > ---[ myproj.profile.models ]--- > from myproj.myapp.models import ImageObject > > class UserProfile(models.Model): >

Re: www.nearlyfreespeech.net / Anyone tried Django there yet?

2006-10-21 Thread Don Arbow
On Oct 21, 2006, at 2:39 AM, [EMAIL PROTECTED] wrote:Just a quick question: has anyone tried to start a Django-poweredwebsite at this hoster (www.nearlyfreespeech.net) yet? If so, anycomments?I doubt it:What are the most common things that do not work on your system?Here are the things we are most

Re: ForeignKey in other models.py

2006-10-21 Thread sandro.dentella
> I tried to insert, as you have said to me, but have received this error: > line 124, in get_all_related_objects > if f.rel and self == f.rel.to._meta: > AttributeError: 'str' object has no attribute '_meta' I guess you have quotes around the name of the class, so that the Referenced class

Re: Syntax highlighter

2006-10-21 Thread Dirk Eschler
Am Samstag, 21. Oktober 2006 16:31 schrieb James Bennett: > On 10/21/06, Dirk Eschler <[EMAIL PROTECTED]> wrote: > > does anyone use a generic syntax highlighter with Django? I want to > > integrate something like GeSHi [1] in a blog-like application and i try > > to find out where to start. > >

Re: Syntax highlighter

2006-10-21 Thread James Bennett
On 10/21/06, Dirk Eschler <[EMAIL PROTECTED]> wrote: > does anyone use a generic syntax highlighter with Django? I want to integrate > something like GeSHi [1] in a blog-like application and i try to find out > where to start. I've been using dp.SyntaxHighlighter[1] (which is entirely

Re: unique_together

2006-10-21 Thread RajeshD
Hi Seemant, > I do indeed get an error: > > SQL error: PRIMARY KEY must be unique Unfortunately, that's not the error I was expecting :) This error indicates that a record with id=2 already exists perhaps from your original tests and development work. Assuming that this table only has test

Re: Syntax highlighter

2006-10-21 Thread Dirk Eschler
Am Samstag, 21. Oktober 2006 15:13 schrieb Antonio Cavedoni: > On 21 Oct 2006, at 12:04, Dirk Eschler wrote: > > Hello, does anyone use a generic syntax highlighter with Django? I > > want to integrate something like GeSHi [1] in a blog-like > > application and i try to find out where to start. >

Re: Syntax highlighter

2006-10-21 Thread Dirk Eschler
Am Samstag, 21. Oktober 2006 12:47 schrieb Malcolm Tredinnick: > On Sat, 2006-10-21 at 12:04 +0200, Dirk Eschler wrote: > > Hello, > > > > does anyone use a generic syntax highlighter with Django? I want to > > integrate something like GeSHi [1] in a blog-like application and i try > > to find

Re: Syntax highlighter

2006-10-21 Thread Antonio Cavedoni
On 21 Oct 2006, at 12:04, Dirk Eschler wrote: > Hello, does anyone use a generic syntax highlighter with Django? I > want to integrate something like GeSHi [1] in a blog-like > application and i try to find out where to start. Incidentally, today I found out this Pygments library, which is a

Re: unique_together

2006-10-21 Thread seemant
Hi RajeshD, I do indeed get an error: SQL error: PRIMARY KEY must be unique --~--~-~--~~~---~--~~ 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

Re: Syntax highlighter

2006-10-21 Thread Malcolm Tredinnick
On Sat, 2006-10-21 at 12:04 +0200, Dirk Eschler wrote: > Hello, > > does anyone use a generic syntax highlighter with Django? I want to integrate > something like GeSHi [1] in a blog-like application and i try to find out > where to start. > > 1. http://qbnz.com/highlighter/ Assuming you

Syntax highlighter

2006-10-21 Thread Dirk Eschler
Hello, does anyone use a generic syntax highlighter with Django? I want to integrate something like GeSHi [1] in a blog-like application and i try to find out where to start. 1. http://qbnz.com/highlighter/ -- Dirk Eschler http://www.krusader.org

www.nearlyfreespeech.net / Anyone tried Django there yet?

2006-10-21 Thread Laundro
Hi, Just a quick question: has anyone tried to start a Django-powered website at this hoster (www.nearlyfreespeech.net) yet? If so, any comments? Thanks in advance, Mathieu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: ANN: Chesspark - A django based online chess community.

2006-10-21 Thread orestis
Very nice indeed! Maybe you can make a write up describing some design/implementation issues? I'm particularly interested in the Jabber integration and the cool DHTML in the web client... --~--~-~--~~~---~--~~ You received this message because you are subscribed