Re: memcached occasional errors

2011-07-26 Thread Russell Keith-Magee
On Tue, Jul 26, 2011 at 2:29 PM, het.oosten wrote: > On the memcached mailing list they suspected this is a Django/python > issue so I started a thread here. A user named dormando replied that > the problem below looks like a connection failure (sock has gone null) > >  I use memcached on a low tr

Re: Doubt : Redirect after registration

2011-07-26 Thread Uros Trebec
I'm using django-registration and I solved the same problem by using this: http://djangosnippets.org/snippets/1960/ Works like a charm :) Regards, Uros On Jul 26, 8:41 am, Lior Sion wrote: > Are you using anything not defaulted, like django-registration? In the > database - is the user created

RE: [] Re: memcached occasional errors

2011-07-26 Thread Henrik Genssen
PyLibMC was introduced in django 1.3 and he is using 1.2 you need to upgrade to upgrade django to use that lib - or am I wrong? >reply to message: >date: 26.07.2011 09:32:19 >from: "Russell Keith-Magee" >to: django-users@googlegroups.com >subject: [] Re: memcached occasional errors > >On Tue, Jul

Re: USE_I18N vs. USE_L10N

2011-07-26 Thread Lucy Brennan
Sorry for the late response to your reply. For some reason, I did not get your response to my email. I only saw your answer because I went to the online archive. Here is a follow up for the googlers. I have read the Django documentation, e.g.: https://docs.djangoproject.com/en/dev/topics/i18n/,

Re: drag and drop rows on django admin

2011-07-26 Thread Tom Evans
On Tue, Jul 26, 2011 at 6:32 AM, rahul jain wrote: > Tried this snippet but not working > > http://djangosnippets.org/snippets/2306/ > > Anyone else tried it, I would like to drag and drop rows on django admin. > > Thanks. > > RJ > 1) Resending the same message with a different subject within suc

Re: how to create a hidden field

2011-07-26 Thread Tom Evans
On Tue, Jul 26, 2011 at 2:18 AM, webcomm wrote: > I haven't been able to find anything documenting how to create a > hidden field.  I see this is done with the HiddenField widget but > don't know how to use that.  I tried the following but the field still > shows... > > class NewsForm(ModelForm):

Re: memcached occasional errors

2011-07-26 Thread het.oosten
Thanks for the replies. I installed python-memcached through the package manager. This version was outdated. I updated python-memcached to the latest version now (1.47) When I keep getting these error messages I will look into PyLibMC. Anybody have any experience with PyLibMC and Django 1.2.4? Ro

Re: Managing static files - beginner's question

2011-07-26 Thread John Sheridan
Rodney, In your settings.py file there are a couple of things you will need to change, but none directly concerning TEMPLATE_CONTEXT_PROCESSORS. First, you should set STATIC_ROOT to some local directory on your computer. eg. STATIC_ROOT = '/Users/rodney/static' . This will be where django copie

unique_together in 1.2: does it need a syncdb and does it work when saving the model?

2011-07-26 Thread fjanon
I added a meta option unique_together with 3 fields in a model: unique_together = ("family_name", "given_names", "working_group") To my surprise it worked without doing a syncdb. a sqldiff show no difference and the check for uniqueness works when I create a new instance, not when I update an exi

Re: Optimization of a Large QuerySet iteration

2011-07-26 Thread Roman Klesel
Hello, 2011/7/25 nixlists : > Is there a way to rewrite the dictionary code above to make it more > readable, and/or rewrite everything in a more efficient manner in > general? I also consider myself a beginner in programming but I've been using django for about 1 year now. To me the code looks

Re: Doubt : Redirect after registration

2011-07-26 Thread vaibhav agarwal
Hey, @Lior Sion : No I am not using anything other than the default . IN the database the user is created and active ( am able to login manually as the user ) . @Urun : Will try that out .. thanks. Thanks On Jul 26, 12:53 pm, Uros Trebec wrote: > I'm using django-registration and I solved the

Re: Django open source cashflow management app

2011-07-26 Thread Derek
On Jul 25, 8:51 pm, zodman wrote: > http://misgastos.zodman.com.mxits on spanish sorry. > > https://github.com/zodman/misgastos/ > > On Sun, Jul 24, 2011 at 8:44 AM, mf wrote: > > Does anyone knows about an open source cashflow management app like > > this one[0], built with django?. > > > [0]htt

Database doubt

