Re: Strange error saving in admin

2009-07-25 Thread jamiecURLe
Hello Julien, Without seeing the model and knowing who your hosting provider is and what web servers your using to serve up your django app it is difficult to say for sure but I have a hunch. It could be that the save action for that one organisation is creating form of memory intensive situatio

Re: Strange error saving in admin

2009-07-25 Thread Julien Phalip
Thanks a lot Jamie. Your stab in the dark is very useful indeed. The site is in fact hosted at Webfaction too, and it's only there that I get the error. The model is quite simple - it only has Charfields, URLFields and Emailfields. There is no inheritance, but there is a OneToOneField relationshi

Re: Middleware that injects data for template

2009-07-25 Thread Daniel Roseman
On Jul 24, 8:24 pm, Stodge wrote: > Say I want to inject a piece of data into every page view. For now, > let's just say I want to inject the current time into each page view. > I write a piece of middleware that will do it. But how? Do I modify > the request? Or the view (process_view)? The bes

Re: Admin Customisations

2009-07-25 Thread Hamza
That is the answer to my Question , Thank you both :) On Jul 24, 10:56 am, Daniel Roseman wrote: > On Jul 24, 8:27 am, StevenC wrote: > > > > > Hey, > > > Im new to Django and have create an online application system. > > > I need to know is it possible to customise the List Display and have

Re: Strange error saving in admin

2009-07-25 Thread jamiecURLe
I always try and go do the simple routes first before assuming that the problem is something complicated. Debugging this one might be tricky if you can't recreate the effect locally and I'm sure you don't want to be debugging on a live site! Do you have any signals connected to the models? If s

Re: How to create this filter

2009-07-25 Thread Eugene Mirotin
Have you tried making manual formatting, i.e. val1 = 'col1' val2 = 'col2' op = '>' # Python 2.6+ string formatting .extra(where=["{0} {1} {2}".format(val1, op, val2)]) On Jul 25, 2:28 am, David wrote: > anybody likes to give me help? thanks so much. > > On Jul 24, 4:23 pm, David wrote: > > >

Re: Model Formsets Have an Extra Blank Form?

2009-07-25 Thread Eugene Mirotin
set the extra parameter to 0 On Jul 24, 9:44 pm, derek wrote: > I'm following the instructions here: > > http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ > > But when I do this kind of thing: > > formset = AuthorFormSet(queryset=Author.objects.filter > (name__startswith='O')) > > I

Re: Strange error saving in admin

2009-07-25 Thread Julien Phalip
Thanks Jamie! Setting "verify_exists" to False did the trick. It's not the first time I get caught so that's a bit shameful... :/ Like you say, it's worth trying the simple routes before looking at complicated things ;) Cheers, Julien On Jul 25, 7:19 pm, jamiecURLe wrote: > I always try and g

Re: Strange error saving in admin

2009-07-25 Thread jamiecURLe
Happy to help. On Jul 25, 11:49 am, Julien Phalip wrote: > Thanks Jamie! Setting "verify_exists" to False did the trick. It's not > the first time I get caught so that's a bit shameful... :/ > > Like you say, it's worth trying the simple routes before looking at > complicated things ;) > > Che

does anyone have document for django-email-confirmation/

2009-07-25 Thread kk
Hi, Is there any tutorial document about how to use this module? --~--~-~--~~~---~--~~ 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

Re: problem with milliseconds and mysql database

2009-07-25 Thread Frédéric Hébert
Hi, could you be more explanatory in your question ? How do you set your field value ? via a models.DateTimeField ? About the example that you 've given : is it the solution or what's giving the error ? I've tried your example and it works fine. Try to look for answers in django.db.fields.__i

Re: How to create this filter

2009-07-25 Thread Necmettin
On 25 Temmuz, 02:23, David wrote: > I used this syntax > > .extra(where=['%s >= %s - %s'], params=['criteria1_metric1', > 'criteria1_metric2',  'criteria1_value']) > > however I got error. You seem to be using the variables' names as strings: >>> criteria1_metric1 = 'somevalue' >>> criteria1_met

Re: problem with milliseconds and mysql database

