Re: form CharField null vs blank

2011-04-28 Thread bjornsteinarfjeldpetter...@gmail.com
On Apr 29, 7:25 am, Michael Radziej wrote: > On Thu, 28 Apr 2011 06:18:08 -0700, Brian Craft > wrote: > > A form with a CharField seems to end up with a zero-length string in > > the cleaned_data if the field is not in the form data. Is there any > > good way to avoid this? > > Django docs say:

Re: form CharField null vs blank

2011-04-28 Thread Michael Radziej
On Thu, 28 Apr 2011 06:18:08 -0700, Brian Craft wrote: > A form with a CharField seems to end up with a zero-length string in > the cleaned_data if the field is not in the form data. Is there any > good way to avoid this? Django docs say: "Note that empty string values will always get stored as

Re: Unicode problems

2011-04-28 Thread Michael Radziej
On Thu, 28 Apr 2011 00:49:40 -0300, Daniel França wrote: > I'm getting a lot of problems saving and reading from files with special > characteres in name, using the django-avatar lib. > > The truth is that I don't really understand the way python/django handle > unicodes, for example, I suspect

Re: cx_Oracle error: ImproperlyConfigured

2011-04-28 Thread kamal sharma
Yes you are correct, that the reason i have replaced the below line in "app.wsgi", but that does not works. #os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib" #os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0" os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/produc

Re: Using User.add_to_class

2011-04-28 Thread Venkatraman S
Resending : On Wed, Apr 27, 2011 at 4:13 PM, Venkatraman S wrote: > Hi, > > In my app, i have many functions added to the User class using > User.add_to_class ; these are basically the functions that restrict the > objects that can be viewed by the user during his session with the app. The > fu

staticfiles - media and static folders, any way to avoid duplicated content?

2011-04-28 Thread Aljoša Mohorović
if i support both staticfiles and django.contrib.staticfiles i need to copy content from media folder to static folder so when i create a python package i have media and static folders with the same content. any way to avoid this and still support both? Aljosa Mohorovic -- You received this mess

Re: Is there a more basic tutorial?

2011-04-28 Thread byront
I understand, thanks for the advice everyone. -Byron On Apr 26, 5:24 pm, Lachlan Musicman wrote: > On Wed, Apr 27, 2011 at 04:34, byront wrote: > > Hello, > > > I went through the beginners tutorial and am interested in Django. I > > new to web development altogether and am having trouble findin

Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-28 Thread Margie Roginski
Hi Karen, I have a bit of time on my hands and was going to run through your book to cement my understanding of the best way to test. I started out and was immediately confronted with the fact that there seem to be some differences between django 1.1 and django 1.2 in terms of testing. At a minim

Re: How i connect my PostgreeSQL to a Django?

2011-04-28 Thread Flaviu Simihaian
Lucas, Check this resource out: http://docs.djangoproject.com/en/1.3/intro/tutorial01/#database-setup It's best to start with sqlite3 and make sure that works, then look at installing PostgreSQL or MySQL. I wrote a quick and dirty setup of Postgres on an OS X dev environment: http://readncode.c

Re: cx_Oracle error: ImproperlyConfigured

2011-04-28 Thread kamal sharma
Hi Again, I have finished my implementation with the local db, but now stuck in major issue.When i try to login to the local oracle database then it is working perfectly fine.I am able to read the data from the db installed in the same UNIX machine. But when i tried to login a db installed in rem

Re: Transform words into links with regex

2011-04-28 Thread Shawn Milochik
You need to use mark_safe. Otherwise Django will be protecting you from potential malicious input. http://docs.djangoproject.com/en/1.3/ref/utils/#django.utils.safestring.mark_safe -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Transform words into links with regex

