Re: post data always empty

2006-04-10 Thread Don Arbow
On Apr 10, 2006, at 10:53 PM, [EMAIL PROTECTED] wrote: > > I was wondering if somebody could help me out. i'm trying to write a > simple form to create users ... however the post data always seems to > be empty. > > And here's the view: > > from django.core.template import Context, loader > fro

Re: post data always empty

2006-04-10 Thread lawgon
> > I was wondering if somebody could help me out. i'm trying to write a > simple form to create users ... however the post data always seems to > be empty. this is not the django way of doing things. Use add/change manipulators to create your forms - you are doing it by hand kg --~--~---

Re: post data always empty

2006-04-10 Thread Max Battcher
[EMAIL PROTECTED] wrote: > I was wondering if somebody could help me out. i'm trying to write a > simple form to create users ... however the post data always seems to > be empty. > > Here's the template: > > http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata -- --Ma

Re: post data always empty

2006-04-10 Thread limodou
On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I was wondering if somebody could help me out. i'm trying to write a > simple form to create users ... however the post data always seems to > be empty. > [snip] Please check this document first: http://code.djangoproject.com/wiki/New

post data always empty

2006-04-10 Thread [EMAIL PROTECTED]
I was wondering if somebody could help me out. i'm trying to write a simple form to create users ... however the post data always seems to be empty. Here's the template: {% extends "base" %} {% block heading %} Welcome to Greek Life Management System, complete the information below to create a

Re: Column [Datefield] cannot be null

2006-04-10 Thread Max Battcher
dave.l wrote: > I have a model as follows: > > class Building(meta.Model): > survey_date = meta.DateField(null=True) > check_date = meta.DateField(null=True, blank=True) > researcher = meta.ForeignKey(Researcher) > > > I was hoping that this would l

Re: basic extension of users.User

2006-04-10 Thread Michael
On 4/11/06, Norbert <[EMAIL PROTECTED]> wrote: Hello,I'm just starting out in really trying to get a Django app on itsfeet, even though I've played with it on and off for a couple weeks.Here's where my first cryptic error begins.I tried extend users.User in the most basic fashion I could think of:

Re: basic extension of users.User

2006-04-10 Thread Kenneth Gonsalves
On Tuesday 11 Apr 2006 9:23 am, Norbert wrote: > TemplateSyntaxError: Caught an exception while rendering. indicates a borked __repr__. Is the record being added? I think you will find that the record is added and the error comes when it tries to display the success message and list -- regard

Re: Django svn over https?

2006-04-10 Thread Tom Tobin
On 4/10/06, Adam <[EMAIL PROTECTED]> wrote: > > Augh, ok, sort of nevermind. Right after I hit "post", the guy who told > me our firewall wouldn't support WebDAV over http told me we have an > http proxy outside the firewall that I could use. So problem solved for > me, but it still might be useful

Re: Memory leak (db connection related?) with apache/postgres and magic-removal

2006-04-10 Thread Adrian Holovaty
On 4/10/06, Alex Brown <[EMAIL PROTECTED]> wrote: > As a follow up to this report. I tested this program on a django > install running on Mac OSX with the same versions of everything. No > memory leaks visible. So it seems to be a Windows only issue. Although > I did notice that when I built apach

basic extension of users.User

2006-04-10 Thread Norbert
Hello, I'm just starting out in really trying to get a Django app on its feet, even though I've played with it on and off for a couple weeks. Here's where my first cryptic error begins. I tried extend users.User in the most basic fashion I could think of: class Stakeholder(meta.Model):

Re: Memory leak (db connection related?) with apache/postgres and magic-removal

2006-04-10 Thread Alex Brown
As a follow up to this report. I tested this program on a django install running on Mac OSX with the same versions of everything. No memory leaks visible. So it seems to be a Windows only issue. Although I did notice that when I built apache for OSX it uses a different threading configuration than

Re: Problem with threads accessing MySQL database

2006-04-10 Thread Andy Dustman
On 4/10/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > kopikopiko wrote: > > Hi, > > > > I have an application set up under: > > Django 0.91 > > Windows 2000 Server > > MySQL 5.0 > > which reads scheduled events from a table then spawns threads (using > > the Thread module) to p

Re: Database views

