Re: User Registration -> Password not saving

2011-09-22 Thread Daniel Roseman
On Wednesday, 21 September 2011 23:42:02 UTC+1, Kurtis wrote: > > Hey, > > I've created my own User Registration FormView. Everything seems to > work great except the password is always saved as "!". I can change > that with the "password changer" in the admin section of the site. I > am usin

Admin - formset validation with counting checked elements

2011-09-22 Thread galgal
I make a mini poll system. To each question choices are related via FK. In admin I use Inline choices. Each choice has "correct" field (Boolean). When saving a poll I need to check if there is minimum 1 choice with "correct" selected. Which function in admin I must use, to do that validation? -

Re: changes to .py file is not reflected until server is restarted.

2011-09-22 Thread Thomas Orozco
Sightly off topic, but your .py files seem to be exposed by your webserver - you shouldn't do this or anyone could download them! Le 22 sept. 2011 08:02, "kenneth gonsalves" a écrit : > On Wed, 2011-09-21 at 19:37 +0100, Cal Leeming [Simplicity Media Ltd] > wrote: >> Oh jeez - modpython, I've nfi

Re: Admin - formset validation with counting checked elements

2011-09-22 Thread BILLION Sébastien
Le jeudi 22 septembre 2011 11:42:56, galgal a écrit : I make a mini poll system. To each question choices are related via FK. In admin I use Inline choices. Each choice has "correct" field (Boolean). When saving a poll I need to check if there is minimum 1 choice with "correct" selected. Which

Re: Admin - formset validation with counting checked elements

2011-09-22 Thread galgal
But I need to do checks in Admin, not my view. I can't find a method to validate in Admin. -- 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/-/rRHhnv1GGfEJ. To

Re: Admin - formset validation with counting checked elements

2011-09-22 Thread BILLION Sébastien
Le jeudi 22 septembre 2011 11:56:09, galgal a écrit : But I need to do checks in Admin, not my view. I can't find a method to validate in Admin. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://

Re: Admin - formset validation with counting checked elements

2011-09-22 Thread galgal
I have my model done, the only thing is - how to validate if 1 or more checkboxes are checked. It should be done in admin - choices are displayed via Inline. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web vi

Re: Admin - formset validation with counting checked elements

2011-09-22 Thread BILLION Sébastien
Le jeudi 22 septembre 2011 12:13:20, galgal a écrit : I have my model done, the only thing is - how to validate if 1 or more checkboxes are checked. It should be done in admin - choices are displayed via Inline. -- You received this message because you are subscribed to the Google Groups "Dja

Internationalization

2011-09-22 Thread nadae ivar
hi, i have a application in french i wanna use internationalization to change language at each request if the broswer in english turn it in english if the broser in french turn it in french -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Internationalization

2011-09-22 Thread Maksymus007
and of course you did check django documentation under internationalization section?:) Pozdrawiam, Maksymilian Pawlak 22-09-2011 12:30 użytkownik "nadae ivar" napisał: > hi, > i have a application in french i wanna use internationalization to > change language at each request if the broswer in en

Django tutorials

2011-09-22 Thread ANKUR AGGARWAL
Hey I am currently searching for django video tutorials. I am unable to find them on web. Was expecting them at lynda.com but they doesn't provide any type of django tuts. So please provide me the links :) Thanks in advance :) Regards Ankur Aggarwal -- You received this message because you are s

purpose of ADMIN_MEDIA_PREFIX

2011-09-22 Thread Jibin
Hi if i am setting up apache to serve static files(js,css,jpg,pdf,mp4) by adding the following Alias /media/ 'D:/Projects/Dan/Django/site_media/' Order deny,allow Allow from all ,should i set the variable ADMIN_MEDIA_PREFIX in settings.py. I mean anyways any thing matching /media/ will be ser

Re: Django tutorials