2011-07-26 Thread vaibhav agarwal
Hey, I am coding in django for the first time and I had this doubt about database.At the start of coding , you are not sure of all the fields in the models of your site. So you end up making a few fields and proceed . But if at some other time , you might realise that you have to add a new field .

Re: Database doubt

2011-07-26 Thread nicolas HERSOG
Hi, I'm a beginner like you, and my database model is not over yet. When i add new field in my models.py i make a python manage.py sqlall retrieve the sql and make manually the alter table. Hope this help On Tue, Jul 26, 2011 at 1:50 PM, vaibhav agarwal wrote: > Hey, > > I am coding in django

Re: 3-legged-OAuth Logout

2011-07-26 Thread Vignesh Sunder
I thought a lot about this when I developed my website (with Facebook as the Server and my django-powered website as the Consumer). And what I did was include a url to Facebook after the user logged out of my website. For those interested, you are invited to check out http://www.thotvote.com. It h

Re: Database doubt

2011-07-26 Thread Kirill Spitsin
On Tue, Jul 26, 2011 at 04:50:27AM -0700, vaibhav agarwal wrote: > Hey, > > I am coding in django for the first time and I had this doubt about > database.At the start of coding , you are not sure of all the fields > in the models of your site. So you end up making a few fields and > proceed . But

Re: unique_together in 1.2: does it need a syncdb and does it work when saving the model?

2011-07-26 Thread Javier Guerra Giraldez
On Tue, Jul 26, 2011 at 4:09 AM, fjanon wrote: > - do I need to update the database schema and how do I get the > appropriate SQL change/patch from Django? > - is the unique constraint supposed to work when updating an instance > as well as creating a new one? unique_together creates a constraint

Re: USE_I18N vs. USE_L10N

2011-07-26 Thread Andre Terra
On Tue, Jul 26, 2011 at 5:17 AM, Lucy Brennan wrote: > > (...) > > For both the USE_L10N and USE_I18N their effect is not obvious from > their naming. I suggest, that the description of these parameters in > https://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs are > made more precise.

Re: unique_together in 1.2: does it need a syncdb and does it work when saving the model?

2011-07-26 Thread Fred Janon
That explains and helps a lot, thanks Javier. On Tue, Jul 26, 2011 at 20:31, Javier Guerra Giraldez wrote: > On Tue, Jul 26, 2011 at 4:09 AM, fjanon wrote: > > - do I need to update the database schema and how do I get the > > appropriate SQL change/patch from Django? > > - is the unique constra

Re: Optimization of a Large QuerySet iteration