2006-04-10 Thread Andy Dustman
On 4/10/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 4/10/06, George Sakkis <[EMAIL PROTECTED]> wrote: > > I understand Django doesn't support database views > > (http://en.wikipedia.org/wiki/View_%28database%29) right out of the > > box, but I was wondering if there's a reasonably easy w

Re: Database views

2006-04-10 Thread Adrian Holovaty
On 4/10/06, George Sakkis <[EMAIL PROTECTED]> wrote: > I understand Django doesn't support database views > (http://en.wikipedia.org/wiki/View_%28database%29) right out of the > box, but I was wondering if there's a reasonably easy way to implement > (or at least emulate) them. Here's an illustrat

Django time-zone chaos

2006-04-10 Thread [EMAIL PROTECTED]
Hi, I am working with an app that has time issues (99% it is a Time Zone problem). I've seen some bizzar behaviour with Django that I need help with. With this model field: updated = meta.DateTimeField(auto_now=True) The time saved in my database through django running server is 4 hours ahead of

Re: Django svn over https?

2006-04-10 Thread Adam
Augh, ok, sort of nevermind. Right after I hit "post", the guy who told me our firewall wouldn't support WebDAV over http told me we have an http proxy outside the firewall that I could use. So problem solved for me, but it still might be useful for others with similarly draconian firewall issues.

Re: Problem with threads accessing MySQL database

2006-04-10 Thread Eugene Lazutkin
kopikopiko wrote: > Hi, > > I have an application set up under: > Django 0.91 > Windows 2000 Server > MySQL 5.0 > which reads scheduled events from a table then spawns threads (using > the Thread module) to process the events and update the table. As soon > as my threads started wr

Django svn over https?

2006-04-10 Thread Adam
Is there any chance of making the django subversion repository available over https? I'm stuck behind a firewall that will let me do svn checkouts over https, but not http. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Problem with threads accessing MySQL database

2006-04-10 Thread kopikopiko
Hi, I have an application set up under: Django 0.91 Windows 2000 Server MySQL 5.0 which reads scheduled events from a table then spawns threads (using the Thread module) to process the events and update the table. As soon as my threads started writing to the database I ran into MyS

will apps created with django run on a shared host that has mod_python loaded?

2006-04-10 Thread walterbyrd
Or is there anything else required to run django created apps on a shared host? --~--~-~--~~~---~--~~ 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.co

Re: Model module naming in m-r

