Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
hi Graham: i'm using the nginx+fcgi . And my startup command is below python manage.py runfcgi host=127.0.0.1 port=3033 method=prefork pidfile=/var/run/fcgi.pid minspare=5 maxspare=30 maxchildren=60 maxrequests=200 p.s I've invite you on gtalk, hope your response. On Thu, Mar 31, 2011 at

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
hi Diederik: I think you can see something from my attach file, that indict i've 60M-70M per python process cost. That is because I start the flup with command below: python manager.py runfcgi host=127.0.0.1 port=3033 method=prefork pidfile=/var/run/fcgi.pid minspare=5 maxspare=30

Re: WxPython and django

2011-03-30 Thread Kenneth Gonsalves
On Wed, 2011-03-30 at 22:24 -0400, Calvin Spealman wrote: > They are completely unrelated. WX is a library for working with > desktop-based UI toolkits, and Django is a framework for producing and > delivering HTML/CSS/JS web content to a browser. > > not really so - I remember writing apps in

Re: manage.py command not found

2011-03-30 Thread spawgi
Assuming the South is very similar to Django from the documentation at the link. Here are some pointers. 1. Have you tried listing manage.py by trying ls command? 2. If you try ls -l, what are the permissions for manage.py? 3. Have you tried python manage.py? 4. Is there a shebang line at the top

Dajax, what do you think about it?

2011-03-30 Thread Sameer Rahmani
What do you think about using Dajax and Dajaxice in Django? is it worth? or you like to write your own ajax code? -- 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

Virtualenv and Dajaxice up...Now looking for Django Twitter Birds

2011-03-30 Thread LJ
I can't tell you how helpful this User Group has been to me! With the help of several helpful responses and a lot of great articles out there, I was finally able to install virtualenv and virtualenvwrapper and get dajaxice working. I wrote all about it on my blog, if there are any newbies wanting

ibm_db_django-1.0.2 IBM Dataservers backend support for Django 1.3 Released

2011-03-30 Thread Rahul
IBM_DB_DJANGO-1.0.2 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? - Added support for Django-1.3 - Backward

Re: WxPython and django

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 07:24:24 pm Calvin Spealman wrote: > They are completely unrelated. WX is a library for working with > desktop-based UI toolkits, and Django is a framework for producing and > delivering HTML/CSS/JS web content to a browser. > > On Wed, Mar 30, 2011 at 10:03 PM, Aref

Re: Is Django "leaking memory"?

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 06:48:15 pm dlamotte wrote: > I've documented what is going on here: > > http://stackoverflow.com/questions/5494178/why-doesnt-memory-get-released-t > o-system-after-large-queries-or-series-of-queri > > Basically, the memory doesn't "grow continuously" but it isn't >

Re: Force an ajax window to close

2011-03-30 Thread Calvin Spealman
You could add a header to the HTTP response that the JS on the clientside can see and interpret as "OK, this is ready to close now." I have done something similar to cause ajax-submitted forms to cause a redirect in the containing page. On Wed, Mar 30, 2011 at 10:24 PM, Mike Ramirez

Re: Is Django "leaking memory"?

2011-03-30 Thread Calvin Spealman
Python itself allocates memory in large chunks and can't release them until all objects in them have been garbage collected. Older versions of CPython didn't even release this chunks at all. On Wed, Mar 30, 2011 at 9:48 PM, dlamotte wrote: > I've documented what is going on

Re: Force an ajax window to close

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 06:36:56 pm CrabbyPete wrote: > I have a ajax form using smoothbox and mootools to show a form. > Smoothbox has a button to close the box, but I want to force it closed > once the submit button is pressed and the form validated. Is there a > way django can close a

Re: WxPython and django

2011-03-30 Thread Calvin Spealman
They are completely unrelated. WX is a library for working with desktop-based UI toolkits, and Django is a framework for producing and delivering HTML/CSS/JS web content to a browser. On Wed, Mar 30, 2011 at 10:03 PM, Aref wrote: > Hello, > > I have created a small app

WxPython and django

2011-03-30 Thread Aref
Hello, I have created a small app with wxpython to manage and query databases and now I am learning django and was wondering if it is possible to incorporate some of the wxpython code in django. What I am trying to do is to create the same app as the one in wxpython but make it web- based rather

Is Django "leaking memory"?