2009-07-25 Thread Asinox
Thanks for replay Fredecir. Im sorry i fixed, the problem is that im new with Django... and Django make some work for me ...and i was thinking wrong :) if i have a field DateTime defined in my model with auto_add=True, i dont need to render the field hidden or something, bcz Django will send th

tagging problems

2009-07-25 Thread todd
Hello all, I'm working through the Practical Django Projects 2nd edition, and I'm using Django 1.0.2. I installed the tagging application tarball in my site-packages and when I ran the syncdb command the tagging application referenced a deprecated django object parse_lookup: from django.db.mode

Invalid command 'WSGIDaemonProcess'

2009-07-25 Thread Jose Sibande
I just uploaded my application to my server and this is the error that I am getting when I try to restart apache: Restarting web server: apache2Syntax error on line 6 of /etc/apache2/ httpd.conf: Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the ser

Re: Invalid command 'WSGIDaemonProcess'

2009-07-25 Thread Daniel Roseman
On Jul 25, 2:11 pm, Jose Sibande wrote: > I just uploaded my application to my server and this is the error that > I am getting when I try to restart apache: > Restarting web server: apache2Syntax error on line 6 of /etc/apache2/ > httpd.conf: > Invalid command 'WSGIDaemonProcess', perhaps misspe

Re: Where are the admin app icons from?