2011-07-26 Thread Tom Evans
On Mon, Jul 25, 2011 at 4:57 AM, nixlists wrote: > Hi. I am a newbie  :) > > Is there a way to rewrite the dictionary code above to make it more > readable, and/or rewrite everything in a more efficient manner in > general? It still takes a bit of time to run (but much faster than > doing queries

Django and (d)ajax: forms, checkboxes, hrefs... a bit of everything (howto?)

2011-07-26 Thread samuele.mattiuzzo
Sorry for the title, but i'm trying as hard as i can to learn (d)ajax and i have few problems. I'm trying to deploy something like this: http://case.trovit.it/index.php/cod.search_homes/type.1/what_d.New York/ on the left side, there's a bunch of link (facets). i need to have something similar wi

Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Dimitry Zolotaryov
Hi all, I was wandering if you could tell me what to look out for when installing Django with Apache on a Windows Server 2008 machine. Is there anything I should be aware of in terms of installation problems, performance issues or compatibility with some general purpose libraries? Thanks Dimitry

Re: Django and (d)ajax: forms, checkboxes, hrefs... a bit of everything (howto?)

2011-07-26 Thread Tom Evans
On Tue, Jul 26, 2011 at 2:53 PM, samuele.mattiuzzo wrote: > Sorry for the title, but i'm trying as hard as i can to learn (d)ajax > and i have few problems. > > I'm trying to deploy something like this: > http://case.trovit.it/index.php/cod.search_homes/type.1/what_d.New > York/ > > on the left si

How do I change my user password on Django's bug tracker?

2011-07-26 Thread cool-RR
Hello, How do I change my user password on Django's bug tracker? Thanks, Ram. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Z1HJTz2KIkEJ. To post to th

Re: USE_I18N vs. USE_L10N

2011-07-26 Thread Tom Evans
On Tue, Jul 26, 2011 at 1:46 PM, Andre Terra wrote: > On Tue, Jul 26, 2011 at 5:17 AM, Lucy Brennan > wrote: >> >> (...) >> >> For both the USE_L10N and USE_I18N their effect is not obvious from >> their naming. I suggest, that the description of these parameters in >> https://docs.djangoproject.

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Andre Terra
Hello, Dimitry You can take a look at using something like nginx for serving small static files, which can otherwise keep Apache busy and therefore delay its response for more important tasks. At the risk of flaming, I should note that I have never heard of anything that MySQL does better than Po

Re: Optimization of a Large QuerySet iteration

2011-07-26 Thread nixlists
On Tue, Jul 26, 2011 at 9:52 AM, Tom Evans wrote: >  p_dict = dict(contract_products.values_list('product', 'wac__wac')) > > This should cut down the number of queries in the view significantly. Thanks! This is much better than what I had. -- You received this message because you are subscribed

Re: Optimization of a Large QuerySet iteration

2011-07-26 Thread nixlists
On Tue, Jul 26, 2011 at 7:42 AM, Roman Klesel wrote: ... > The main question you may ask yourself may be whether or not you > really want to have django do the whole calculation thing. Many > database engines have very powerful aggregation capabilities, support > for stored procedures, functions

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Javier Guerra Giraldez
On Tue, Jul 26, 2011 at 9:23 AM, Andre Terra wrote: > You can take a look at using something like nginx for serving small static > files, which can otherwise keep Apache busy and therefore delay its response > for more important tasks. > > At the risk of flaming, I should note that I have never he

Django, Pinax, Dreamhost Project

2011-07-26 Thread Jeremy
Hello all, I'm not sure if this is the right place to post this, but was sent this direction, so if not please let me know. I'm incredibly new to Django, and I'm trying to set up a personal site with a Pinax install. I chose Pinax because most of what the site needs to do, Pinax is capable of "ou

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote: > For user input, I would like to format what they enter into 'sentence > case' > Example, if they input ALL CAPS for a description, I want to lowercase > that, but according to sentence rules (first word in sentence upper > case, res

ALL CAPS input and Sentence case

2011-07-26 Thread christian.posta
Forgive me if this might be more of a python-centric or text-handling question more than Django, but it does come up within the context of web development, processing user input, etc in all web frameworks including django. I did a quick search on the forum and couldn't find an answer. (I've also go

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Dimitry Zolotaryov
Javier, You're correct in assuming that these are the tools I'm most comfortable with. Knowing this, any advice on the original question would be greatly appreciated. Thanks. Dimitry On Jul 26, 11:03 am, Javier Guerra Giraldez wrote: > On Tue, Jul 26, 2011 at 9:23 AM, Andre Terra wrote: > >

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
On Tue, Jul 26, 2011 at 07:19:46PM +0300, Kirill Spitsin wrote: > On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote: > > For user input, I would like to format what they enter into 'sentence > > case' > > Example, if they input ALL CAPS for a description, I want to lowercase > > that,

Import error

2011-07-26 Thread shakthi
i am implementing the django admin interface in my site. after changing the settings and the urls file, i am getting an import error on the web browser. the error was "import error" "No module named urls" also when i check for that file by giving the command 'pydoc django.contrib.admin.urls' in te

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Javier Guerra Giraldez
On Tue, Jul 26, 2011 at 11:33 AM, Dimitry Zolotaryov wrote: > Knowing this, any advice on the original question would be greatly > appreciated. I haven't done any deployment on windows; but i do know some helpful facts: - microsoft invests a lot of money in making sure that high-profile OSS proj

making a search page using generic class views

2011-07-26 Thread akonsu
hello, I am trying to migrate my function based views to class based ones. I have a search page with a form (which is represented by MySearchForm class). The form's action URL is set to the current page (). When the form is submitted the search results are shown in the page below the form. in othe

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Dimitry Zolotaryov
So if I run into performance issues, I can always pipe from Apache to something like gunicorn and keep Apache serving static media? Dimitry On 26 juil, 13:03, Javier Guerra Giraldez wrote: > On Tue, Jul 26, 2011 at 11:33 AM, Dimitry Zolotaryov wrote: > > Knowing this, any advice on the original

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread CrabbyPete
I've run django on Windows Server with apache and it was easy to deploy. Forget IIS. I've deployed Nginx and uWSGI on linux and that was even easier. I've never done Nginx on windows, but I don't think it would be a big deal. On Jul 26, 1:25 pm, Dimitry Zolotaryov wrote: > So if I run into perfo

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread CrabbyPete
PS, I used mod_wsgi and make sure you have the latest pywin32 On Jul 26, 2:03 pm, CrabbyPete wrote: > I've run django on Windows Server with apache and it was easy to > deploy.  Forget IIS. I've deployed Nginx and uWSGI on linux and that > was even easier. > I've never done Nginx on windows, but

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Andre Terra
I recently compiled nginx with an additional module on windows and so far, so good. I'm probably skipping Apache altogether for this small website. As far as PostgreSQL goes, from what I've seen, it works flawlessly on Windows. Never heard of anyone complaining about that. Cheers, AT On Tue, Ju

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Michael Manfre
I have a decent amount of experience with running apache, mod_wsgi and django on windows (w/ MS SQL). Apache's process module on windows (mpm_winnt) may result in you having to configure around some serious GIL related performance issues. You might not hit the problems if the site is low traffic. Y

Accessing "request" from within an authentication backend

2011-07-26 Thread Steven Smith
Is there a way to access the HttpResponse, or issue a redirect from within a custom authentication backend? I have Django hooked up to our Active Directory server, and it works perfectly except when the user's password expires or they have "User must change password at next login" set on their acco

Geographic Data on Django

2011-07-26 Thread Dan H
Hey I am building a website similar to Yelp. I want users to be able to submit data on their interface with a particular establishment. I want a user to be able to find this establishment either by searching the database or by gps, using google maps api. How would I store the geographic data in the

Re: Django, Apache, MySQL on Windows in Production

2011-07-26 Thread Dimitry Zolotaryov
Thanks to everyone for your time. Michael, I have found a similar GIL-related issue on ServerFault: http://groups.google.com/group/django-users/browse_thread/thread/4c42b458fd5bfba9 Are there ways to code around this limitation? What versions were you running when you encountered these issues? T

Re: ALL CAPS input and Sentence case

2011-07-26 Thread christian.posta
Awesome, I'll take a look! Thanks! On Jul 26, 9:38 am, Kirill Spitsin wrote: > On Tue, Jul 26, 2011 at 07:19:46PM +0300, Kirill Spitsin wrote: > > On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote: > > > For user input, I would like to format what they enter into 'sentence > > > cas

Re: Geographic Data on Django

2011-07-26 Thread Andre Terra
http://geodjango.org/ GL! Cheers, AT On Tue, Jul 26, 2011 at 5:00 PM, Dan H wrote: > Hey I am building a website similar to Yelp. I want users to be able > to submit data on their interface with a particular establishment. I > want a user to be able to find this establishment either by searchi

Re: Accessing "request" from within an authentication backend

2011-07-26 Thread Scott Gould
I'd raise a custom exception (e.g. "PasswordExpiredError") and handle the message creation in the view. On Jul 26, 3:59 pm, Steven Smith wrote: > Is there a way to access the HttpResponse, or issue a redirect from > within a custom authentication backend? I have Django hooked up to our > Active D

Re: Geographic Data on Django

2011-07-26 Thread Gmail - neonmark
Check out this site - with source - uses postgis and does something similar, perhaps, to what you want. https://github.com/openplans/fixcity On 7/27/2011 8:00 AM, Dan H wrote: Hey I am building a website similar to Yelp. I want users to be able to submit data on their interface with a particula

Re: Database doubt

2011-07-26 Thread Gmail - neonmark
its also explained quite well how to do this manually - simply follow the tutorial on the site. https://docs.djangoproject.com/en/1.3/ On 7/26/2011 11:50 PM, vaibhav agarwal wrote: Hey, I am coding in django for the first time and I had this doubt about database.At the start of coding , you a

Different results for same queryset on devserver and testserver

2011-07-26 Thread innervision
Hi, I'm experiencing the weirdest of errors with one of my tests. What happens is the following: I create a queryset by on a model that has (among other fields) an 'author' and a 'public' field. I want to limit an anonymous user to only view those instances marked as "public=True", so I do the usu

Aw: Re: Fieldsets in Admin Inline

2011-07-26 Thread Juergen Schackmann
thanks a lot for googling this link (somehow google decided to hide it from me :-) ) it works for me! just one word warning with the link: the code as described does not work for me, since the parent Admin refers to field in its fieldsets attribute that refer to the child and this raises the er

Re: ALL CAPS input and Sentence case

2011-07-26 Thread bruno desthuilliers
On 26 juil, 18:38, Kirill Spitsin wrote: > > You can try this code, seems to do what you > want:http://mail.python.org/pipermail/tutor/2004-September/031859.html > Looks a bit complicated (and with some useless code here and there) to me, but that's a problem I never tried to solve. OTHO, doing

Re: Has anyone used the "djangoles-tutorial.pdf" tutorial?

2011-07-26 Thread William C Grisaitis
Dear James, Gath, and others, Thanks for your help! I think I have the problem mostly solved by now. Basically, I didn't know how to add a view to the urls.py file when I made a new view in an app. I think I have it figured out now. :) Originally I was doing something like this in urls.py: urlpa

any recipes for 'live' updating a site with model changes

2011-07-26 Thread Gelonida N
Hi, Let's imagine I have a web server running with a Django application. Now I want to install an update (with a modified model) Is there any recommended way to upgrade such a server? Are there any tools helping with such upgrades or with creating upgrade scripts? If I had to do it 'manually' t

Re: Import error

2011-07-26 Thread bruno desthuilliers
On 26 juil, 18:59, shakthi wrote: > i am implementing the django admin interface in my site. > after changing the settings and the urls file, i am getting an import > error on the web browser. > the error was "import error" > "No module named urls" > > also when i check for that file by giving the

Re: Re: Fieldsets in Admin Inline

2011-07-26 Thread Micky Hulse
Awesome! Glad that helped and thanks for the warning. One of these days I will need this functionality myself. :) Have a great day! Cheers, Micky -- 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

