Re: querying for an empty set in m-r?

2006-04-18 Thread akaihola
I vaguely remember an advice to use __isnull in a similar situation. Maybe one of these discussions turns up something useful: http://simon.bofh.ms/logger/django/search/?q=isnull --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: unexpected keyword argument with generic view

2006-04-18 Thread Luke Skibinski Holt
np: class Blog(meta.Model): user = meta.OneToOneField(User) ... blog_dict = { 'app_label': 'blogs', 'module_name': 'blogs', } urlpatterns = patterns('src.apps.blogs.views', (r'edit/blog/$', 'edit_blog', dict(blog_dict, post_save_redirect='/', template_name='blogs/edit_bl

Re: Problems creating model.

2006-04-18 Thread Russell Keith-Magee
On 4/19/06, njharman <[EMAIL PROTECTED]> wrote: Trying to make a "choose your own adventure" like application sochapters don't have an "order" but knowing the starting chapter isrequired.  I can't figure out how to define the model. class Story(meta.Model):start_chapter = meta.OneToOneField(Cha

Problems creating model.

2006-04-18 Thread njharman
Trying to make a "choose your own adventure" like application so chapters don't have an "order" but knowing the starting chapter is required. I can't figure out how to define the model. class Story(meta.Model): start_chapter = meta.OneToOneField(Chapter) #Chapter not defined yet class Chapt

Re: Google SOC: Call for Mentors

2006-04-18 Thread limodou
On 4/19/06, Istvan <[EMAIL PROTECTED]> wrote: > > Congrats! > > And while I'm at it I'll say this: Django is the real deal. > Great! I like django! -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/Ne

Re: UNICODE database API How to

2006-04-18 Thread [EMAIL PROTECTED]
An easier way would be to use the codecs module to open the file for reading or writing in a particular encoding (the system default encoding is assumed when using open() or file(), which is apparently different from iso-8859-1 in the case above). I have to deal with encoded files quite frequently

Re: Google SOC: Call for Mentors

2006-04-18 Thread Istvan
Congrats! And while I'm at it I'll say this: Django is the real deal. --~--~-~--~~~---~--~~ 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 unsu

Re: Vim users - syntax highlighting for Django templates

2006-04-18 Thread Rudolph
Also have a look at: http://code.djangoproject.com/wiki/UsingVimWithDjango Rudolph --~--~-~--~~~---~--~~ 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@googlegroup

Re: Ordering by a column in a foreign table and custom managers

2006-04-18 Thread Adam
I'm having a similar problem in 0.91. The documentation (http://www.djangoproject.com/documentation/db_api/#ordering) says you can do this in the order_by clause. Such as: choices.get_list(order_by=('polls.pub_date', 'choice')) But that doesn't actually work (OperationalError: (1054, "Unknown co

Google SOC: Call for Mentors

2006-04-18 Thread Jacob Kaplan-Moss
Howdy fellow Djangonauts -- Django has just been approved as a sponsoring org for the Google Summer of Code. I've put details on our wiki at http:// code.djangoproject.com/wiki/SummerOfCode2006. If you'd like to be a mentor, you can sign up at http:// code.google.com/soc/mentor_step1.html;

Re: Database selection

2006-04-18 Thread benchline
Thanks. I'll search the archive. Paul --~--~-~--~~~---~--~~ 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 e

Re: unexpected keyword argument with generic view

2006-04-18 Thread yml
Hi Luke, Could you please the url.py from were you are calling the generic view? That could help us to pin point the pb. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Database selection

2006-04-18 Thread Adrian Holovaty
On 4/18/06, benchline <[EMAIL PROTECTED]> wrote: > I noticed that chicagocrime.org runs on Postgres (correct me if I am > wrong), and I have heard that google use mysql a lot. What was the > decision to use Postgres based on for chicagocrime and other sites? > Any regrets? Postgres on chicagocri

Database selection

2006-04-18 Thread benchline
Hi All, I don't want to start a religious database preference war with this so please don't respond in haste. But, I have a real need to decide upon either MySQL 5 or Postgresql 8 for a new django website system I am building. I noticed that chicagocrime.org runs on Postgres (correct me if I am

unexpected keyword argument with generic view

2006-04-18 Thread Luke Skibinski Holt
Using .91 non-MR. I have a 'Blog' model with a 1:1 with User on the field 'user'. This exception is being thrown: TypeError at /blogs/edit/blog/ got unexpected keyword argument 'user__exact' Request Method: GET Request URL:http://localhost:8000/blogs/edit/blog/ Exception Type:

Re: Custom Manipulator

2006-04-18 Thread Ian Clelland
On 4/18/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Is there an example of a CHANGE Custom Manipulator? > At http://www.djangoproject.com/documentation/forms/ > I found only ADD Custom Manipulator. The example on this page, under the "Custom forms and manipulators" heading, isn't really an Add

Re: database tables creation error: [magic-removal]

2006-04-18 Thread Joseph Kocherhans
On 4/18/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > Thanks, Don't It need to be more verbose at docs? > > If i can help... The docs in the link I sent you are very explicit and they are the primary docs for Models and Fields. Are there other docs that you're talking about? Joseph --~--~--

Re: database tables creation error: [magic-removal]

2006-04-18 Thread Douglas Campos
Thanks, Don't It need to be more verbose at docs? If i can help... Thanx again --~--~-~--~~~---~--~~ 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.c

Re: database tables creation error: [magic-removal]

2006-04-18 Thread Joseph Kocherhans
On 4/18/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > even if I specify the blank=True flag on field creation, it insists on > creating the field on database with NOT NULL You must use null=True as well. See http://www.djangoproject.com/documentation/model_api/#general-field-options Joseph

database tables creation error: [magic-removal]

2006-04-18 Thread Douglas Campos
even if I specify the blank=True flag on field creation, it insists on creating the field on database with NOT NULL here is the model: http://pastebin.com/667514 and here is the sql generated for the model: http://pastebin.com/667518 Does anyone have ever seen this? Thanx in advance Douglas

Custom Manipulator

2006-04-18 Thread PythonistL
Is there an example of a CHANGE Custom Manipulator? At http://www.djangoproject.com/documentation/forms/ I found only ADD Custom Manipulator. Thank you. L. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: UNICODE database API How to

2006-04-18 Thread yml
Thank you Ivan, Happy to see that in any case my pb would have been solved today. ;-) --~--~-~--~~~---~--~~ 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@googlegro

Re: "fake"/custom Package/ContentType. is it dangerous?

2006-04-18 Thread gabor
Jacob Kaplan-Moss wrote: > > On Apr 18, 2006, at 8:10 AM, Gábor Farkas wrote: >> everything seems to work fine, but i'm a little afraid of touching >> those >> tables (content-type and package). >> >> can anything "bad" happen if i add custom entries to them? > > Nothing "bad" per-se will happ

Re: "fake"/custom Package/ContentType. is it dangerous?

2006-04-18 Thread Jacob Kaplan-Moss
On Apr 18, 2006, at 8:10 AM, Gábor Farkas wrote: > everything seems to work fine, but i'm a little afraid of touching > those > tables (content-type and package). > > can anything "bad" happen if i add custom entries to them? Nothing "bad" per-se will happen; there are no real assumptions made

"fake"/custom Package/ContentType. is it dangerous?

2006-04-18 Thread Gábor Farkas
hi, i'm working on a django project, where 99% of the functionality is provided by the admin module. but for that 1%, i have the following problem: i have some pages, that are purely views. they are not backed by any django models. but i'd like to reflect any change to them into the Recent_A

Re: UNICODE database API How to

2006-04-18 Thread Ivan Sagalaev
yml wrote: >f = open("departments.txt") >regexobj = re.compile("([0-9]+)\s+([\w\s?]+)",re.UNICODE) > > >for l in f.readlines(): >fileencoding = "iso-8859-1" > > Ah! I was just about to suggest this. Your file seems to be not in utf-8 actually. And since you were opening it with codecs.open

Re: TEMPLATE_DIRS relative to project?

2006-04-18 Thread Gábor Farkas
Nebojsa Djordjevic wrote: > jrs wrote: >> Then I just exclude settings_env.py from the rsync command that posts >> the site. I also have my database, base_url, cache and any other >> environment specific configuration there. Works like a charm. > > I would recommend using subversion or another

Re: TEMPLATE_DIRS relative to project?

2006-04-18 Thread Nebojsa Djordjevic
jrs wrote: > Then I just exclude settings_env.py from the rsync command that posts > the site. I also have my database, base_url, cache and any other > environment specific configuration there. Works like a charm. I would recommend using subversion or another version control system for this, i

Re: UNICODE database API How to

2006-04-18 Thread Gábor Farkas
> =Department(department=matches[1].encode('utf-8','replace') hi, you can remove that ['replace']. there shouldn't be any unicode character that cannot be represented in utf-8, so the error-condition for which you specify the behaviour is never going to happen. gabor --~--~-~--~~

Re: UNICODE database API How to

2006-04-18 Thread yml
Here it is the script that is working for me. This was done thanks to this great pages (http://effbot.org/zone/unicode-objects.htm) it took me 3 days to find it on internet. Thank you google and of course thank you to the author :-) # -*- coding: utf8 -*- import os,codecs from django.models.ann

Re: UNICODE database API How to

2006-04-18 Thread yml
Hello Thank you for your help but so far I do not have any success. I am reading form a the lines from a file. Here it is the kind of error I am getting : the current line is :07 ArdFche matches ('07', 'Ard\xe8che\r\n') Traceback (most recent call last): File "E:\instal\django\view_serviceala