Re: Dynamic forms?

2009-04-28 Thread Matias Surdi
tdelam escribió: > Hi Guys, > > This might get lengthy but I am trying to get some insight on the best > way to generate some dynamic forms in a template. The project is a > survey. Here is my questions model: > > class Question(models.Model): > TRUEFALSE = 1 # a radio button yes/no questi

Re: How to deal with problem about ForeignKey

2009-04-28 Thread Marcelo Ramos
On Wed, Apr 29, 2009 at 2:57 AM, Vincent wrote: > Hi, > I got a problem like this: > class A(models.Model): >     id = models.AutoField(primary_key=True) >     field1 = models.TextField() > class B(models.Model): >     a = models.ForeignKey(A) >     field1 = models.TextField() > then there are so

How to deal with problem about ForeignKey

2009-04-28 Thread Vincent
Hi, I got a problem like this: class A(models.Model): id = models.AutoField(primary_key=True) field1 = models.TextField() class B(models.Model): a = models.ForeignKey(A) field1 = models.TextField() then there are some records of A/B, how can i delete records of A and do not delet

Re: FileField uploading into an user-specific path

2009-04-28 Thread Carlos A. Carnero Delgado
Oops, too quick to press reply :o On Tue, Apr 28, 2009 at 11:53 PM, Carlos A. Carnero Delgado > destination_file = open('somewhere based on the user', 'wb+') >  for chunk in request.FILES['audio_file'].chunks(): >      destination_file.write(chunk) >  destination_file.close() with this method yo

Re: FileField uploading into an user-specific path

2009-04-28 Thread Carlos A. Carnero Delgado
Hello, 2009/4/28 Julián C. Pérez : > > anyone?? > how can i make that happen?? What's wrong with having something like the following in the view that processes the form? destination_file = open('somewhere based on the user', 'wb+') for chunk in request.FILES['audio_file'].chunks(): de

Django on Amazon EC2

2009-04-28 Thread Joshua Partogi
Dear all, In favor of choosing Google app engine to run our Django apps, we are also considering Amazon EC2 because from what we've read we are not tightly locked into Google API. Has anyone here had any experience on deploying django apps on Amazon EC2 that would like to share their experience

Re: url template tag help

2009-04-28 Thread TheCorp
I just found on that having underscores in your view names seems to make some regex stuff for django go funky. Try changing your view names to not have underscores so maybe viewAboutPage or something. Good luck :) On Apr 28, 6:06 pm, Julián C. Pérez wrote: > hi everyone > i need some help over h

Re: Problem with uploading a ImageField through ModelForm

2009-04-28 Thread phan sarak
please make sure you have corrected like this *setting.py* MEDIA_ROOT = '*site_media*' #make sure your have it already!! and it's your problems also TEMPLATE_DIRS = ( 'templates', ) *models.py* = from django.db import models class photos(models.Mode

Re: FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
ok, you're right... sorry for the rush i can wait ;) On Apr 28, 8:12 pm, Russell Keith-Magee wrote: > 2009/4/29 Julián C. Pérez : > > > > > anyone?? > > how can i make that happen?? > > You asked your original question 4 hours ago. This is an international > mailing list. Many of the audience fo

Re: FileField uploading into an user-specific path

2009-04-28 Thread Russell Keith-Magee
2009/4/29 Julián C. Pérez : > > anyone?? > how can i make that happen?? You asked your original question 4 hours ago. This is an international mailing list. Many of the audience for your message are asleep. Please show some patience. If you have a more immediate need please try a more immediate

Re: FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
anyone?? how can i make that happen?? On Apr 28, 3:41 pm, Julián C. Pérez wrote: > hi u all > i'm progressing in my django wisdom jeje > but everyday i face new challenges and/or problems... > 'im working on a uploading files application... > and i want to store every uploaded file into its righ

url template tag help

2009-04-28 Thread Julián C . Pérez
hi everyone i need some help over here... please! i don't know what it's wrong... the url i'm trying to get around is: http://proyName/about/ the error: "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." in a template, the dispatcher of the error:

Re: Forms vs Formsets vs Sessions vs FormWizard ??

2009-04-28 Thread TheCorp
As a note, I found this post which basically describes my current issue. http://groups.google.com/group/django-users/browse_thread/thread/70c01c357d2f5e9b/6b0ec468b69398cd?lnk=gst&q=best+practice+error+form#6b0ec468b69398cd The only problem is that I can't use the PRG approach. Half way through

Re: Does anyone know how to prepopulate a form with model data

2009-04-28 Thread Milan Andric
On Apr 9, 1:02 am, Daniel Roseman wrote: > On Apr 9, 2:55 am, codecowboy wrote: > > > > > I want to create aformthat allows a user to edit his/her profile.  I > > don't want to bind myformto a model because theformwill involve > > two different models.  Does anyone have any ideas.  I've read c

Forms vs Formsets vs Sessions vs FormWizard ??

2009-04-28 Thread TheCorp
Hey all, fairly new to the Django community and trying to get a small side project going. Basically im running into an issue with architecture in that I am not sure how to proceed. Basically I am trying to code up a reservation system which spans a few pages. Select a few things, input some text,

Re: After upgrade from .96 to 1.0.2 -- 'NoneType' object has no attribute '_meta'

2009-04-28 Thread Malcolm Tredinnick
On Tue, 2009-04-28 at 15:00 -0700, thebigape wrote: > Okay... this is a Macbook running apache2/osx 10.4.11 The Django > Admin interface worked fine with my app prior to the failed port. > Since my upgrade the only thing I've found that doesn't work is the > Admin interface. I've uninstalled

After upgrade from .96 to 1.0.2 -- 'NoneType' object has no attribute '_meta'

2009-04-28 Thread thebigape
Okay... this is a Macbook running apache2/osx 10.4.11 The Django Admin interface worked fine with my app prior to the failed port. Since my upgrade the only thing I've found that doesn't work is the Admin interface. I've uninstalled and reinstalled Error message given: AttributeError

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Thank you, is the exclude what I need, the serial doesn't allow nulls, only empty strings. Thank you John and Alex. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Limiting Choices of a ForeignKey with 'self'.

2009-04-28 Thread Jamie
I have the same problem and am hoping that a solution to one will work for both of us. In my case, I am working on an online newspaper site. My models for this particular app are Issue and Article. Articles are assigned to Issues so that they can all be published when the issue is published. That

Re: link to a local file for download?

2009-04-28 Thread Malcolm Tredinnick
On Tue, 2009-04-28 at 15:24 -0500, Danny Brown wrote: > check your file permissions. Must be readable by www-data Not for a file link, no. Since it won't go back to the web-server. The file:// schema tells the browser that this is a local file. The http:// and https:// protocol, on the other hand

FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
hi u all i'm progressing in my django wisdom jeje but everyday i face new challenges and/or problems... 'im working on a uploading files application... and i want to store every uploaded file into its right path, arranged by username example... if a user called 'user123' uploads a file from a reg

Re: Problem with uploading a ImageField through ModelForm

2009-04-28 Thread Aaron
Hey, this looks like the same problem I had earlier. The gotcha was that I needed enctype="multipart/form-data" in my form tag, like Hope this isn't too late! Aaron On Mar 9, 5:34 am, Marek Wawrzyczek wrote: > Hi, > > I've got the code like this: > > class Photo(models.Model): >     image = m

Re: link to a local file for download?

2009-04-28 Thread Danny Brown
check your file permissions. Must be readable by www-data On Tue, Apr 28, 2009 at 1:27 PM, Cai Yizhi wrote: > Dear Malcolm, > > Thanks for your reply. I put the full path: > > > href="file:///Users/caiyizhi/Dropbox/Programming/Django/genocad_prolog/prolog_compiler/bin/2009-04-28_12- > 02-29_res