Re: Different results for same queryset on devserver and testserver

2011-07-26 Thread innervision
By the way, I forgot to point out that this is actually a GeoQuerySet, so that might explain the rarity of the issue. Cheers, David On Jul 26, 2:16 pm, innervision wrote: > Hi, > > I'm experiencing the weirdest of errors with one of my tests. What > happens is the following: I create a queryset

Re: any recipes for 'live' updating a site with model changes

2011-07-26 Thread Shawn Milochik
Just use South. That's exactly what it was made for. 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 d

admin.py: is it safe to store the request in an XXXAdmin object?

2011-07-26 Thread Fred Janon
Hi, Is it safe to store the request in the OrderAdmin instance as in the code below? Or are the OrderAdmin instances shared across requests? class OrderAdmin(admin.ModelAdmin): ... def get_form(self, request, *args, **kwargs): # Stash the request so we can access the current user in f

Re: Built-in template tags and filters

2011-07-26 Thread Karen Tracey
On Sun, Jul 24, 2011 at 9:07 AM, Uffe wrote: > When attempting to use the template feature for *looping over a list of > lists* (see manual extract below), I get: > > "TemplateSyntaxError: 'for' statements with five words should end in > 'reversed': for x, y in points" (django_0_96) > > Trying to

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Mike Dewhirst
On 27/07/2011 1:48am, christian.posta wrote: Forgive me if this might be more of a python-centric or text-handling question more than Django, but it does come up within the context of web development, processing user input, etc in all web frameworks including django. I did a quick search on the f