2011-09-22 Thread BILLION Sébastien
Le jeudi 22 septembre 2011 07:18:29, ANKUR AGGARWAL a écrit : Hey I am currently searching for django video tutorials. I am unable to find them on web. Was expecting them at lynda.com but they doesn't provide any type of django tuts. So please provide me the links :) Thanks

Re: Django tutorials

2011-09-22 Thread delegbede
Django itself has a good tut for starters except you are a video person. The django tutorial should get you started. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: ANKUR AGGARWAL Sender: django-users@googlegroups.com Date: Thu, 22 Sep 2011 10:48:29

Is Satchmo a good framework?

2011-09-22 Thread Renato Beserra
Hi guys, I have done a few django projects with complete success and now i am about to start a simple online store. I was considering to use some php framework, but then i saw Satchmo and its features page convinced me to use it. But i didn't know sactchmo before and so i would like to as you a

Re: Is Satchmo a good framework?

2011-09-22 Thread kenneth gonsalves
On Thu, 2011-09-22 at 08:45 -0300, Renato Beserra wrote: > 1) Is satchmo a good choice for a simple project? it is good - but for a simple project you may may also look at satchless. > > 2) How different is it from a regular django app? I mean, will my > Django background - and code - be useful?

Re: Django tutorials

2011-09-22 Thread Anoop Thomas Mathew
You can try peepcode.com and thinkvitamin.com . They have good quality video tutorials. Not just django, many handy tools needed while developing for web. One thing, they are paid. Thanks, Anoop Thomas Mathew On 22 Sep 2011 16:49, "ANKUR AGGARWAL" wrote: > Hey > I am currently searching for djang

Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
Hi all, I developed a Django application (named "manouche") using south. Thus I have some migrations which build my database. I want to setup a testing environment where I want to begin with a clean db, create it with syncdb, migrate my application, load current fixtures and run tests. My instal

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
Sure my application depends on the site app, I'm importing Site in my models.py. But manouche is already at the bottom of the list, so this does not work. 2011/9/22 J. Cliff Dyer : > Try putting manouche at the bottom of your installed apps list. It looks > like it depends on the site app being in

Re: Testing: create db from scratch not working

2011-09-22 Thread J. Cliff Dyer
Try putting manouche at the bottom of your installed apps list. It looks like it depends on the site app being installed, but when django loads the manouche.models file, it hasn't loaded sites yet. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Leonardo Giordani wrote:

Re: Https with runserver

2011-09-22 Thread Bjarni Rúnar Einarsson
Another way, would be to use PageKite. The service provides a wildcard SSL cert for all *.pagekite.me names. From the command line: curl http://pagekite.net/pk/pagekite-0.4.py >pagekite.py python pagekite.py 8000 yourname.pagekite.me Answer the account creation questions and then go to htt

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
Sorry, I guess I should've posted that as well :) import string class PasswordField(forms.CharField): # Setup the Field def __init__(self, *args, **kwargs): super(PasswordField, self).__init__(min_length = 7, required = True, label = u'Password',

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
This is very strange for me: even flatpages depends on Site /usr/local/lib/python2.6/dist-packages/django/contrib/flatpages/models.py:from django.contrib.sites.models import Site but there is no problem in listing both in INSTALLED_APPS and to syncdb them togheter. My application depends on Site

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
Ok, solved. The problem was the following declaration in my models.py current_site = Site.objects.get_current() which tries to read the current site at registration time, before sites has been properly filled with values. I just replaced every use of current_site with a call to get_current() and

Programming logic in Classed Based FormView or in the Form Itself?

2011-09-22 Thread Kurtis
Hey, I'm trying to figure out the best way to do this. I have a FormView and an associated Form. In my Form, I take care of all of the validation and cleaning as far as the input goes. However, I need to put in some more logic such as saving the user, logging in a user, and whatever else the futu

Re: Internationalization