2011-03-30 Thread dlamotte
I've documented what is going on here: http://stackoverflow.com/questions/5494178/why-doesnt-memory-get-released-to-system-after-large-queries-or-series-of-queri Basically, the memory doesn't "grow continuously" but it isn't released to the system (yes DEBUG = False in settings.py). What I'm

Force an ajax window to close

2011-03-30 Thread CrabbyPete
I have a ajax form using smoothbox and mootools to show a form. Smoothbox has a button to close the box, but I want to force it closed once the submit button is pressed and the form validated. Is there a way django can close a browser window? -- You received this message because you are

Re: staticfile app question

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 05:34:05 pm Jason Culverhouse wrote: Just to add, if you have a seperate server and/or non-normal directory layout for for images and css files, this method doesn't work that well either. Again I'm not saying your suggestion is not a good one, it's just not one

Re: staticfile app question

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 05:34:05 pm Jason Culverhouse wrote: I don't think you don't grok me, I'm not arguing they aren't allowed and I do know how they work. Your suggestion has been thought about, tossed around and rejected, way before this conversation took place. Mike -- Of all

Re: Invalid values in a form cause validation to fail

2011-03-30 Thread Karen Tracey
On Wed, Mar 30, 2011 at 6:34 AM, ALJ wrote: > Hi Karen, > > Here is an example that I use to replicate the error: > > view >> > [snip] > >> > > form > >

Re: staticfile app question

2011-03-30 Thread Jason Culverhouse
On Mar 30, 2011, at 5:10 PM, Mike Ramirez wrote: > On Wednesday, March 30, 2011 05:01:08 pm Jason Culverhouse wrote: >> On Mar 30, 2011, at 4:50 PM, Mike Ramirez wrote: >>> On Wednesday, March 30, 2011 04:20:32 pm Shawn Milochik wrote: I have the exact same problem. I hope there is a

Re: staticfile app question

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 05:01:08 pm Jason Culverhouse wrote: > On Mar 30, 2011, at 4:50 PM, Mike Ramirez wrote: > > On Wednesday, March 30, 2011 04:20:32 pm Shawn Milochik wrote: > >> I have the exact same problem. I hope there is a solution, because > >> good site design often results in

Re: staticfile app question

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 04:58:42 pm Sells, Fred wrote: > This may be using a canon to swat a fly, but... > > I had a project some time ago where I needed a very repetitive > java/swing UI. I ended up creating python classes that had a __repr__ > method that generated the java source code.

Re: staticfile app question

2011-03-30 Thread Jason Culverhouse
On Mar 30, 2011, at 4:50 PM, Mike Ramirez wrote: > On Wednesday, March 30, 2011 04:20:32 pm Shawn Milochik wrote: >> I have the exact same problem. I hope there is a solution, because >> good site design often results in image references in the CSS. > > I think you guys are over analyzing the

RE: staticfile app question

2011-03-30 Thread Sells, Fred
This may be using a canon to swat a fly, but... I had a project some time ago where I needed a very repetitive java/swing UI. I ended up creating python classes that had a __repr__ method that generated the java source code. Then I was able to have very concise python files that instantiated

Re: staticfile app question

2011-03-30 Thread Mike Ramirez
On Wednesday, March 30, 2011 04:20:32 pm Shawn Milochik wrote: > I have the exact same problem. I hope there is a solution, because > good site design often results in image references in the CSS. The best one I've come up with and it's far from 'best' is to run a command that edits css

Re: Joins with multiple databases and temporary tables

2011-03-30 Thread bish029
for different databases the query could be formatted as s=temp1.objects.using("mytemp").filter(refId=table1.objects.using("normal").get(pk=something).id) where temp1 is table in database mytemp.table1 in databse normal I cannot understand the get argument but may be if you give it a try with a

[no subject]

2011-03-30 Thread bishwendu kundu
for different databases the query could be formatted as s=temp1.objects.using("mytemp").filter(refId=table1.objects.using("normal").get(pk=something).id) I cannot understand the get argument but may be if you give it a try with a suitable args."using" differentiates between databases. For the

Re: staticfile app question

2011-03-30 Thread Shawn Milochik
I have the exact same problem. I hope there is a solution, because good site design often results in image references in the CSS. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

staticfile app question

2011-03-30 Thread typeshige
Like many people, I'm switching over to use a static directory to serve site media. Overall, it works extremely well, but I have a question about one aspect of it. I have a CSS file that includes urls. I was wondering about the possibility of the staticfile app inserting the proper STATIC_URL as