Re: Database doubt

2011-07-26 Thread Mike Dewhirst
As someone else said to another person today - use South http://south.aeracode.org/docs/about.html It will read your updated models and apply the changes to the database. It is brilliant. Mike On 27/07/2011 6:20am, Gmail - neonmark wrote: On 7/26/2011 11:50 PM, vaibhav agarwal wrote: Hey,

Aw: Re: any recipes for 'live' updating a site with model changes

2011-07-26 Thread Juergen Schackmann
I will publish a new app to maintain models dynamically at runtime on the weekend -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eWnQvLa89CYJ. To post to

Re: drag and drop rows on django admin

2011-07-26 Thread Derek
On Jul 26, 11:03 am, Tom Evans wrote: > On Tue, Jul 26, 2011 at 6:32 AM, rahul jain wrote: > > Tried this snippet but not working > > >http://djangosnippets.org/snippets/2306/ > > > Anyone else tried it, I would like to drag and drop rows on django admin. > > > Thanks. > > > RJ > > 1) Resending t

Re: USE_I18N vs. USE_L10N

2011-07-26 Thread kenneth gonsalves
On Tue, 2011-07-26 at 15:09 +0100, Tom Evans wrote: > I strongly disagree, i18n and l10n have explicit and well known > technical meanings, dating from the late 80s. It is right and proper > to use those names in django, as they are used in every other project > under the sun. +1 -- You receive