Re: How to view/run first app?

2006-03-23 Thread lawgon
> > Russell Keith-Magee writes: > I will gladly try and give feedback about the docs.. just wanted to know > what is the best place to send the feedback to. This list or the > developers > list? there is a space for comments on the docs at the foot of each doc - that is the recommended place kg

Re: Strings and % sign fails - Help Please

2006-03-23 Thread limodou
On 3/24/06, Siah <[EMAIL PROTECTED]> wrote: > > heh.. It works except I am using psycopg.Binary(somebinarystructure), > and I am not really doing it by hand to just add the extra %, and > psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg > package. Any quick way to project a strin

Re: Strings and % sign fails - Help Please

2006-03-23 Thread Siah
heh.. It works except I am using psycopg.Binary(somebinarystructure), and I am not really doing it by hand to just add the extra %, and psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg package. Any quick way to project a string from freak '%' problems? Thanks, Sia --~--~--

Re: Strings and % sign fails - Help Please

2006-03-23 Thread limodou
On 3/24/06, Siah <[EMAIL PROTECTED]> wrote: > > It seems like a freak problem to me. I spent a long hour to track the > problem down and here it is: > > The following statement fails because it has the '%' sign in it. > cursor.execute("select '%'") > > The error is: IndexError: list index out of

Strings and % sign fails - Help Please

2006-03-23 Thread Siah
It seems like a freak problem to me. I spent a long hour to track the problem down and here it is: The following statement fails because it has the '%' sign in it. cursor.execute("select '%'") The error is: IndexError: list index out of range How do I address this problem? Please note that th

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread DavidA
My motivation for using the Django ORM layer was simply to reuse the logic that parses text values to native values (html2python) and any column name mapping that goes on, both of which are managed by the *Field members. I know that's not a huge win, but since I'm at an early point in the project

Re: Pagination - displaying page numbers

2006-03-23 Thread limodou
On 3/24/06, Stephen <[EMAIL PROTECTED]> wrote: > > Hello, > > I've just started looking at Django, it's certainly looking like a very > good choice for the sort of projects I'll be doing in the near future. > > > Just now I've been looking at pagination and have a question: > > I'm using the gener

Re: Django API doc

2006-03-23 Thread Daniel Poelzleithner
Adrian Holovaty wrote: > Nicely done! I think for the final product we'd want Wilson's loving > design touches. Also, this does a good job of pointing out the areas > in which we need to add docstrings. this will not be fun for wilson ;) the html code really sucks at some parts. i had some more

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-23 Thread Eugene Lazutkin
Alex Brown wrote: > > Let me know if there is anything I can do to help. In e-mail. Thanks, Eugene --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Django API doc

2006-03-23 Thread Eugene Lazutkin
Adrian Holovaty wrote: > > Nicely done! I think for the final product we'd want Wilson's loving > design touches. Also, this does a good job of pointing out the areas > in which we need to add docstrings. +1 on Wilson --- the man can make everything look better. +1 on adding it to main Django si

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread Adrian Holovaty
On 3/23/06, DavidA <[EMAIL PROTECTED]> wrote: > Occasionally I will modify my schema, drop the old tables and reload > all the data from the "cached" files. Over time that could easily be > millions of rows and some optimization of my technique will be in > order. But for now, the simple approach

Re: Django API doc

2006-03-23 Thread Adrian Holovaty
On 3/22/06, Daniel Poelzleithner <[EMAIL PROTECTED]> wrote: > i created a css to build a django styled API doc with epydoc. > > http://djangoapi.quamquam.org/ Beta Version :) > > I hope we can integrate it as http://api.djangoproject.com someday. Nicely done! I think for the final product we'd wa

Re: Django API doc