2011-09-22 Thread nadae ivar
i check it but not undestand On Sep 22, 10:40 am, Maksymus007 wrote: > and of course you did check django documentation under internationalization > section?:) > > Pozdrawiam, Maksymilian Pawlak > 22-09-2011 12:30 użytkownik "nadae ivar" napisał:> hi, > > i have a application in french i wanna u

Re: Https with runserver

2011-09-22 Thread Bjarni Rúnar Einarsson
Following up to myself (sorry for the spam) - please replace "yourname" with something you invented yourself. Everyone signing up for yourname.pagekite.me is really not going to work very well. :-) 2011/9/22 Bjarni Rúnar Einarsson : > Another way, would be to use PageKite. The service provides a w

Dealing with misc parts of a project

2011-09-22 Thread Simon Connah
When writing a project in Django it is a common occurrence that there are some small elements that must be shared between all applications in the project but that do not fit within the context of any of the apps as it would break encapsulation. I'm thinking about things such as terms and conditi

Re: User Registration -> Password not saving

2011-09-22 Thread Daniel Roseman
On Thursday, 22 September 2011 15:18:15 UTC+1, Kurtis wrote: > > Sorry, I guess I should've posted that as well :) > > import string > class PasswordField(forms.CharField): > > # Setup the Field > def __init__(self, *args, **kwargs): > super(PasswordField, self).__init__(min_le

Re: Internationalization

2011-09-22 Thread Andres Reyes
If you could provide more information as to what you don't understand and what have you tried so far we could be of more assistance 2011/9/22 nadae ivar > i check it but not undestand > > On Sep 22, 10:40 am, Maksymus007 wrote: > > and of course you did check django documentation under > intern

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
Thanks Daniel! You were right on cue with that. I tried your code and for some reason the value is being returned as a standard string instead of a unicode string, as far as I can tell. (Effectively, my password and passwordConfirm are not matching anymore). Hopefully once I get that worked out, th

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
I was wrong. There wasn't any issue with the unicode. Your fixed worked perfectly. I just had to change my comparison from password is not password_confirm to password != password_confirm and it's working great now. Thanks a lot! On Thu, Sep 22, 2011 at 12:04 PM, Kurtis Mullins wrote: > Thank

Re: Dealing with misc parts of a project

2011-09-22 Thread Micky Hulse
On Thu, Sep 22, 2011 at 8:54 AM, Simon Connah wrote: > So do you just tend to create a new misc app to hold all these little bits > and pieces or is there a convention for such things? I asked a similar question here: For

Re: Programming logic in Classed Based FormView or in the Form Itself?

2011-09-22 Thread Xavier Ordoquy
Hi, Nothing prevents you to put your tests in the form_valid and render the same page with your errors. Regards, Xavier, Linovia. Le 22 sept. 2011 à 17:14, Kurtis a écrit : > Hey, > > I'm trying to figure out the best way to do this. I have a FormView > and an associated Form. In my Form, I t

Re: Is Satchmo a good framework?

2011-09-22 Thread Bill Freeman
On Thu, Sep 22, 2011 at 7:56 AM, kenneth gonsalves wrote: > On Thu, 2011-09-22 at 08:45 -0300, Renato Beserra wrote: >> 1) Is satchmo a good choice for a simple project? > > it is good - but for a simple project you may may also look at > satchless. >> >> 2) How different is it from a regular djan

Re: Django tutorials

2011-09-22 Thread Mengu
django from the ground up series is good. watch at http://showmedo.com/videotutorials/series?name=PPN7NA155 On Sep 22, 8:18 am, ANKUR AGGARWAL wrote: > Hey > I am currently searching for django video tutorials. I am unable to find > them on web. Was expecting them at lynda.com but they doesn't p

Re: Dealing with misc parts of a project

2011-09-22 Thread DrBloodmoney
On Thu, Sep 22, 2011 at 12:30 PM, Micky Hulse wrote: > On Thu, Sep 22, 2011 at 8:54 AM, Simon Connah > wrote: >> So do you just tend to create a new misc app to hold all these little bits >> and pieces or is there a convention for such things? > > For a few projects at work, we use a "global"