2009-07-25 Thread Margie
Thanks Alex - I will check those out. But if anyone knows where the admin icons came from, I'd still love to know ... Margie On Jul 24, 4:01 pm, Alex Gaynor wrote: > On Fri, Jul 24, 2009 at 5:12 PM, Margie wrote: > > > Hi, > > > I'm wondering if the icons in the admin app (for example, the > >

Re: Where are the admin app icons from?

2009-07-25 Thread Daniel Roseman
On Jul 25, 6:46 pm, Margie wrote: > Thanks Alex - I will check those out.  But if anyone knows where the > admin icons came from, I'd still love to know ... > > Margie I suspect that they were designed for Django - probably by Wilson Miner, the guy who designed the look and feel of the admin int

Re: Database connection closed after each request?

2009-07-25 Thread Glenn Maynard
On Fri, Jul 24, 2009 at 9:20 PM, James Bennett wrote: > Suppose we start with a patch which does the sort of thing you > apparently want: hold on to the connection, and reset it after each > request/response cycle. That patch would never get committed, because > it would have even worse side effec

Getting data from Django ModelForm ?

2009-07-25 Thread Asinox
Hi guys, i have a problem with ModelForm, the problem is that in the user private area there is a Form (ModelForm), but in this Form i have a Select, this select show the parent articles , so the problem is that the Select show all parent articles, from all users How ill just show the parent

Re: "Lost" sessions

2009-07-25 Thread Tomasz Zieliński
I've just noticed that my fake URLs point to existing sites --~--~-~--~~~---~--~~ 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

"Lost" sessions

2009-07-25 Thread Tomasz Zieliński
Hello! I have a problem with sessions being lost under some conditions (not sure what these conditions are). Steps to reproduce this: http://info-site.com/, click link "Best holidays!" which redirects to: http://my-site.com/, session A is created by Django, then click internal link '/more-info/'

Re: Getting data from Django ModelForm ?

2009-07-25 Thread Dan Harris
Take a peek at the Django forms documentation, specifically the ModelChoiceField and ModelMultipleChoiceField, the docs are at: http://docs.djangoproject.com/en/dev/ref/forms/fields/ These fields allow you to specify a queryset to populate your form select fields, this queryset can be the list of

Re: Database connection closed after each request?

2009-07-25 Thread Glenn Maynard
On Fri, Jul 24, 2009 at 9:02 PM, Glenn Maynard wrote: > By the way, I switched my connections from TCP to a Unix socket with > local authentication and it dropped to 5-10ms.  (I suspect it was If you're using a connection pooler, you don't want to disconnect and reconnect from it all the time--yo

Re: "Lost" sessions

2009-07-25 Thread Tomasz Zieliński
One more thing - out of sudden it turns out that session can be "lost" even if no external redirect is involved. So basically first request, without any session cookie set, seems to have some dummy session id, because only subsequent sessions ids survive. --~--~-~--~~~-

fastcgi memory usage

2009-07-25 Thread Adi
I'm running a couple of django sites on a VPS with nginx and fastcgi and I'm a little concerned because of the memory usage. According to the "free" command, each site uses about 50MB of RAM (I've ran free before and after starting the fastcgi daemons and each sites seems to use the same amount).

Session problem

2009-07-25 Thread Boris Ozegovic
At the moment I am experiencing difficulties with Django session middleware. For some reason, my keys (and with them my objects) are vanishing from the session. Code, in which changes are made, is really simple and straightforward, and it isn't problem in code. Also, I use session only in this

Re: Invalid command 'WSGIDaemonProcess'

2009-07-25 Thread Graham Dumpleton
On Jul 26, 3:41 am, Daniel Roseman wrote: > On Jul 25, 2:11 pm, Jose Sibande wrote:> I just > uploaded my application to my server and this is the error that > > I am getting when I try to restart apache: > > Restarting web server: apache2Syntax error on line 6 of /etc/apache2/ > > httpd.conf

Re: "Lost" sessions

2009-07-25 Thread Tomasz Zieliński
In case someone suffers from this -I found the problem: http://code.djangoproject.com/ticket/11555 -- Tomasz Zieliński http://pyconsultant.eu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

'_CheckLogin' object has no attribute 'objects' ??

2009-07-25 Thread Asinox
Hi guys, well.. i dont know what this mean : '_CheckLogin' object has no attribute 'objects' any idea? thanks in my views.py from django.shortcuts import render_to_response, get_object_or_404, Http404 from django.conf.urls.defaults import * from django.template import RequestContext from djang

Re: '_CheckLogin' object has no attribute 'objects' ??

2009-07-25 Thread Dan Harris
Looks just like you have an error in your programming, the name of your view is "Dpatas", then you attempt to later call "Dpatas.objects.filter()" as if Dpatas was a model. The _CheckLogin is coming from your use of the @login_required decorator I would imagine. Hopefully that helps, Dan On Jul

Also-Online Feature

2009-07-25 Thread Jonas Obrist
Is there a builtin way in django to get a list of other users who are currently visiting a website or even a specific part of a website? If not are there any tools that I could use to implement this or do I have to think of a solution from scratch? --~--~-~--~~~---~

customization using form_class with generic views

2009-07-25 Thread djangonoob
I would like to use Django's generic views for create, update, delete operations. However, i am start with the first step: the create operation. What i want to do is to use the django.views.generic.create_update.create_object function, using the form_class as the required arguments. I would like

Re: '_CheckLogin' object has no attribute 'objects' ??

2009-07-25 Thread Asinox
Thanks Dan Harris for reply well u gave me a idea the problem was the name of the Model and the Name of the view...problem with the "same name".. Thanks :) On Jul 25, 8:26 pm, Dan Harris wrote: > Looks just like you have an error in your programming, the name of > your view is "Dpatas"

Re: Where are the admin app icons from?

2009-07-25 Thread Asinox
The icons : site-packages\django\contrib\admin\media\img\admin :) On Jul 25, 1:46 pm, Margie wrote: > Thanks Alex - I will check those out.  But if anyone knows where the > admin icons came from, I'd still love to know ... > > Margie > > On Jul 24, 4:01 pm, Alex Gaynor wrote: > > > > > On Fri

Re: How to create this filter

2009-07-25 Thread David
If I use variable names without quotes in "params[]", I get errors too. My Python is 2.5. It does not have this string formatting feature. It's new in 2.6. On Jul 25, 6:58 am, Necmettin wrote: > On 25 Temmuz, 02:23, David wrote: > > > I used this syntax > > > .extra(where=['%s >= %s - %s'],

Re: customization using form_class with generic views

2009-07-25 Thread Dan Harris
Assuming that you set_sub_date() function just sets the publish date to when the item was created and easy way to do this is in the model class PressRelease(models.Model): pub_date = models.DateField(auto_now_add=True) That will just set the pub_date to the current date when it is added to t

issue with simple image ordering view

2009-07-25 Thread django user
I have a basic form with that shows user's uploaded images: {% for photo in photos %} Order: {% endfor %} I'm stuck trying to figure out how to get the post values for each image in my view. I believe that I can do request.POST.getlist ('image') but that wi