2006-03-23 Thread Cheng Zhang
Very useful. Thanks. On Mar 23, 2006, at 4:28 AM, Daniel Poelzleithner wrote: > > Hi, > > i created a css to build a django styled API doc with epydoc. > > http://djangoapi.quamquam.org/ Beta Version :) > > I hope we can integrate it as http://api.djangoproject.com someday. > > kindly regards >

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread DavidA
Eric, The typical mode of operation will be to incrementally load new data each night - about 10 files each containing dozens to hundreds of rows. Maybe only a couple will be in the thousands category. But I've also created my scripts to work in two steps: 1) download the data from various source

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-23 Thread Alex Brown
Eugene Lazutkin wrote: > Alex Brown wrote: > > Eugene Lazutkin wrote: > > > >> Alex Brown wrote: > >>> I am running django on a Windows server (apache 2.0.54/mod_python > >>> 3.1.3/postgres 8.0.3) > >>> > >>> Django would crash apache when running multiple automated scripts > >>> POSTing data at a

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread Kieran Holland
tonemcd wrote: > I don't want my .pyc files being put into the repository, and I thought > a recursive svn property ignore would do the trick. I used the info > from http://www.nedbatchelder.com/text/quicksvn.html, specifically; See http://code.djangoproject.com/ticket/1378 for one solution Kie

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-23 Thread Eugene Lazutkin
Alex Brown wrote: > Eugene Lazutkin wrote: > >> Alex Brown wrote: >>> I am running django on a Windows server (apache 2.0.54/mod_python >>> 3.1.3/postgres 8.0.3) >>> >>> Django would crash apache when running multiple automated scripts >>> POSTing data at a high rate through a generic create_obje

Re: SQL Debugging and limit_choices_to in MR Branch

2006-03-23 Thread tonemcd
Way-Hay!, this works pa = models.ForeignKey("self", blank=True, null=True, limit_choices_to = {'groups__groupName__exact' : 'Administration'}) # PA for this person Now the only people who are in the popup are those who are in the group 'Administration'. Very neat ;) Cheers, Tone --~--~--

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread tonemcd
I'm still finding my feet with svn Eric ;) I don't want my .pyc files being put into the repository, and I thought a recursive svn property ignore would do the trick. I used the info from http://www.nedbatchelder.com/text/quicksvn.html, specifically; $ svn propset -R svn:ignore . -F ignore.txt

Re: Django API doc

2006-03-23 Thread tonemcd
Daniel, this is terrific work!, I definitely agree with John that you should file this into trac. I can see it saving people a mountain of time! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread Eric Walstad
On Thursday 23 March 2006 09:23, tonemcd wrote: > Oooh, now that's neat. My own tinkering with svn to ignore .pyc files > hasn't worked out so well... > > % svn proplist > Properties on '.': > svn:ignore > % svn st > M magic/site1/modeltest/models.pyc > > hmmm... > I just make sure I don't

Re: SQL Debugging and limit_choices_to in MR Branch

2006-03-23 Thread tonemcd
Thanks for the patch ChaosKCW, I still can't get this to work though, pa = models.ForeignKey("self", blank=True, null=True, limit_choices_to = {'groups__exact' : 'Administration'}) # PA for this person I'm now getting mesages about an m2m table not existing. What I'd like to do is some

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread Eric Walstad
DavidA wrote: > I am prepopulating my database with data from a number of flat files. > I've written a small script to do this using my model class. While this > works, there are a couple of kludges I made to get it to work and I was > hoping someone could advise my on a better way to do this. H

Re: Help getting admin and non-admin app running in Apache

2006-03-23 Thread tonemcd
I've found that it's better to have __repr__ return a string whether our not the field is a string or not; def __repr__(self): return "%s" % self.modelField hth Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread tonemcd
Oooh, now that's neat. My own tinkering with svn to ignore .pyc files hasn't worked out so well... % svn proplist Properties on '.': svn:ignore % svn st M magic/site1/modeltest/models.pyc hmmm... --~--~-~--~~~---~--~~ You received this message because you

Re: Pagination - displaying page numbers

2006-03-23 Thread Stephen
The answer to the second part of my question *was* very obvious... I was editing the wrong copy of the source file. I needed to change the copy installed under my Python directory, not the one in the Django directory. --~--~-~--~~~---~--~~ You received this messa

off topic, web creator apps

2006-03-23 Thread Yong Lim
Okay, This might be pretty off topic and if you all think so just ignore this email. I was looking at RapidWeaver and iWeb and the development models on those applications use themes or templates for different web pages. I looked at the Django generated pages and Django do have a very nice

Pagination - displaying page numbers

2006-03-23 Thread Stephen
Hello, I've just started looking at Django, it's certainly looking like a very good choice for the sort of projects I'll be doing in the near future. Just now I've been looking at pagination and have a question: I'm using the generic view "list_detail" to view a list of results. I want to use

Re: Help getting admin and non-admin app running in Apache

2006-03-23 Thread Ivan Sagalaev
DavidA wrote: >TemplateSyntaxError: Caught an exception while rendering. > > Ah! Most of the time it means that it's an exception raised in some of your object's __repr__. Django fails here trying to reproduce error page which also uses __repr__ to print objects. --~--~-~--~~

