Re: Performance / Memory/CPU Usage of A Django App with 10,000+ Models in a High Traffic Site

2008-01-13 Thread Vance Dubberly
umm ouch. 1) Aside from the description of your app sounding entirely unreal you've probably gone beyond the world that any basic web application framework can handle and into the world of needing to higher a few Ph.D's. No simple ORM is going to work for you not django, not sqlalchemy, not rail

Re: Inserting a date into DateField

2008-01-13 Thread Branton Davis
Well, there is, but you really ought to validate somehow. Like shabda says, django is expecting a python datetime object. You can create one with your string by first grabbing the individual bits and then using the datetime function to create one. from datetime import datetime year, month, day

Performance / Memory/CPU Usage of A Django App with 10,000+ Models in a High Traffic Site

2008-01-13 Thread Sebastian Macias
Hi, I already posted this on the django developers group and wanted to get feedback as well from the community as well. I'm developing a large webapp using django. One of my requirements is that it needs to be able to handle 10,000+ different entities or models that need to be associated with a

a problem about using inclusion_tag

2008-01-13 Thread shomain
my code list is : = 1.mysite/books/models.py = class Author(models.Model): salutation=models.CharField(maxlength=10) first_name=models.CharField(maxlength=30) last_name=mod

file upload RAM buffer or stream to tmp

2008-01-13 Thread Vance Dubberly
Does django still buffer file uploads into RAM or is has it started streaming to temp files yet? -- To pretend, I actually do the thing: I have therefore only pretended to pretend. - Jacques Derrida --~--~-~--~~~---~--~~ You received this message because you a

Re: Can not login on running behind Apache, but can when on development server

2008-01-13 Thread shabda
The following line raises validation error, self.request.session.test_cookie_worked(): raise ValidationError(_("Your Web browser doesn't appear to have cookies enabled. Cookies are required for logging in.")) And so the string within validation error is in forms.error, and forms.is_va

Re: CSS Issues

2008-01-13 Thread T150
Just for posterity, I wanted to note how I got css to work, both in my html files and my Django admin files, when using Django under Apache on Windows. My discoveries were a bit different than pacman's, but this thread was very helpful and I wanted to give something back. :) For me, it was a 4 s

initializing select date widget

2008-01-13 Thread jeffhg58
Hi, I have a question regarding the selectdatewidget. I am using a datefield for birthdate which is optional. How do you use the selectdate widget to default it to blank or not entered. When I use the selectdate widget, it displays a date of January 1. I am trying to determine whether or not the

limits on URL_field

2008-01-13 Thread [EMAIL PROTECTED]
This is what the online docs say about URLfield: http://www.djangoproject.com/documentation/model-api/#urlfield " A field for a URL. If the verify_exists option is True (default), the URL given will be checked for existence (i.e., the URL actually loads and doesn't give a 404 response). The admin

Multi-level edit_inline

2008-01-13 Thread Wanrong Lin
Hi, I would like to have multi-level edit_inline working, but I could not. I found two people with the same need in this mailing list: http://groups.google.com/group/django-users/browse_thread/thread/bb774966eb3a3d7e/f8faef7b364b6523?lnk=gst&q=edit-inline%2C+level#f8faef7b364b6523 http://groups

Re: Hosting with mod_proxy

2008-01-13 Thread [EMAIL PROTECTED]
The major problem is that only one request may be served at a time. Also, the server code has not been thoroughly audited for security flaws--another major problem. I've heard reports of people using MPM Worker just fine with Django, even though it's not officially supported. I'd recomment tryin

Re: Custom template tag

2008-01-13 Thread Alessandro Ronchi
2008/1/13, Alex Koshelev <[EMAIL PROTECTED]>: > > 'templatetags' instead of 'templatetag' > '{% load feed_import %}' instead of '{% load feedimport %}' My error wasn't that (I made a mistake writing here). It was a failed import inside the tag, and that caused the error without the correct error

newforms update choicefields values

2008-01-13 Thread [EMAIL PROTECTED]
Hello Django Users, I'm struggling with the newform options and i'm wondering if there is a method that can update the values of a certain choicefield. basically i have two choice fields. The selection of the first choice field should generate values for the second choice field in javascript i w

Re: template for loop problems