Re: How to store multiple instances of a single object in the database

2011-03-30 Thread rohan
The method works perfectly. Thanks once again. On Mar 30, 5:36 pm, rohan wrote: > Hey Ryan, > > That seems very helpful. I will try using this argument. > Thanks a lot. > > Rohan > On Mar 30, 5:10 pm, Ryan Osborn wrote: > > > > > > > > > Have

Re: How to store multiple instances of a single object in the database

2011-03-30 Thread rohan
Hey Ryan, That seems very helpful. I will try using this argument. Thanks a lot. Rohan On Mar 30, 5:10 pm, Ryan Osborn wrote: > Have you considered using the 'through' argument for the many to many > field?  This lets you specify your own intermediate table to which you

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Graham Dumpleton
Why are you using prefork MPM and running Django embedded that way. Prefork MPM may be fine for PHP, but it is a poor solution for fat Python web applications unless you are prepared to give it the necessary memory resources and configure Apache properly specifically for that single Python web

multiline TextField

2011-03-30 Thread electrocoder
Hi. I write blog application. I want multiline TextField. Sample : paragraph or tab or return thanks. -- 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: How to store multiple instances of a single object in the database

2011-03-30 Thread Ryan Osborn
Have you considered using the 'through' argument for the many to many field? This lets you specify your own intermediate table to which you can add extra data. So you could add in a quantity field so you would know how many of each molecule you need. Here is the documentation:

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Diederik van der Boor
Op woensdag 30 maart 2011 17:48:38 schreef 付毅: > hi Xavier Ordoquy > So , you mean 60M per python process is in a normal status? I really > encouter this kind of website before Please note this is for the entire website, not per apache instance. There is one Django process (via mod_wsgi, or

Re: How to filter the list_display in the django admin with the request.session[user_id]

2011-03-30 Thread Jason Culverhouse
On Mar 30, 2011, at 2:31 PM, Pablo Vidal wrote: > I need to know how to filter in the django admin model License, the > licenses of the user logged-in to the admin. > > class License(models.Model): >user = models.ForeignKey('wiki.User') >name = models.CharField(max_length = 100) > >

How to filter the list_display in the django admin with the request.session[user_id]

2011-03-30 Thread Pablo Vidal
I need to know how to filter in the django admin model License, the licenses of the user logged-in to the admin. class License(models.Model): user = models.ForeignKey('wiki.User') name = models.CharField(max_length = 100) def __unicode__(self): return self.name Example: So

Persistent Connection

2011-03-30 Thread Daniel Corbe
Guys, can I have a persistent connection in models django eg I have an infinite loop with a sleep (1) and then a model.save () but every save he opens and closes a new connection, creating an unnecessary deman of connections and processing. Anyone know how to circumvent it? for example using a

How to store multiple instances of a single object in the database

2011-03-30 Thread rohan
Hi, I am creating a chemistry database using django's admin interface in Sqlite3. The database has a simulations table which has a many to many relationship with the compounds table. Each simulation needs to start off with a fixed number of compounds that it has and each simulation can have 1 or

Re: Documentation Checked But Unclear: How to supress form.errors from views when needed?

2011-03-30 Thread Shawn Milochik
What do you mean by "if I refresh a page"? If you refresh a page that has a form on it but has not been submitted, I wouldn't expect the behavior you describe. If you submit a form improperly and it displays errors, then you hit 'refresh,' the view will still get the POST (or GET) and will do

Re: django custom template tags: how to send to (parser, token)

2011-03-30 Thread bruno desthuilliers
On 30 mar, 21:55, justin jools wrote: > I've just started using custom tags and need some help parsing info > to: > > @register.tag > def friends_of(parser, token): >     tag_name, user_var = token.split_contents() Don't assume you'll only have what you expected here.

Documentation Checked But Unclear: How to supress form.errors from views when needed?

2011-03-30 Thread hank23
I have an edit screen with more than a dozen fields on it of various types (text/CharField, select/CharField, date/DateField). When I refresh the screen sometimes I want to suppress all of the field required errors generated by empty fields prior to the refresh actually taking place. So far I have

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Adam Nelson
I think 60M is fine. For us, with nginx in front of gunicorn, we can get many simultaneous connections per process. -Adam -- 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

Re: Django IDE : how to start the devserver in an editor?

2011-03-30 Thread roberto
MrMuffin, You've also have the editra group where the author use to answering quickly all of the questions posted there: https://groups.google.com/group/editra?hl=en I like your ideas and features to add into the plugin for django. Good luck ! Roberto On Mar 30, 4:21 pm, MrMuffin

Re: model manager and request

2011-03-30 Thread Tony
yeah, shawn said the exact dilemma I am having. I am working with a plugged in app and dont want to change its code and mess with its views and create a new fork, it just seems like small thing to make a change for (and I would probably mess something else up). On Mar 30, 11:58 am, Shawn

Re: new subpage in django

2011-03-30 Thread Ovnicraft
On Wed, Mar 30, 2011 at 3:14 PM, jay K. wrote: > hello, > > what i'm trying to do is to create a subpage for a website written in > django > > e.g. > > for http://www.xzy.com/subpage I'd like to add 'subpage2', so it would > look like > >

Re: new subpage in django

2011-03-30 Thread Sandro Dutra
Probably adding "http://www.xzy.com/subpage/subpage2; to your URLConf. 2011/3/30 jay K. : > hello, > > what i'm trying to do is to create a subpage for a website written in django > > e.g. > > for http://www.xzy.com/subpage I'd like to add 'subpage2', so it would look

Re: new subpage in django

2011-03-30 Thread jay K.
hello, what i'm trying to do is to create a subpage for a website written in django e.g. for http://www.xzy.com/subpage I'd like to add 'subpage2', so it would look like http://www.xzy.com/subpage/subpage2 how do i do that? thanks On Wed, Mar 30, 2011 at 4:20 PM, Xavier Ordoquy

django custom template tags: how to send to (parser, token)

2011-03-30 Thread justin jools
I've just started using custom tags and need some help parsing info to: @register.tag def friends_of(parser, token): tag_name, user_var = token.split_contents() return FriendsOfNode(user_var) class FriendsOfNode(template.Node): def __init__(self, user_var): self.user_var =

RE: Django IDE : how to start the devserver in an editor?

2011-03-30 Thread Sells, Fred
Using eclipse you can create a run configuration that starts the dbserver and it will auto-reload whenever you change a file. Of course since the dbserver auto restarts when it detects a file change, the command line is not all that bad. -Original Message- From:

Django IDE : how to start the devserver in an editor?

2011-03-30 Thread MrMuffin
I`m trying to develop a simple plugin[0] for the Editra[1] editor for django development. Right now it can create django projects and apps from within the editor. The editor is based on wxPython and I want to start the devserver from within the editor, show a simple form with the option to stop or

Re: new subpage in django

2011-03-30 Thread Xavier Ordoquy
Le 30 mars 2011 à 21:16, jay K. a écrit : > Hello, > > How do you create a new subpage in django? > > thanks Hi, What do you mean or I'd rather ask, what are you trying to do ? Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Hi, Sounds correct to me. Regards, Xavier. Le 30 mars 2011 à 17:48, 付毅 a écrit : > hi Xavier Ordoquy > So , you mean 60M per python process is in a normal status? I really encouter > this kind of website before > > On Wed, Mar 30, 2011 at 11:35 PM, Xavier Ordoquy

new subpage in django

2011-03-30 Thread jay K.
Hello, How do you create a new subpage in django? thanks -- 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

Re: inlineformset_factory default values

2011-03-30 Thread Nick
The problem I'm having is this. Those fields that I do not include in my form attempt to update the DB, when the post data is missing those values it blanks out those fields in the DB. I have gotten around this by explicitly stating the fields I would like to update but if I try to include data

Re: model manager and request

2011-03-30 Thread Shawn Milochik
Jacob, This sort of thing comes up so frequently on this list that we've all seen those answers dozens of times, although not usually in so concise a manner. My question, to which there seems to be no answer, is what a good approach to do something that I know (from spending a long time on this

Re: check for existence in bulk

2011-03-30 Thread Jason Culverhouse
On Mar 30, 2011, at 9:47 AM, Calvin Spealman wrote: > I think your best bet is > > MyModel.objects.filter(some_field__in=ok_values).count() == len(ok_values) > > On Wed, Mar 30, 2011 at 12:44 PM, dmitry b wrote: >> Hi, >> >> is there a way to check in bulk for record

Re: model manager and request

2011-03-30 Thread Jacob Kaplan-Moss
On Wed, Mar 30, 2011 at 1:11 PM, Tony wrote: > Is there a way to use the "request.user" attributes in a custom model > manager?  So I could filter by certain attributes the current logged > in user has?  This is the preferable way I would like to filter the > objects the user

inlineformset_factory default values

2011-03-30 Thread Nick
I am using inlineformsets_factory on a form and every time I save those fields that are not made available in the form are overridden to null values on save. How do i get it just to update those fields that are specifically listed in the form? -- You received this message because you are

model manager and request

2011-03-30 Thread Tony
Is there a way to use the "request.user" attributes in a custom model manager? So I could filter by certain attributes the current logged in user has? This is the preferable way I would like to filter the objects the user sees, so if there is a way, I would appreciate the help. If there is no

Joins with multiple databases and temporary tables

2011-03-30 Thread Gary Gendel
I've got a strange situation and I was wondering how to handle it. The database has stored procedures that crunch on tables and store the results in temporary tables. These resulting tables point to various records in persistent tables. The first question is how to control the connection in

Re: manage.py command not found

2011-03-30 Thread Eddie Sullivan
If you're talking about the line that imports your app, that usually means you have an error in your application code (the views or the models). Try starting the shell and run "import x" manually and see what errors you get. -Eddie On Mar 30, 11:57 am, "jay K."

Re: check for existence in bulk

2011-03-30 Thread Calvin Spealman
I think your best bet is MyModel.objects.filter(some_field__in=ok_values).count() == len(ok_values) On Wed, Mar 30, 2011 at 12:44 PM, dmitry b wrote: > Hi, > > is there a way to check in bulk for record existence and get back a > map of results similar to what's returned

check for existence in bulk

2011-03-30 Thread dmitry b
Hi, is there a way to check in bulk for record existence and get back a map of results similar to what's returned by in_bulk(). In my case, I need to look up records by a unique field which is not the primary key and I don't want object instances back, just true or false. Thanks Dmitry --

noobie cannot get mod_wsgi to import settings

2011-03-30 Thread Sells, Fred
I've been googling and trying this for 2 days now, I'm sure I'm just confused about something basic because it cannot be that hard. I've tried all the hints I found via google and they made sense but no success. I'm running RHEL 6 Python 2.6.5, django 1.2.4 and mod_wsgi 3.2. I'm trying to

Re: manage.py command not found

2011-03-30 Thread Shawn Milochik
On Wed, Mar 30, 2011 at 11:57 AM, jay K. wrote: > > hi, Shawn > > I finally managed to get python manage.py shell to work, by commenting > out those INSTALLED_APPS that had an issue with 'import x' > > it turns out that 'import x' was the problem. > > do you

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
hi Xavier Ordoquy So , you mean 60M per python process is in a normal status? I really encouter this kind of website before On Wed, Mar 30, 2011 at 11:35 PM, Xavier Ordoquy wrote: > > Le 30 mars 2011 à 15:41, 付毅 a écrit : > > > i don't think 100 instance means to 100 CPUs.

Re: manage.py command not found

2011-03-30 Thread jay K.
hi, Shawn I finally managed to get python manage.py shell to work, by commenting out those INSTALLED_APPS that had an issue with 'import x' it turns out that 'import x' was the problem. do you have any suggestions to fix 'import x'? thanks On Wed, Mar 30, 2011 at 12:25 PM, jay K.

Re: OPTIMISING OVERHEAD IN DJANGO WITH MYSQL DATABASE

2011-03-30 Thread Brian Neal
On Mar 30, 9:36 am, Dipo Elegbede wrote: > Hi all, > > I have a django application that uses mysql database. > > Everything works just fine except that I noticed some queries do spend a lot > of time to load. > > I have about 15,000 checklists the system would have to

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Le 30 mars 2011 à 15:41, 付毅 a écrit : > i don't think 100 instance means to 100 CPUs. I just want to use http_load to > test pressure to my web server. if i make the 100 cocurrent request per > second with 100 cocurrent connection. I will make 100 python process instance > when I deploy my

Re: manage.py command not found

2011-03-30 Thread jay K.
Hello, Shawn I type python manage.py shell in my project directory and get the following error Error: No module named xx regards On Wed, Mar 30, 2011 at 11:52 AM, Shawn Milochik wrote: > Check the permissions on manage.py. I'm guessing it's not executable. > > Either

Re: manage.py command not found

2011-03-30 Thread Juan Gabriel Aldana Jaramillo
Hi, Try it: python manage.py On Wed, Mar 30, 2011 at 9:52 AM, Shawn Milochik wrote: > Check the permissions on manage.py. I'm guessing it's not executable. > > Either use chmod +x on manage.py or execute it with Python: python > manage.py. > > -- > You received this message

2 Python/Django Developers Needed ASAP

2011-03-30 Thread Ken Zinchiak
In need of 2 Python, Django developers, for Mobile Applications, ASAP In the NYC area for the 3 largest media company in the country. Permanent roles Functions: Develop back end services for Mobile Applications Develop extensible online applications Develop and maintain Automated Testing

Re: manage.py command not found

2011-03-30 Thread Shawn Milochik
Check the permissions on manage.py. I'm guessing it's not executable. Either use chmod +x on manage.py or execute it with Python: python manage.py. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

manage.py command not found

2011-03-30 Thread jay K.
Hello, I am following the tutorial at http://south.aeracode.org/docs/installation.html#installation-configure in order to install South. I've installed it successfully and modified INSTALLED_APPS so it includes 'south', in the settings.py now I execute the command: ./manage.py shell inside my

Re: Limiting file upload type?

2011-03-30 Thread Sithembewena Lloyd Dube
Hi David. Thanks for the response. Took a detour and just returned to this task. I decided to do a quick check on file extension after all. This is in the admin area and for now this will have to do: def save_model(self, request, obj, form, change): try: file_name =

Re: OPTIMISING OVERHEAD IN DJANGO WITH MYSQL DATABASE

2011-03-30 Thread Shawn Milochik
All-caps hurts my eyes. Did not read. -- 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 django-users+unsubscr...@googlegroups.com.

Re: Trouble raising forms.ValidationError in save() override in admin.py

2011-03-30 Thread Shawn Milochik
No, the forms.ValidationError has to be raised in one of the clean() methonds of your model. Otherwise it will result in a stack trace. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

OPTIMISING OVERHEAD IN DJANGO WITH MYSQL DATABASE

2011-03-30 Thread Dipo Elegbede
Hi all, I have a django application that uses mysql database. Everything works just fine except that I noticed some queries do spend a lot of time to load. I have about 15,000 checklists the system would have to browse through to render my dashboard, which indicates which checklists is totally

Trouble raising forms.ValidationError in save() override in admin.py

2011-03-30 Thread Sithembewena Lloyd Dube
Hi all, In the admin.py code of my project, I have an override to a save() method where I check a file upload's extension and, based on that, should either save the instance object or update show an error message on the admin form as follows: def save_model(self, request, obj, form, change):

Re: authentication switching mid-session

2011-03-30 Thread Bill Freeman
Do you have any caching in front of things? On Wed, Mar 30, 2011 at 7:07 AM, Chris Curvey wrote: > When my Django system is under heavy load (system CPU > 90%), I start > getting complaints from users that their authentication changes in the > middle of a session.  For

Re: need to change models

2011-03-30 Thread Shawn Milochik
Use South: http://south.aeracode.org/ -- 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 django-users+unsubscr...@googlegroups.com.

Re: need to change models

2011-03-30 Thread moham...@efazati.org
send your error also ;) On 03/30/2011 06:40 PM, jay K. wrote: Hello, I've been struggling for quite a white with this whenever i change my models.py file by adding a new text area I get a 'error 500 internal server error' besides i keep getting an error whenever i try to syncdb my database

need to change models

2011-03-30 Thread jay K.
Hello, I've been struggling for quite a white with this whenever i change my models.py file by adding a new text area I get a 'error 500 internal server error' besides i keep getting an error whenever i try to syncdb my database can anyone please explain what i'm doing wrong? thanks -- You

Re: Instructions for code changing to Django 1.3

2011-03-30 Thread Shawn Milochik
It just so happens that there's a two-hour Webinar by Jacob Kaplan-Moss tomorrow on this very topic: http://www.eventbrite.com/event/1008507473 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
hi Bennett: i attache my ps output file, just see the RSS column, that is the real memory usage for every instance On Wed, Mar 30, 2011 at 9:51 PM, James Bennett wrote: > On Wed, Mar 30, 2011 at 8:41 AM, 付毅 wrote: > > i don't think 100 instance means

Re: Instructions for code changing to Django 1.3

2011-03-30 Thread James Bennett
2011/3/30 Thiago Carvalho D' Ávila : > I have a project running in Django 1.2.5 and I want to update it (the code) > to Django 1.3. I've seen the release notes, but there is no direct > instructions to what I have to change in the code. Every item in the release notes that

Re: Django Web Application Cost So Many memory

2011-03-30 Thread James Bennett
On Wed, Mar 30, 2011 at 8:41 AM, 付毅 wrote: > i don't think 100 instance means to 100 CPUs. I just want to use http_load > to test pressure to my web server. if i make the 100 cocurrent request per > second with 100 cocurrent connection. I will make 100 python process >

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
I've found one of my app module has a large model. there are 207 models in models.py. When I add this app module into INSTALL_APPS, the process instance memory increase nearly 10M more. I think can I move these model classes out of my models.py file and move them in to another .py file. And when

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
i don't think 100 instance means to 100 CPUs. I just want to use http_load to test pressure to my web server. if i make the 100 cocurrent request per second with 100 cocurrent connection. I will make 100 python process instance when I deploy my web project in prefork environment. Any others agree

Re: How to send emails?

2011-03-30 Thread Micah Carrick
You can setup gmail in your settings.py DEFAULT_FROM_EMAIL = 'your-email@your-domain' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'your-gmail-usern...@gmail.com' EMAIL_HOST_PASSWORD = 'your-gmail-password' And you can use the email_user() method of the

Re: How to send emails?

2011-03-30 Thread Ryan Osborn
Hi, django-registration can take care of this for you: https://bitbucket.org/ubernostrum/django-registration/ Ryan -- 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

Instructions for code changing to Django 1.3

2011-03-30 Thread Thiago Carvalho D' Ávila
I have a project running in Django 1.2.5 and I want to update it (the code) to Django 1.3. I've seen the release notes, but there is no direct instructions to *what I have to change in the code*. It would be very useful to me, to all the community (I know that a lot of people may be in the exact

[ANN]: FeinCMS 1.3 release candidate

2011-03-30 Thread Matthias Kestenholz
Twelve days ago, the first preview for FeinCMS 1.3 has been released. If we don't hit any bugs in the next few days, I'll probably release 1.3.0 final in about a week. What is FeinCMS anyway? === FeinCMS is one of the most advanced Content Management Systems built on top of

Re: Experienced -> Senior Python / Django Developer Required

2011-03-30 Thread nadaeivar
Hi, I'm in Senegal africa, cant i postule Envoyé par mon BlackBerry® smartphone de Tigo -Original Message- From: Tom Inglis Sender: django-users@googlegroups.com Date: Wed, 30 Mar 2011 05:34:35 To: Django users Reply-To:

How to send emails?

2011-03-30 Thread LIU Liang
Hello, I want to realize the verification of email when sign up. But I don't know how to send a email. for example with a account of gmail. I have tried the method following, but there's errors. Could anybody help? I create a django project, and add email configuration in settings.py. then

Experienced -> Senior Python / Django Developer Required

2011-03-30 Thread Tom Inglis
Role: We require an experienced Python / Django developer for our exciting Edinburgh-based startup company. The role involves the full lifecycle agile development of sophisticated social website and mobile applications, and will grow in time to include leadership of a team of developers.

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Hi, > Because > if an instance cost 60M memory, when I deploy my project in prefork > web server with 100 instance, i will cost 6GB memory. I don't think > this is a normal state. I hardly see the need for 100 instances. Could you elaborate on that need ? Imagine those 100 instances are

Re: Django Web Application Cost So Many memory

2011-03-30 Thread 付毅
no. i don't use any cache, and I 've try to remove the app module which I doubt cost memory. I found that the most memory eater is the app module who has very large models.py On Wed, Mar 30, 2011 at 8:32 PM, moham...@efazati.org wrote: > do you have any cache ing? > > On

Re: Django Web Application Cost So Many memory

2011-03-30 Thread moham...@efazati.org
do you have any cache ing? On 03/30/2011 04:33 PM, bird sky wrote: Hello Everybody: I encounter a problem that my Django project, it has more than 60 app modules, and some models are very large, more than 30 fields . And when I startup my project, regardless of in development server, fast

  1   2   >