Re: maxlength in the Admin site

2006-03-23 Thread ChaosKCW
Hi If the form element is set correctly I have to question why it saved more than 3 characters to the DB and then retrieved those same characters back again. I would have to dig deeper to see exactly what is going on which is why I posted the question first, under the idea that other people have

Re: OneToOneField

2006-03-23 Thread ChaosKCW
That is definatly not the problem. OneToOne just doesnt work with User. --~--~-~--~~~---~--~~ 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

Re: Djangoproject site and documentation

2006-03-23 Thread Gábor Farkas
[EMAIL PROTECTED] wrote: > Right now I cant get access to djangoproject.com. > > And, as I know, its global problem. > > Is there any other place, where i get django documentation right now? http://www.nekomancer.net/djangodoc/index.html they're the text-version docs, and it's only there for

Re: Help getting admin and non-admin app running in Apache

2006-03-23 Thread DavidA
That still leaves my Django apps running in the same space (PythonInterpreter) as the admin app which I think is the root of the problem. I've tried using a separate for "/" and "/admin/" but that didn't work. I don't see how its possible to separate my non-admin apps from the admin app since the

Re: Djangoproject site and documentation

2006-03-23 Thread Nebojša Đorđević
[EMAIL PROTECTED] wrote: > Right now I cant get access to djangoproject.com. > > And, as I know, its global problem. > > Is there any other place, where i get django documentation right now? > Basic docs are in /docs/ -- Nebojša Đorđević - nesh Studio Quattro - Niš - SCG http://studioquattro

Djangoproject site and documentation

2006-03-23 Thread [EMAIL PROTECTED]
Right now I cant get access to djangoproject.com. And, as I know, its global problem. Is there any other place, where i get django documentation right now? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: Django API doc

2006-03-23 Thread Jeremy Dunck
On 3/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > This is excellent. Concur; neat. --~--~-~--~~~---~--~~ 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@g

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread DavidA
> BTW, if you do this repeatedly and format of those flat files is not a > requirement it is possible to have all initial data in a form of SQL > script. If you place it in /sql/.sql then Django will > include it in 'sqlall' command right after DB creation. While I'm not in control of the file fo

Re: How to join two variables in a template

2006-03-23 Thread limodou
On 3/23/06, wuonm <[EMAIL PROTECTED]> wrote: > > I have a similar question. Suppose I receive a hash and a list in my > template. I want to iterate over the list accessing items in the hash. > Like that: > > {% for element in the_list %} > >{{ the_hash[element] }} > > {% endfor %} > >

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread DavidA
> You can set the environment variable at the top of your scripts by > importing the Python os module, just like you can import sys and set > sys.path. Thanks, I added this and it works fine: os.environ['DJANGO_SETTINGS_MODULE'] = 'data.settings' > The Python datetime and time modules are huge

Re: How to join two variables in a template

2006-03-23 Thread bruno desthuilliers
wuonm wrote: > I have a similar question. Suppose I receive a hash and a list in my > template. I want to iterate over the list accessing items in the hash. > Like that: > > {% for element in the_list %} > >{{ the_hash[element] }} > > {% endfor %} > > But obviously it doesn't work. H

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-23 Thread Alex Brown
Eugene Lazutkin wrote: > Alex Brown wrote: > > I am running django on a Windows server (apache 2.0.54/mod_python > > 3.1.3/postgres 8.0.3) > > > > Django would crash apache when running multiple automated scripts > > POSTing data at a high rate through a generic create_object view. > > > > After

Re: How to join two variables in a template

2006-03-23 Thread wuonm
I have a similar question. Suppose I receive a hash and a list in my template. I want to iterate over the list accessing items in the hash. Like that: {% for element in the_list %} {{ the_hash[element] }} {% endfor %} But obviously it doesn't work. How can I do it? --~--~-~-

Re: flatpages

2006-03-23 Thread Mary Adel
Thanks Adrain for your support i am wondering is that means that i have to create another folder for flatpages in /usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/contrib/ and call it in my application NB.all my change is just in this file /usr/lib/python2.4/site-packages/Django-0.

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-23 Thread Eugene Lazutkin
Alex Brown wrote: > I am running django on a Windows server (apache 2.0.54/mod_python > 3.1.3/postgres 8.0.3) > > Django would crash apache when running multiple automated scripts > POSTing data at a high rate through a generic create_object view. > > After scanning the net I found various threa