2008-01-13 Thread [EMAIL PROTECTED]
Thanks, that did the trick. On Jan 13, 6:02 pm, Ned Batchelder <[EMAIL PROTECTED]> wrote: > You don't need {{ }} within the {% for .. %} tag.  Try simply {% for > tmpDict in assayDict.methods %} > > --Ned.http://nedbatchelder.com/blog > > > > [EMAIL PROTECTED] wrote: > > Hello All, > > > I'm ru

Re: Getting checkbox values of a Form in view function

2008-01-13 Thread Alex Koshelev
Try `status__in` as filter param On 13 янв, 23:00, Nader <[EMAIL PROTECTED]> wrote: > Hallo, > > I have a Form in which I have define some checkbox input. > > > starting > waiting > accepted > failed > > completed > > > > > And I want to get the checkbox values in a list, therefor I use

Re: dynamic choices in a ChoiceField

2008-01-13 Thread James Bennett
2008/1/13 Alex Koshelev <[EMAIL PROTECTED]>: > When you explicitly write list in choices it evaluates at module > import type. To avoid this write function and pass it as 'choices' > parameter Or... deck = forms.ModelChoiceField(queryset=Deck.objects.all()) -- "Bureaucrat Conrad, you are tec

Hosting with mod_proxy

2008-01-13 Thread Florian Lindner
Hello, what is your opinion about the following deployment configuration? The site is very low traffic. Let the django development server bound to localhost serve the pages and use mod_proxy from Apache as a front end. For me it has the advantages that it fits much better into my setup tha

Getting checkbox values of a Form in view function