2011-04-28 Thread martinez
Hello. I am using Django 1.3 on Windows XP. I read a tutorial and the code below transforms the words like MyLink into a html link. But the output that I achieved is the HTML markups of the link, not the link itself. How to solve that? Thank you. wikilink = re.compile("\\b([A-Z][a-z]+[A-Z][a-z]+)\

Re: URLs in error messages from form validation

2011-04-28 Thread Derek
On Apr 28, 12:33 pm, Tom Evans wrote: > On Mon, Apr 25, 2011 at 11:40 PM, Daniel Gerzo wrote: > > PS: I'm just wondering where did you find this? I was looking around the > > documentation and was unable to get any trace of such a function... > > http://docs.djangoproject.com/en/1.3/ref/utils/#mo

Override a static file.

2011-04-28 Thread Fabian Ezequiel Gallina
Hey folks, I'm wondering if there is any preferred way to override staticfiles. The use case is that I modified some grapelli static file and I would like my version of it to be the final one after collectstatic is run. Regards, -- Fabián E. Gallina http://www.anue.biz -- You received this

Uploaded file in django doesn't have RIFF id

2011-04-28 Thread Rafał Łużyński
I upload .wav file to django, and problem is that lib wave from python, can't open it 'cause it doesnt have RIFF id. I made this test: print request.FILES['file'].read(20) f = open('C:/audio_test/Cricket.wav') print f.read(20) validation, error = sa.validation(request.FILES['file']) I print first

RE: This section is converting database table to excel file

2011-04-28 Thread Sells, Fred
Since Excel will import a csv file, why not just write a csv file. In mysql, while ugly, you could shell down and use the mysql command line options to export a query to csv. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Od-Erdene Ch Sent: Thursday,

form CharField null vs blank

2011-04-28 Thread Brian Craft
A form with a CharField seems to end up with a zero-length string in the cleaned_data if the field is not in the form data. Is there any good way to avoid this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Extremely Frustrated

2011-04-28 Thread Brian Bouterse
Also while in vim, you can show all symbols in the file directly as symbols. This makes tabs versus spaces trivial to identify. To enter this mode use the following command in vim. :set list and to exit this mode use :set nolist See the documentation here

Re: pycharm change django project directory

2011-04-28 Thread Xavier Ordoquy
Hi, I also use pycharm. Go in the configuration / Django Support and fills the fields (including enable django support). Looks like it has not been reconized out of the box since the django project seems to be in your subdirectories and there seems to be more than one project. Regards, Xavier.

pycharm change django project directory

2011-04-28 Thread SK
I clone a directory from hg in pycharm such like this: directory (clone from this level) doc server webs d_web1(this is a django project) d_web2(another django project) ... the d_web1 can't be recognized as a django project in pycharm anyone can help me, thx

Re: annotate() for subgroups within a column

2011-04-28 Thread Tom Evans
On Thu, Apr 21, 2011 at 9:22 PM, Ariana wrote: > Hi everyone, > > > > If it helps at all, this could be accomplished with the following SQL: > > SELECT updatee, score, id >   FROM Update >   WHERE lastUpdated = ( >       SELECT max(lastUpdated) >       FROM Update as u >       WHERE u.updatee

Re: URLs in error messages from form validation

2011-04-28 Thread Tom Evans
On Mon, Apr 25, 2011 at 11:40 PM, Daniel Gerzo wrote: > PS: I'm just wondering where did you find this? I was looking around the > documentation and was unable to get any trace of such a function... > http://docs.djangoproject.com/en/1.3/ref/utils/#module-django.utils.safestring Cheers Tom --

This section is converting database table to excel file

2011-04-28 Thread Od-Erdene Ch
*hi there* *this section is converting database table to excel file.* *problem is when converting database table to excel file (it is containing 6400 [six thousand four hundred] rows) it is spending more than 10 minutes.* *that is very slow. is there any idea to make more faster. Help me* *CODE:

Re: Double security login system

2011-04-28 Thread Mike Ryan
There is some discussion of two-factor auth systems in Django over at StackOverflow [1]. One of the answers links to an example app that implements two-factor auth [2], which sounds pretty close to what you are looking for (although you would need to replace their second factor with one of your own

Re: Extremely Frustrated

2011-04-28 Thread Tom Evans
On Thu, Apr 28, 2011 at 8:47 AM, Kenneth Gonsalves wrote: > On Thu, 2011-04-28 at 00:27 -0700, Derek wrote: >> A good IDE will convert tabs to spaces for you save you hours of >> frustration! > > tab-nanny is also your friend Or in vim: :set expandtab shiftwidth=4 tabstop=4 | retab Short for

Re: Extremely Frustrated

2011-04-28 Thread Kenneth Gonsalves
On Thu, 2011-04-28 at 00:27 -0700, Derek wrote: > A good IDE will convert tabs to spaces for you save you hours of > frustration! tab-nanny is also your friend -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because y

Re: Extremely Frustrated

2011-04-28 Thread Derek
On Apr 25, 3:53 pm, Gandeida wrote: > Hello, > > I am running version 1.3. > > After copying and pasting about 20 more times, but getting the error > sporadically, I have found that the issue was the tab characters that > were being automatically generated to keep my indentation level.  I've > cha