Trying to figure out "featured for month" view

2009-04-28 Thread bax...@gretschpages.com
I'm trying to figure out a view for a "featured Foo for ". The thinking is we'll mark the thing we want featured and which month it should appear. So, in the model, I'm thinking featured_for_month with month_choices being the months and featured for year being something like: YEAR_CHOICES = [(st

django datetime error

2009-04-28 Thread Michel Thadeu Sabchuk
Hi guys, I'm facing strange problems with dates in django. I have an object list called from a view with the following code is ... now = datetime.datetime.now() period_limit = now - datetime.timedelta(days=30) queryset = queryset.filter( item__pub_date__lte=now, # no future items item_

Dynamic forms?

2009-04-28 Thread tdelam
Hi Guys, This might get lengthy but I am trying to get some insight on the best way to generate some dynamic forms in a template. The project is a survey. Here is my questions model: class Question(models.Model): TRUEFALSE = 1 # a radio button yes/no question MULTIPLEANSWER = 2 #

Re: Test client - session data is empty and won't save new entries

2009-04-28 Thread Stefan Wallner
So by switching from the development server to a local Apache/MySQL setup I eventually managed to get access to the session data as expected. I then narrowed down that the settings.py for those two environments had different settings for CACHE_BACKEND (don't ask me why): - Dev. server: CACHE

Re: manage.py runfcgi options

2009-04-28 Thread Alex Koshelev
Built-in help has the answers: $ ./manage.py help runfscgi On Tue, Apr 28, 2009 at 10:36 PM, Continuation wrote: > > In the doc an example of running django under fastcgi is given as: > > ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033 > > > But isn't it also necessary to tell

manage.py runfcgi options

2009-04-28 Thread Continuation
In the doc an example of running django under fastcgi is given as: ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033 But isn't it also necessary to tell django how many threads to spawn, what are the maximum number of threads, etc? Shouldn't there be more options to the command runf

Re: link to a local file for download?

2009-04-28 Thread Cai Yizhi
Dear Malcolm, Thanks for your reply. I put the full path: Test And I click on the link, nothing comes out. I am wondering how to get this done. Thanks, Patrick Yizhi Cai, GBCB Ph.D Student Virginia Bioinformatics Institute Virginia Tech,Blacksburg, VA 24061 On Tue, Apr 28, 2009 at 12:46 PM

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread John M
is it empty like " " or is it null? customer.objects.filter(serial__isnull=True) HTH On Apr 28, 9:16 am, equalium wrote: > Hello, I'm new to django. I want to retrieve a record of Customers > with an empty serial field. --~--~-~--~~~---~--~~ You received this m

Re: Error loading sqlite3

2009-04-28 Thread Gonzalo Petersen
thanks for the advise. i am using open suse 10.2 and the file i downloaded is the Python 2.6.2 compressed source tarball. as i recall, first i untared the file on my root desktop, and then from de command line from /root/Desktop/Python-2.6.2 i typed "make install". i had installed python 2.5 so i

Re: link to a local file for download?

2009-04-28 Thread Malcolm Tredinnick
On Tue, 2009-04-28 at 12:24 -0400, Cai Yizhi wrote: > Hello, > > I am a new comer to Django. I want to create hyper link pointing to a > local text file (say ~/a.txt). I am wondering how to do this in > Django? > > I have tried: > Download > > But it doesn't work. That's because "~" doesn't m

Re: Template does not work as it should

2009-04-28 Thread Malcolm Tredinnick
On Tue, 2009-04-28 at 05:02 -0700, 83nini wrote: > Hi, > > I'm trying to display a form in the following way: > 1. creating a form > 2. writing a view method that looks like this: >def contact(request): > if request.method == 'POST': > form = ContactForm(request.POST) >

Re: Finding Reason for Form.is_valid()

2009-04-28 Thread Malcolm Tredinnick
On Tue, 2009-04-28 at 04:22 -0700, Chris wrote: > What's the easiest way to get a quick synopsis of why form.is_valid() > returns false? I'm trying to unittest a form, and whenever is_valid() > fails, it takes me forever to find out why. The "form" object will have an attribute called "errors" th

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread Alex Gaynor
On Tue, Apr 28, 2009 at 12:28 PM, equalium wrote: > > Hello, I'm new to django. I want to retrieve a record of Customers > with a non empty serial field. > I try with: > Customer.objects.filter(serial<>'') > but I get an error saying that serial is not defined. > > Thank you for any help. > >

How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Hello, I'm new to django. I want to retrieve a record of Customers with a non empty serial field. I try with: Customer.objects.filter(serial<>'') but I get an error saying that serial is not defined. Thank you for any help. --~--~-~--~~~---~--~~ You received

link to a local file for download?

2009-04-28 Thread Cai Yizhi
Hello, I am a new comer to Django. I want to create hyper link pointing to a local text file (say ~/a.txt). I am wondering how to do this in Django? I have tried: Download But it doesn't work. Could anybody please help? Thanks, Patrick --~--~-~--~~~---~--~~ You

Re: Error loading sqlite3

2009-04-28 Thread Karen Tracey
On Tue, Apr 28, 2009 at 12:02 PM, Gonzalo Petersen < gonzalopeter...@gmail.com> wrote: > > hehe yes.. i ment just the second Traceback. i was following the code > and trying to figure out where the problem was.. > So what do you suggest i should do? i downloaded it from > www.python.org/download.

How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Hello, I'm new to django. I want to retrieve a record of Customers with an empty serial field. --~--~-~--~~~---~--~~ 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@

Add error message in admin app. icon_error

2009-04-28 Thread Felipe Martinez
Hi everybody! I'm starting to play around with django and I'm building a simple application with the admin app using admin actions. Every time user uses an admin action, a message shows up confirming the action was successfully exceuted: self.message_user(request, "Action was suc

Re: [Solved] Session and models.

2009-04-28 Thread Liubomir.Petrov
On Apr 28, 7:02 pm, "Liubomir.Petrov" wrote: > Found it. It was my mistake using an custom class for grouping the > data into the session. > solved after adding this to the class definition: >         def __getstate__(self): >                 return [self.var1, self.var2] >         def __setsta

Re: Session and models.

2009-04-28 Thread Liubomir.Petrov
Found it. It was my mistake using an custom class for grouping the data into the session. solved after adding this to the class definition: def __getstate__(self): return [self.var1, self.var2] def __setstate__(self, state): self.var1 = state[0]

Re: Error loading sqlite3

2009-04-28 Thread Gonzalo Petersen
hehe yes.. i ment just the second Traceback. i was following the code and trying to figure out where the problem was.. So what do you suggest i should do? i downloaded it from www.python.org/download. do you know a way to see which libraries are included? thanks! this is actually my first post ev

Re: Error loading sqlite3

2009-04-28 Thread Karen Tracey
On Tue, Apr 28, 2009 at 11:25 AM, Gonzalo Petersen < gonzalopeter...@gmail.com> wrote: > > Hello i a new to both python and django, so i'am following the > tutorials. I am having trouble loading sqlite3 > > Traceback (most recent call last): > File "manage.py", line 11, in >execute_manager(s

Re: Finding Reason for Form.is_valid()

2009-04-28 Thread Margie
I often put a break point using pdb import pdb pdb.set_trace() This causes the server (assuming you are using the django development server) to drop to the pdb prompt when it hits the set_trace(). Then I just print the form and look at the output. Margie On Apr 28, 4:59 am, Masklinn wrote:

Error loading sqlite3

2009-04-28 Thread Gonzalo Petersen
Hello i a new to both python and django, so i'am following the tutorials. I am having trouble loading sqlite3 Traceback (most recent call last): File "manage.py", line 11, in execute_manager(settings) File "/usr/local/lib/python2.6/site-packages/django/core/management/ __init__.py", line

Re: mysite.polls: __init__() got an unexpected keyword argument 'max_length'

2009-04-28 Thread Karen Tracey
On Tue, Apr 28, 2009 at 10:44 AM, bconnors wrote: > > export PYTHONPATH=/djsite/mysite > pubu...@pubuntu:~/djsite/mysite$ > pubu...@pubuntu:~/djsite/mysite$ > > pubu...@pubuntu:~/djsite/mysite$ python manage.py runserver > Traceback (most recent call last): > File "manage.py", line 2, in >f

Re: Django development on OS X. Accessing development server from local network

2009-04-28 Thread Phil Mocek
On Tue, Apr 28, 2009 at 02:03:45PM +0300, Oleg Oltar wrote: > I just wanted to make tests on development server from other PC > (with IE installed), on my local network. How can I do it? The information you seek is easily accessible to you via a number of methods that require no specific knowledg

Re: mysite.polls: __init__() got an unexpected keyword argument 'max_length'

2009-04-28 Thread bconnors
export PYTHONPATH=/djsite/mysite pubu...@pubuntu:~/djsite/mysite$ pubu...@pubuntu:~/djsite/mysite$ pubu...@pubuntu:~/djsite/mysite$ python manage.py runserver Traceback (most recent call last): File "manage.py", line 2, in from django.core.management import execute_manager ImportError: No

Multi-client capable Django projects

2009-04-28 Thread Jesaja Everling
Hello all! I want to create a Django project that can be used by several different user groups, where all user groups are strictly separated from one another. A popular example for something like this is basecamp (the Ruby on Rails showcase application), where groups can sign up to collaborate on

Python Web Developers, San Francisco, CA (locals only)

2009-04-28 Thread SrRecruiter
Python Web Developer for the world's largest publisher of social entertainment applications. We offer people the ability to engage and have fun with one another using the relationships they've already developed on social networks like Facebook and MySpace (youth market focus,18-34 y/o's). Locatio

Re: Session and models.

2009-04-28 Thread Liubomir.Petrov
Note: I didnt tested with django.core.serializers, because as it seems they only serialize a result from queryset and i need a simple row like: class Root(models.Model): pass # example only class Child(Models.model): child = models.ForeignKey(Root) .. So Root is saved in the session but

Session and models.

2009-04-28 Thread Lyubomir Petrov
Trying to store a (non saved - temporary) model (with relations) into django.contrib.session (backend - db). Seems that the relations are cleared and returned empty. Any better ways for doing this ? Best regards, Lyubomir Petrov --~--~-~--~~~---~--~~ You received t

Re: i need a unlimited subcategories

2009-04-28 Thread Matthias Kestenholz
On Tue, Apr 28, 2009 at 3:09 PM, Alex Robbins wrote: > > For a real simple solution you might just set up a foreign key field > that points to the parent of any given category. (If you don't need > the extra features of those libraries, they might just make things > more complicated.) > > E.g. su

Re: i need a unlimited subcategories

2009-04-28 Thread Alex Robbins
For a real simple solution you might just set up a foreign key field that points to the parent of any given category. (If you don't need the extra features of those libraries, they might just make things more complicated.) E.g. subcat1-1-1 and subcat1-1-2 are fk'ed to subcat1-1. subcat1-1 is fk'e

Re: MySQL issues

2009-04-28 Thread 83nini
thanks it does really :) On 28 Apr, 14:58, Alex Robbins wrote: > Yeah, I think that is the problem. You have to execute > CREATE DATABASE books; > from the mysql command line. > Syncdb will make tables, but it won't make the initial database. > Hope that helps, > Alex > > On Apr 27, 4:04 am, goo

Re: MySQL issues

2009-04-28 Thread Alex Robbins
Yeah, I think that is the problem. You have to execute CREATE DATABASE books; from the mysql command line. Syncdb will make tables, but it won't make the initial database. Hope that helps, Alex On Apr 27, 4:04 am, google torp wrote: > Hi. > > I haven't used Django with mysql, but judging from yo

Re: mysite.polls: __init__() got an unexpected keyword argument 'max_length'

2009-04-28 Thread Karen Tracey
On Mon, Apr 27, 2009 at 1:30 PM, bconnors wrote: > > With my ubuntu I can’t type @ That's bizarre, but a topic for another list. > > So I can’t do : > export PYTHONPATH=/path/to/your/django/checkout > to the directory I was using which was > pubu...@pubuntu:~/djsite/mysite$ > There is no @ i

Re: Django and Ajax (mootools/clientcide) Fupdate encoding problems

2009-04-28 Thread Bartek SQ9MEV
Karen Tracey pisze: > > Sharing with the list what, exactly, the 'results far from expected' > look like would be a start. I assume from the subject that you are > getting some sort of encoding exception, but without the traceback it is > a bit difficult to say where exactly the problem is. Ind

Re: UnicodeEncodeError

2009-04-28 Thread Karen Tracey
2009/4/28 > > UnicodeEncodeError at /admin/articles/article/18248/ > > ('ascii', u'/home/httpd/html/media/doc/2009/04/28/\u90b3\u5dde\u516c > \u53f8\u8df5\u884c\u79d1\u5b66\u53d1\u5c55\u89c2\u670d > \u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg', 38, 56, 'ordinal not in > range(128)') > > Request Meth

Re: Django development on OS X. Accessing development server from local network

2009-04-28 Thread zayatzz
Nice. Read the forums and learn something new every day :) Alan. On Apr 28, 2:56 pm, Jarek Zgoda wrote: > Wiadomość napisana w dniu 2009-04-28, o godz. 13:03, przez Oleg Oltar: > > > Just noticed that my application has a layout issue in IE7. > > I just wanted to make tests on development serv

Re: Django and Ajax (mootools/clientcide) Fupdate encoding problems

2009-04-28 Thread Karen Tracey
2009/4/28 Bartek SQ9MEV > > What would be the best idea to handle this problem? Where does it > originate? > Any idea where to start investigation? > > Sharing with the list what, exactly, the 'results far from expected' look like would be a start. I assume from the subject that you are getting

Template does not work as it should

2009-04-28 Thread 83nini
Hi, I'm trying to display a form in the following way: 1. creating a form 2. writing a view method that looks like this: def contact(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_valid(): cd = form.cleaned_data

Re: Finding Reason for Form.is_valid()

2009-04-28 Thread Masklinn
On 28 Apr 2009, at 13:22 , Chris wrote: > > What's the easiest way to get a quick synopsis of why form.is_valid() > returns false? I'm trying to unittest a form, and whenever is_valid() > fails, it takes me forever to find out why. the content of form.errors? --~--~-~--~~

Re: Django development on OS X. Accessing development server from local network

2009-04-28 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-04-28, o godz. 13:03, przez Oleg Oltar: > Just noticed that my application has a layout issue in IE7. > I just wanted to make tests on development server from other PC > (with IE installed), on my local network. How can I do it? > Don't really want to deploy apach

Re: Django development on OS X. Accessing development server from local network

2009-04-28 Thread zayatzz
Im a beginner too, but ive been reading this forum for a while now and as far as i understand the development server works ONLY in localhost. If you have layout issues, then i suggest you save the output (HTML and CSS) and test them without the django application. Alan. On Apr 28, 2:03 pm, Oleg

Sounding out form state preservation with session variables?

2009-04-28 Thread Alfonso
Hi, I've got a form with a number of checkboxes that allow a user to filter their search query based on the usual suspects of things like location, facilities etc. So now I need a way to preserve these checked options after the form is submitted to allow the user to adjust what they are looking

Finding Reason for Form.is_valid()

2009-04-28 Thread Chris
What's the easiest way to get a quick synopsis of why form.is_valid() returns false? I'm trying to unittest a form, and whenever is_valid() fails, it takes me forever to find out why. Regards, Chris --~--~-~--~~~---~--~~ You received this message because you are su

Finding Reason for Form.is_valid()

2009-04-28 Thread Chris
What's the easiest way to get a quick synopsis of why form.is_valid() returns false? I'm trying to unittest a form, and whenever is_valid() fails, it takes me forever to find out why. Regards, Chris --~--~-~--~~~---~--~~ You received this message because you are su

Django development on OS X. Accessing development server from local network

2009-04-28 Thread Oleg Oltar
Have a problem. Just noticed that my application has a layout issue in IE7. I just wanted to make tests on development server from other PC (with IE installed), on my local network. How can I do it? Don't really want to deploy apache on local PC for testing Please help me to understand how to

Testing and 'module' object has no attribute 'handler500'

2009-04-28 Thread Filip Gruszczyński
I am trying to write a tests and want to try out calling some wrong addresses, to see if they all return correctly 404 or 403. But when I run get operations, that should those, I get Exception 'module' object has no attribute 'handler500'. I tried to check docs and googled, but found no informatio

Re: Django contact_form import error

2009-04-28 Thread 83nini
Hi, I'm also a newbie. I'm working on forms also, and it worked for me. here is what i did: 1. create a new folder in your project, call it "contact" for example, it should include __init__ file (which means that this folder is a package) and views.py file 2. in the views.py write your "contact"

Django contact_form import error

2009-04-28 Thread bkev
Hello, This is perhaps a stupid newbie issue, but I'm having trouble using James Bennett's lovely contact_form plugin. I'm getting a template syntax error - "No module named contact_form". As suggested in the install docs, I have put 'contact_form' in my installed apps setting, added (r'^contact/

Re: View method + template

2009-04-28 Thread 83nini
thanks it worked.. wohooo, lets django :D cheers On 28 Apr, 10:49, jeff wrote: > I don't know exactly what the tutorial says to do, but it seems to me > that the problem is with this line: > >     if 'q' in request.GET and request.GET['q']: > > If you've entered an empty query -- "" -- then the

Re: View method + template

2009-04-28 Thread jeff
I don't know exactly what the tutorial says to do, but it seems to me that the problem is with this line: if 'q' in request.GET and request.GET['q']: If you've entered an empty query -- "" -- then the first condition ('q' in request.GET) would be true, but the second condition (request.GET['

View method + template

2009-04-28 Thread 83nini
Hi guys, I'm working on the tutorial in www.djangobook.com and I reached the point where I'm making a search form, here is what my view methods look like: def search_form(request): return render_to_response('search_form.html') def search(request): error = False if 'q' in request.GET

Using a base for multiple settings files

2009-04-28 Thread jeff
I'm trying to get multiple sites to play nice side by side. It makes sense to me to have a base_settings.py file or something of the sort that defines sensible defaults for all the sites I'll be working with (they'll all share the same database and e-mail settings, for example). Then each of the s

Re: UnicodeEncodeError

2009-04-28 Thread Daniel Roseman
On Apr 28, 8:00 am, liog...@gmail.com wrote: > UnicodeEncodeError at /admin/articles/article/18248/ > Yes, you have an error. -- DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Django and Ajax (mootools/clientcide) Fupdate encoding problems

2009-04-28 Thread Bartek SQ9MEV
Hi Im using clientcide fupdate which generates ajax request: http://dpaste.com/38671/ My post data includes some national (polish) characters, when i try to save them i get results far from expected. My view is at http://dpaste.com/38672/ What would be the best idea to handle this problem? Wher

UnicodeEncodeError

2009-04-28 Thread lioGeng
UnicodeEncodeError at /admin/articles/article/18248/ ('ascii', u'/home/httpd/html/media/doc/2009/04/28/\u90b3\u5dde\u516c \u53f8\u8df5\u884c\u79d1\u5b66\u53d1\u5c55\u89c2\u670d \u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg', 38, 56, 'ordinal not in range(128)') Request Method: POST Request UR