Help me understand the django.request logger

2011-09-22 Thread Roy Smith
I'm running django 1.3, python 2.6. I'm trying to write a custom formatter for the django.request logger. I need to log one of the headers from the HTTP request. The documentation for django.request (https://docs.djangoproject.com/en/1.3/topics/logging/) says: Messages to this logger have t

Re: Programming logic in Classed Based FormView or in the Form Itself?

2011-09-22 Thread DrBloodmoney
On Thu, Sep 22, 2011 at 11:14 AM, Kurtis wrote: > Hey, > > I'm trying to figure out the best way to do this. I have a FormView > and an associated Form. In my Form, I take care of all of the > validation and cleaning as far as the input goes. > > However, I need to put in some more logic such as s

Re: Dealing with misc parts of a project

2011-09-22 Thread Simon Connah
On 22/09/2011 19:50, DrBloodmoney wrote: On Thu, Sep 22, 2011 at 12:30 PM, Micky Hulse wrote: On Thu, Sep 22, 2011 at 8:54 AM, Simon Connah wrote: So do you just tend to create a new misc app to hold all these little bits and pieces or is there a convention for such things? For a few projec

Re: Django tutorials

2011-09-22 Thread Gustavo Velazquez
thank's El día 22 de septiembre de 2011 15:21, Mengu escribió: > django from the ground up series is good. > > watch at http://showmedo.com/videotutorials/series?name=PPN7NA155 > > On Sep 22, 8:18 am, ANKUR AGGARWAL wrote: >> Hey >> I am currently searching for django video tutorials. I am unab

Can you trigger a forms style error from a view?

2011-09-22 Thread John Shaver
I'm designing a user registration form for my app. I need to verify that the username they're using is not already in use before trying to create the user. If the username already exists, I want to be able to generate a form style error that says "Sorry that username is already in use." The only

Re: Help me understand the django.request logger

2011-09-22 Thread Roy Smith
Ugh, I got it figured out. I totally misunderstood what the docs were saying. I was thinking that somehow the django.request logger magically found the request object and stuck it into the context. That's not what it was saying at all. All the quote from the docs really means is that all the pla

Re: Help me understand the django.request logger

2011-09-22 Thread Russell Keith-Magee
On Fri, Sep 23, 2011 at 5:56 AM, Roy Smith wrote: > Ugh, I got it figured out.  I totally misunderstood what the docs were > saying.  I was thinking that somehow the django.request logger > magically found the request object and stuck it into the context. > That's not what it was saying at all.  A

Upload permissions

2011-09-22 Thread Robert Steckroth
Hey Gang, I have created a simple user profile area with an Avatar image upload system. It works great on my localhost but gives a permission error on the server. Has anyone ran into this and found a quick answer? The upload media url is a wsgi process and is not used in the file.open() command. T

Re: Is Satchmo a good framework?

2011-09-22 Thread Renato Beserra
Thank you very much for the answers. Kenneth, i took a look at satchless but i think satchmo will fit my porpouses better. But knowing it is 100% Django is really useful:). Bill, Good to know of this lack of flexibility. But thankfully the point 1 you mentioned, won't be a problem and 2. i will

Re: Upload permissions

2011-09-22 Thread Robert Steckroth
Allright, I fixed it. This did the trick --> destination = open(settings.MEDIA_ROOT+'userAvatarDir/'+fName, 'wb+') On Thu, Sep 22, 2011 at 9:55 PM, Robert Steckroth wrote: > Hey Gang, I have created a simple user profile area with an Avatar > image upload system. It works great on my local

Re: Internationalization

2011-09-22 Thread Mike Dewhirst
On 23/09/2011 1:45am, nadae ivar wrote: i check it but not undestand It takes a bit of study and much concentration. I tried it understand it myself recently and posed some questions here and got some very good answers and had my understandings corrected at the time. I still haven't implemen