2008-01-13 Thread Nader
Hallo, I have a Form in which I have define some checkbox input. starting waiting accepted failed completed And I want to get the checkbox values in a list, therefor I use of the next statement in defined view function inform: message = request.POST.getlist('status') def inform(reque

Re: dynamic choices in a ChoiceField

2008-01-13 Thread Alex Koshelev
Thanks. My mistake On 13 янв, 21:39, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Alex Koshelev wrote: > > When you explicitly write list in choices it evaluates at module > > import type. To avoid this write function and pass it as 'choices' > > parameter > > > def get_choices(): > > [(d.id,d.

Re: Problem with Decimal type

2008-01-13 Thread Justin
I should add that I have another external script running as a Windows service, using Django load_environ to access my models, to read data on the serial port also imports the Decimal class. - Justin On Jan 13, 1:43 pm, Justin <[EMAIL PROTECTED]> wrote: > I am currently running three separate Dja

Problem with Decimal type

2008-01-13 Thread Justin
I am currently running three separate Django sites on a single apache web server using named virtual hosts. Recently I've started having issues with one of the sites that makes heavy use of the Decimal type for monetary calculations. Basically everything works until I try to perform some calculati

Re: dynamic choices in a ChoiceField

2008-01-13 Thread Fredrik Lundh
Alex Koshelev wrote: > When you explicitly write list in choices it evaluates at module > import type. To avoid this write function and pass it as 'choices' > parameter > > def get_choices(): > [(d.id,d.name) for d in Deck.objects.all()] (adding a return statement might be a good idea /F)

Re: Can not login on running behind Apache, but can when on development server

2008-01-13 Thread Alex Koshelev
What daes it mean "I am unable to login". Error aqcures, exception raises or something else? On 13 янв, 18:33, shabda <[EMAIL PROTECTED]> wrote: > I have a view function I am using for logging in people. When I am > deploying it to Apache/Mod_python, I am unable to login, but If I am > running it

Re: Custom template tag

2008-01-13 Thread Alex Koshelev
'templatetags' instead of 'templatetag' '{% load feed_import %}' instead of '{% load feedimport %}' On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote: > I'm trying to create a custom template tag. I've added a feedimport > app in my project, added it on my installed apps, and inside it I've

Re: dynamic choices in a ChoiceField

2008-01-13 Thread Alex Koshelev
When you explicitly write list in choices it evaluates at module import type. To avoid this write function and pass it as 'choices' parameter def get_choices(): [(d.id,d.name) for d in Deck.objects.all()] #... deck = forms.ChoiceField(required=True,choices = get_choices ) When this function

dynamic choices in a ChoiceField

2008-01-13 Thread Julian
Hi there, I have cards and decks, decks have ManyToMany cards, and if you want to add a card, you have to chose a deck; quite simple. my forms.py contains something like that: class CardForm(forms.Form): deck = forms.ChoiceField(required=True,choices=[(d.id,d.name) for d in Deck.objects.all

Re: Custom template tag

2008-01-13 Thread Alexey Moskvin
The correct directory for your tags is "templatetags", not "templatetag" On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote: > I'm trying to create a custom template tag. I've added a feedimport > app in my project, added it on my installed apps, and inside it I've > created a templatetag dir

Re: template for loop problems

2008-01-13 Thread Ned Batchelder
You don't need {{ }} within the {% for .. %} tag. Try simply {% for tmpDict in assayDict.methods %} --Ned. http://nedbatchelder.com/blog [EMAIL PROTECTED] wrote: > Hello All, > > I'm running into a little trouble using the template system of > django. > In python i created a list containing th

Custom template tag

2008-01-13 Thread Alessandro
I'm trying to create a custom template tag. I've added a feedimport app in my project, added it on my installed apps, and inside it I've created a templatetag directory with a file feed_import.py Both feedimport and templatetag dirs have an empty __init__.py file. I'm trying to load my feedimport

template for loop problems

2008-01-13 Thread [EMAIL PROTECTED]
Hello All, I'm running into a little trouble using the template system of django. In python i created a list containing the following info [ {'value':1,"list":[{'assayValue':"20",assayName:"test1"}, {'assayValue':"21",assayName:"test2"}, {'assayValue':"22",assayName:"test3"}]}, {'value':2,"list"

Can not login on running behind Apache, but can when on development server

2008-01-13 Thread shabda
I have a view function I am using for logging in people. When I am deploying it to Apache/Mod_python, I am unable to login, but If I am running it on the development server, I am able to login. Any pointers? (I am not using the builtin login, as I want to use newforms.) The view function is, def

Re: Curious bugs with middleware (but possible with other features).

2008-01-13 Thread Grindizer
On 13 jan, 13:14, Alex Koshelev <[EMAIL PROTECTED]> wrote: > You wrote: > >  P/ >   APP2/ >     middlewares.py -> MyMiddleware > > And then: > 'P.APP2.middlewares.ProfileMiddleware', > > MyMiddleware != ProfileMiddleware > > Is it right? > > On 13 янв, 13:53, Grindizer <[EMAIL PROTECTED]> wrote:

Re: remove ^M: project moved from window to linux

2008-01-13 Thread Brett Parker
On 13 Jan 11:20, Jonathan Ballet wrote: > You're right, Unix based systems use only the line feed (LF) control > character (which is represented by "\r" in Vim, BTW). > You might want to read this [1] for further explanations. Actually, LF is \n, CR is \r (\r being "return", short for carriage re

Re: sql.py cannot find tables that it generated sql to create

2008-01-13 Thread [EMAIL PROTECTED]
Hi, I'm having the same problem with r6980. As an example I used the same model as richbodo: models.py: class Account(models.Model): name = models.CharField(max_length=200) class Box(models.Model): account = models.ForeignKey(Account) mac = models.CharField(max_length=50) choic

Re: Curious bugs with middleware (but possible with other features).

2008-01-13 Thread Alex Koshelev
You wrote: P/ APP2/ middlewares.py -> MyMiddleware And then: 'P.APP2.middlewares.ProfileMiddleware', MyMiddleware != ProfileMiddleware Is it right? On 13 янв, 13:53, Grindizer <[EMAIL PROTECTED]> wrote: > Hello. > > I have one project let say P, > In this project i define several applic

Curious bugs with middleware (but possible with other features).

2008-01-13 Thread Grindizer
Hello. I have one project let say P, In this project i define several applications, APP1, APP2, APP3 In INSTALLED_APPS of my settings i add those application with full name, ("P.APP1", "P.APP2", etc.) and all was working fine. (Admin interface and front end). After i wrote a middleware class f

Re: remove ^M: project moved from window to linux

2008-01-13 Thread Jonathan Ballet
Hi, Le Sat, 12 Jan 2008 20:30:25 -0800 (PST), ocgstyles <[EMAIL PROTECTED]> a écrit : > I need to do that often at work when Windows files are moved over to > AIX. I just use vi. The key sequence is: > > :%s/^M// If you want to mimic dos2unix, you should use :%s/^M$// because those