2006-04-10 Thread Luke Plant
On Monday 10 April 2006 14:37, Fawad Halim wrote: > I was trying to port an existing (0.91) app to the m-r branch, and > found that apparently, the m-r branch requires the models to reside > in models.py directly under the app directory > (django.db.models.base.ModelBase explicitly checks for t

Re: advice location of site for production and devel

2006-04-10 Thread [EMAIL PROTECTED]
Neat, Jacob. thanks Derek --~--~-~--~~~---~--~~ 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 [EMAI

Re: Is select_related broken in magic removal?

2006-04-10 Thread Adrian Holovaty
On 4/10/06, Dave St.Germain <[EMAIL PROTECTED]> wrote: > ...Or am I doing something wrong? > In django-trunk, select_related seems to work, but in magic-removal, I get > an empty list. It looks like the QuerySet isn't generating the joins for > related objects correctly. I'm still digging into t

Re: advice location of site for production and devel

2006-04-10 Thread Jacob Kaplan-Moss
On Apr 10, 2006, at 2:43 PM, [EMAIL PROTECTED] wrote: >> 2- First thing I need to know is this: If it is a project with some >> applications, the project should have a home page. From this home >> page, >> the user can choose from running applications. In the tutorial I've >> read nothing abou

Column [Datefield] cannot be null

2006-04-10 Thread dave.l
I have a model as follows: class Building(meta.Model): survey_date = meta.DateField(null=True) check_date = meta.DateField(null=True, blank=True) researcher = meta.ForeignKey(Researcher) I was hoping that this would let me have a blank check_date (w

Re: advice location of site for production and devel

2006-04-10 Thread [EMAIL PROTECTED]
> 2- First thing I need to know is this: If it is a project with some > applications, the project should have a home page. From this home page, > the user can choose from running applications. In the tutorial I've > read nothing about that project home page. How can I do it? Create a > view und

Is select_related broken in magic removal?

2006-04-10 Thread Dave St.Germain
...Or am I doing something wrong?In django-trunk, select_related seems to work, but in magic-removal, I get an empty list.  It looks like the QuerySet isn't generating the joins for related objects correctly.  I'm still digging into this one, but is this a known issue? --~--~-~--~~---

Need to reload model object after saving?

2006-04-10 Thread DavidA
The DateTimeField of my object has 'auto_now_add' set to true on it. But I can't see the value of the field after saving, unless I reload it. Is this intended behavior? >>> from plainfield.tasks.models import Task, Run >>> t = Task.objects.get(name__exact='Test') >>> r = Run(task_id=t, command=''

Re: Multi level template inheritance

2006-04-10 Thread Adrian Holovaty
On 4/10/06, atlithorn <[EMAIL PROTECTED]> wrote: > But it doesn't, ie. you cannot overwrite block tags from you parent's > parent unless your parent specifies them too so you get this: > > > ho ho > > > > Just wondering whether there is a solution other than sticking {%block > ...%]{{block.sup

Re: Feed rss and xml

2006-04-10 Thread Amit Upadhyay
On 4/10/06, coulix <[EMAIL PROTECTED]> wrote: hi i amnage to make the feed working, but when a user clic on it iwould it to be an xml file with foo.xml formal, actually now its onlyfoo so rss agregators still works but when you clic on it, t ask how to open it ect.For debugging, I did this: Index:

Re: advice location of site for production and devel

2006-04-10 Thread Waylan Limberg
On 4/9/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote: > > I have the project in /home/luis/myproject. Is it for a security reason > that it should not be placed under htdocs? or other... Yes, that is certainly part of it. Consider your settings.py file. It has all your DB connection settings (use

Re: Modify pulldown contents in admin interface

2006-04-10 Thread Graham King
Russell, Michael, tonecmd, Thanks a lot for the replies. What I've ended up doing is adding a limit_choices_to like this: candidate = meta.ForeignKey(Candidate, limit_choices_to = {'id__in': ['1', '2']} ) Then I intercept the admin url, get the current user, and in a method on the cl

Re: Query for "missing" information

2006-04-10 Thread Russell Cloran
Hi Tone, Either I misunderstand the docs, or I misunderstand how this can be useful to me. Or this is not particularly useful to me. B.objects.extra(select={'foo': 'SELECT COUNT(*) FROM app_a WHERE b_id=app_b.id'}, where=['`foo` > 0']) generates a SQL query: SELECT `app_b`.`id`,(SELECT COUNT(*

Re: Model module naming in m-r

2006-04-10 Thread Waylan Limberg
On 4/10/06, Fawad Halim <[EMAIL PROTECTED]> wrote: > > In db/models/base.py, there is a check that goes like > > if re.sub('\.models$', '', mod) not in settings.INSTALLED_APPS: > > That kinda indicates that the models module name should end in .models. > > Regards > -fawad > Per python (oversimpli

Re: Feed rss and xml

2006-04-10 Thread tonemcd
Err, before running off into XSL land, you might want to try a few things beforehand. Why not add some CSS to your XML feed, many newer browsers will render the XML using the CSS to give a human-readable output. I'd definitely do that before getting involved with XSL transforms (you'll likely ha

Re: Query for "missing" information

2006-04-10 Thread tonemcd
Dunno about the ORM, but the DB API exposes raw 'selects' as well; http://www.djangoproject.com/documentation/db_api/ (under 'Other Lookup Options') Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Modify pulldown contents in admin interface

2006-04-10 Thread tonemcd
If you're using magic removal, this thread outlines a nice solution; http://groups.google.com/group/django-users/browse_frm/thread/f8dace4668c0c2b1/d9ad4190912c0bd1?q=limit_choices_to&rnum=3#d9ad4190912c0bd1 Cheers, Tone --~--~-~--~~~---~--~~ You received this m

Re: Feed rss and xml

2006-04-10 Thread coulix
nice ill do it in xsl then, I ll need to - change the feed template - change the extension from foo to foo.xml. how do i do the later ? thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Query for "missing" information

2006-04-10 Thread Russell Cloran
Hi all, I have a model (A) which has a foreign key to another (B). I wish to construct a query for all B which have an empty a_set. This is possible with SQL, using something like: SELECT b.id FROM b LEFT OUTER JOIN a ON b.id=a.b_id WHERE b.a_id IS NULL; How would I construct such a query usin

Re: Modify pulldown contents in admin interface

2006-04-10 Thread Russell Cloran
Hi, On Mon, 2006-04-10 at 15:36 +0100, Graham King wrote: > Is there a way to control the values that appear in a pulldown (a > ForeignKey field) on the admin interface ? > > I would like the ForeignKey to only be assignable to a subset of all > values. Is the limit_choices_to option suit

Re: Modify pulldown contents in admin interface

2006-04-10 Thread Michael Radziej
Graham King schrieb: > Dear django-users, > > Is there a way to control the values that appear in a pulldown (a > ForeignKey field) on the admin interface ? Yes, that's limit_choices_to. Search for this in the documentation to models. Michael --~--~-~--~~~

Modify pulldown contents in admin interface

2006-04-10 Thread Graham King
Dear django-users, Is there a way to control the values that appear in a pulldown (a ForeignKey field) on the admin interface ? I would like the ForeignKey to only be assignable to a subset of all values. Any help much appreciated. Graham. --~--~-~--~~---

Re: Model module naming in m-r

2006-04-10 Thread Fawad Halim
On Mon, April 10, 2006 09:01, James Bennett wrote: > > On 4/10/06, Fawad Halim <[EMAIL PROTECTED]> wrote: > >> I was trying to port an existing (0.91) app to the m-r branch, and >> found that apparently, the m-r branch requires the models to reside in >> models.py directly under the app directory

Re: Model module naming in m-r

2006-04-10 Thread James Bennett
On 4/10/06, Fawad Halim <[EMAIL PROTECTED]> wrote: > I was trying to port an existing (0.91) app to the m-r branch, and found > that apparently, the m-r branch requires the models to reside in > models.py directly under the app directory The only restriction I'm aware of is that there needs to b

Model module naming in m-r

2006-04-10 Thread Fawad Halim
Hi all, I was trying to port an existing (0.91) app to the m-r branch, and found that apparently, the m-r branch requires the models to reside in models.py directly under the app directory (django.db.models.base.ModelBase explicitly checks for the model module name ending in .models). Is this a

Re: extend User in m-r

2006-04-10 Thread olive
Bryan, this won't work either, because when you try to save the user using admin you will have this kind of error: Request Method: POST Request URL:http://localhost:8000/admin/auth/user/40/ Exception Type: TypeError Exception Value:Cannot resolve keyword 'name' into f

Multi level template inheritance

2006-04-10 Thread atlithorn
Template inheritance question: Let's say I have the following templates, #1.base.html {%block start%}{%endblock%} {%block stuff%}hey hey{%endblock%} {%block stop%}{%endblock%} #2. index.html {%extends "base"%} {%block stuff%}ho ho{%endblock%} #3. different.html {%extends "index"%} {%block st

Re: Feed rss and xml

2006-04-10 Thread Grimboy
As the other poster this is the typical behaviour. To minimise confusion on the users part you can take a approach similar to to bbc. If you look at the following rss feed it's been transformed with xslt: http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml here is the xsl http://new

Re: Feed rss and xml

2006-04-10 Thread James Bennett
On 4/10/06, coulix <[EMAIL PROTECTED]> wrote: > hi i amnage to make the feed working, but when a user clic on it i > would it to be an xml file with foo.xml formal, actually now its only > foo so rss agregators still works but when you clic on it, t ask how to > open it ect. This is the intended

Feed rss and xml

2006-04-10 Thread coulix
hi i amnage to make the feed working, but when a user clic on it i would it to be an xml file with foo.xml formal, actually now its only foo so rss agregators still works but when you clic on it, t ask how to open it ect. I know its not very important since anyway it is not mean to be read in the

Re: Django + fastCGI + bluehost

2006-04-10 Thread Carlos Yoder
James wrote: >> I have django running on my bluehost account with fcgi. The best notes on how to get >> things running I have found are here: >> >> http://wiki.dreamhost.com/index.php/Django >> >> Bluehost is setup pretty much the same as dreamhost. I recommend >> Bluehost for the price and sup

Re: Meet error in "Writing your first Django app, part 1"

2006-04-10 Thread Kenneth Gonsalves
On Sunday 09 Apr 2006 12:06 pm, Holio wrote: > `python manage.py init polls' python manage.py install polls -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! --~--~-~--~~~---~--~~ You received this message