Re: file upload size problem

2011-03-15 Thread vamsy krishna
Hi All, I've set a custom error page for the 413 error when the upload file size exceeds the maximum set in apache LimitRequestBody directive (500 KB). This is working fine for all files upto 3 MB. However when the size exceeds this limit, the browser is showing the below message instead of my cus

Re: Difference between RequestContext and Context?

2011-03-15 Thread Daniel Roseman
On Monday, March 14, 2011 3:09:39 PM UTC, gamingdroid wrote: > > I see, so I completely misunderstood RequestContext. > > There is only two differences, RequestContext takes a HttpRequest > object as it's first argument and automatically includes > TEMPLATE_CONTEXT_PROCESSOR dictionaries into th

Re: help to finish my 1st Django app.

2011-03-15 Thread Igor Ischenko
Or you can simply use object_list instead of latest_poll_list 2011/3/15 christian.posta > Your template file checks to see whether a variable named > "latest_poll_list" exists. > I don't see anywhere in your views where you add this to your context. > Look at part 3 of the tutorial about half wa

Re: Django does not fetch page from memcached.

2011-03-15 Thread muzhig
Found, that if set CACHE_BACKEND = 'locmem://' then caching middleware works fine. On Mar 15, 11:40 am, muzhig wrote: > Hello! I'm trying to achieve cache site. Launched memcached, > made the necessary adjustments: > > CACHE_BACKEND = 'memcached://unix:/home/username/memcached.sock' > CACHE_MIDDL

Re: How to use extra to count based on the value of a field?

2011-03-15 Thread Tom Evans
On Mon, Mar 14, 2011 at 8:57 PM, Margie Roginski wrote: > class Queue(models.Model): >  # fields here, not relevant for this discussion > > class Task(models.Mode): >  queue = models.ForeignKey("Queue") >  status = models.IntegerField(choices=STATUS_CHOICES) > > I am trying to create a Queue query

Cannot configure apache to run my django site

2011-03-15 Thread Tomas Neme
I usually don't send formatted email, but needed to clarify what's code and what's not I'm trying to get apache to run my django site at django.tomasneme.com.arand the requests are timing out. There's nothing in apache's or the site's configured error logs, except for this when I start the server:

Re: django-registration - Activate view not works

2011-03-15 Thread Sergio Berlotto Jr
Did not work. -- 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. For more options, visit t

Re: Cannot configure apache to run my django site

2011-03-15 Thread Sergiy Khohlov
Upgrade module to the version 2.6.6 2011/3/15 Tomas Neme : > I usually don't send formatted email, but needed to clarify what's code and > what's not > > I'm trying to get apache to run my django site at django.tomasneme.com.ar > and the requests are timing out. There's nothing in apache's or th

pyfacebook @facebook.require_login() not working

2011-03-15 Thread mongoose
Hi there, First time using pyFacebook. I've literally copied the example application [https://github.com/sciyoshi/pyfacebook/tree/master/ examples/fbsample] and put it up onto my server. I've created an FB app and now when I try to load the app basically what happens is that the browser keeps refr

Re: Documentation error?

2011-03-15 Thread Karen Tracey
On Mon, Mar 14, 2011 at 2:26 PM, Adam Knight wrote: > On the description for django.contrib.auth.views.login at > http://docs.djangoproject.com/en/1.2/topics/auth/#django.contrib.auth.views.loginthe > documentation says: > > If you are using alternate authentication (see Other authentication >>

Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text'

2011-03-15 Thread hank23
I get the following error whenever I try to go to the index screen of a new app. I've started: ViewDoesNotExist at /mymedia/ Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text' I've not been able to see or find anything obvious in my urls.py at either the proje

Re: Cannot configure apache to run my django site

2011-03-15 Thread Graham Dumpleton
Set LogLevel directive in Apache configuration to 'info' so that mod_wsgi logs more about what it is doing and whether a request even hits mod_wsgi. I would suggest you request is not even finding the server. Do you see anything for your requests in the Apache access log? Graham On Tuesday, Ma

Re: Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text'

2011-03-15 Thread Karen Tracey
On Tue, Mar 15, 2011 at 10:03 AM, hank23 wrote: > I get the following error whenever I try to go to the index screen of > a new app. I've started: > > ViewDoesNotExist at /mymedia/ > Tried index in module mymedia.views. Error was: 'module' object has no > attribute 'Text' > > I've not been able t

Model.clean() ValidationError

2011-03-15 Thread Ben Dembroski
Hi all, I'm trying to pass a ValidationError as a string to a template, but I can't seem to determine where to find the 'special key' that is referred to in the documentation here: http://docs.djangoproject.com/en/dev/ref/models/instances/ {quote} Any ValidationError raised by Model.clean() will

Re: Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text'

2011-03-15 Thread Tom Evans
On Tue, Mar 15, 2011 at 2:03 PM, hank23 wrote: > I get the following error whenever I try to go to the index screen of > a new app. I've started: > > ViewDoesNotExist at /mymedia/ > Tried index in module mymedia.views. Error was: 'module' object has no > attribute 'Text' The rest of the exception

Re: Model.clean() ValidationError

2011-03-15 Thread Tom Evans
On Tue, Mar 15, 2011 at 2:14 PM, Ben Dembroski wrote: > Hi all, > > I'm trying to pass a ValidationError as a string to a template, but I > can't seem to determine where to find the 'special key' that is > referred to in the documentation here: > > http://docs.djangoproject.com/en/dev/ref/models/i

Re: Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text'

2011-03-15 Thread Karen Tracey
On Tue, Mar 15, 2011 at 10:14 AM, Tom Evans wrote: > On Tue, Mar 15, 2011 at 2:03 PM, hank23 wrote: > > I get the following error whenever I try to go to the index screen of > > a new app. I've started: > > > > ViewDoesNotExist at /mymedia/ > > Tried index in module mymedia.views. Error was: 'mod

Re: Model.clean() ValidationError

2011-03-15 Thread Ben Dembroski
On Mar 15, 2:22 pm, Tom Evans wrote: > On Tue, Mar 15, 2011 at 2:14 PM, Ben Dembroski wrote: > > Hi all, > > > I'm trying to pass a ValidationError as a string to a template, but I > > can't seem to determine where to find the 'special key' that is > > referred to in the documentation here: > > >

Re: Model.clean() ValidationError

2011-03-15 Thread Daniel Roseman
On Tuesday, March 15, 2011 2:36:45 PM UTC, Ben Dembroski wrote: > > > Hi Tom, > > Thanks for your reply. (You're right, my example was lousy). > > I did in fact try what you suggested earlier on, and got the the > following error: > > AttributeError at /people/add/ > > 'ValidationError' object

Re: Model.clean() ValidationError

2011-03-15 Thread Ben Dembroski
On Mar 15, 2:36 pm, Ben Dembroski wrote: > On Mar 15, 2:22 pm, Tom Evans wrote: > > > > > On Tue, Mar 15, 2011 at 2:14 PM, Ben Dembroski > > wrote: > > > Hi all, > > > > I'm trying to pass a ValidationError as a string to a template, but I > > > can't seem to determine where to find the 'spec

Re: Model.clean() ValidationError

2011-03-15 Thread Tom Evans
On Tue, Mar 15, 2011 at 2:36 PM, Ben Dembroski wrote: > Hi Tom, > > Thanks for your reply. (You're right, my example was lousy). > > I did in fact try what you suggested earlier on, and got the the > following error: > > AttributeError at /people/add/ > > 'ValidationError' object has no attribute

Problem with DECIMAL_SEPARATOR

2011-03-15 Thread Siara
Hi I tried to find solution to my problem on django-developers group and they send me here ;) Ant there is my problem: I'm writing application which return json with data for another app. I'm from Poland so I set LANGUAGE_CODE = 'pl', the problem is that we are using coma instead of dot in float nu

Determining Django model instance types after a query on a base class

2011-03-15 Thread Lior Sion
I'm having the same issue described in some places around the web and also here: http://stackoverflow.com/questions/5225556/determining-django-model-instance-types-after-a-query-on-a-base-class In essence, I have these definitions: class Animal(models.Model): name= models.CharField(max_lengt

Re: Model.clean() ValidationError

2011-03-15 Thread Ion Ray Studios
On 15/03/11 14:42, Daniel Roseman wrote: On Tuesday, March 15, 2011 2:36:45 PM UTC, Ben Dembroski wrote: Hi Tom, Thanks for your reply. (You're right, my example was lousy). I did in fact try what you suggested earlier on, and got the the following error: AttributeError a

Re: Model.clean() ValidationError

2011-03-15 Thread Ion Ray Studios
On 15/03/11 14:56, Tom Evans wrote: On Tue, Mar 15, 2011 at 2:36 PM, Ben Dembroski wrote: Hi Tom, Thanks for your reply. (You're right, my example was lousy). I did in fact try what you suggested earlier on, and got the the following error: AttributeError at /people/add/ 'ValidationError' o

Re: Determining Django model instance types after a query on a base class

2011-03-15 Thread Daniel Roseman
On Tuesday, March 15, 2011 2:58:55 PM UTC, Lior Sion wrote: > > I'm having the same issue described in some places around the web and > also here: > > > http://stackoverflow.com/questions/5225556/determining-django-model-instance-types-after-a-query-on-a-base-class > > > In essence, I have thes

Re: Tried index in module mymedia.views. Error was: 'module' object has no attribute 'Text'

2011-03-15 Thread hank23
Thanks for all the responses and help. I finally commented out a form reference which I was importing into my views and that allowed everything else to work. so then I went back into the new form that I was importing and found some problems with it that I hadn't noticed before. So now I have the fo

Re: InterfaceError: Connection already closed -- is this a regression?

2011-03-15 Thread Danny
I'm having the exact same issue and haven't found any answers either. I'll update if I find something as well. On Mar 2, 11:46 am, onelson wrote: > I recently switched a project from mysql to postgres and started to > see httpd throwing intermittent 500 errors. > > mod_wsgi (pid=26467): Exception

dumping to excel from /admin

2011-03-15 Thread Bobby Roberts
let's say i'm on page X of a list admin view... is there an easy way to dump just those returns to excel? -- 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 thi

Re: dumping to excel from /admin

2011-03-15 Thread Shawn Milochik
Find out which template you need to modify and where to put the code, then just use xlwt. It's on PyPI and I've used it quite a bit. Alternatively you can use csv.writer or csv.DictWriter, which can be natively opened in Excel and is still easily parsable by other tools. The complicated thing is h

How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-15 Thread hank23
I'm trying to figure out how to code the template language to assign an index number to the "value" attribute of an option in a select list, as I build the option list using a for loop. I can't seem to find any examples of doing this in the django documentation. So is this done automatically by dja

How i can get username into the error mail?

2011-03-15 Thread emonk
Hi django-users. I have a django project running in apache2 with mod_wsgi and I need get the username logged into the mail error; the user is registered in the same data base of the project, i mean in the auth_user table (request.user.username called in the views). This is an example of the erro

docs.djangoproject.com may be down!

2011-03-15 Thread Nathanael Abbotts
I cannot access http://docs.djangoproject.com/ can anyone else? -- 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+unsub

Re: docs.djangoproject.com may be down!

2011-03-15 Thread Cal Leeming [Simplicity Media Ltd]
Confirmed down. On Tue, Mar 15, 2011 at 6:42 PM, Nathanael Abbotts wrote: > I cannot access http://docs.djangoproject.com/ can anyone else? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-user

Re: docs.djangoproject.com may be down!

2011-03-15 Thread vijay
Yes,I am also not able access On Tue, Mar 15, 2011 at 11:42 AM, Nathanael Abbotts wrote: > I cannot access http://docs.djangoproject.com/ can anyone else? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email

Write for us and Get Paid

2011-03-15 Thread Maria Kazmi
Write for Us We are always on the lookout for experienced writers who are passionate about Education, Nursing degree, MBA degree, BBA degree, Doctorate degree, Education sites ( http://bit.ly/Write4Us ) -- You received this message because you are subscribed to the Google Groups "Django users"

Re: docs.djangoproject.com may be down!

2011-03-15 Thread Nathanael Abbotts
Looks like it's back up! Worries over, we hope. -- 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...@googlegro

Re: docs.djangoproject.com may be down!

2011-03-15 Thread vijay
It's working On Tue, Mar 15, 2011 at 11:43 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Confirmed down. > > > On Tue, Mar 15, 2011 at 6:42 PM, Nathanael Abbotts > wrote: > >> I cannot access http://docs.djangoproject.com/ can anyone else? >> >> -- >> Yo

Re: docs.djangoproject.com may be down!

2011-03-15 Thread emonk
working fine here 2011/3/15 vijay > It's working > > > On Tue, Mar 15, 2011 at 11:43 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Confirmed down. >> >> >> On Tue, Mar 15, 2011 at 6:42 PM, Nathanael Abbotts > > wrote: >> >>> I cannot access http://d

Re: Problem with DECIMAL_SEPARATOR

2011-03-15 Thread emonk
try this in settings.py USE_L10N = False DECIMAL_SEPARATOR = ',' 2011/3/15 Siara > Hi > I tried to find solution to my problem on django-developers group and > they send me here ;) > Ant there is my problem: > I'm writing application which return json with data for another app. > I'm from Pola

Re: How to use extra to count based on the value of a field?

2011-03-15 Thread Margie Roginski
Ah, right - so obvious! I'm not sure why it didn't occur to me to filter first, then annotate. Thank you! On Mar 15, 2:43 am, Tom Evans wrote: > On Mon, Mar 14, 2011 at 8:57 PM, Margie Roginski > > wrote: > > class Queue(models.Model): > >  # fields here, not relevant for this discussion > >

Re: django-registration - Activate view not works

2011-03-15 Thread bedros
I really like django-userena better than django-registration; thanks for the link -Bedros On Mar 13, 3:52 pm, Sergio Berlotto Jr wrote: > Well, I'll try thehttp://django-userena.orgbecouse django-registration is > stoped development since March/2010. -- You received this message because you ar

django-deform does not works at all!

2011-03-15 Thread local
I installed this app and created triggers in my PostgreSQL DB. models.py: class PartnerSubGroup(models.Model): @denormalized(models.CharField, max_length=100) @depend_on_related('Partner') def partner_count(self): return str(Partner.objects.filter(group = self.id).count())

A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
I am working on an election application. I am at the point where I would like to start putting together the data entry point for the app and would like a little advice on how to proceed. Here is a (simplified) version of my models: class Candidate(models.Model): f_name = models.CharField()

Re: How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-15 Thread werefr0g
Hello, If you use a paginator [1], you'll prepare the "index number" in the view but this will provide all the context you need in your template. Regards, [1] http://docs.djangoproject.com/en/dev/topics/pagination/ -- You received this message because you are subscribed to the Google Groups

Re: A little help before I run down the wrong rabbit hole

2011-03-15 Thread Shawn Milochik
You can use formsets, which can be passed querysets upon initialization. If this doesn't help, feel free to use a more specific question. Shawn -- 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@go

Re: Deploying django. Please specify the steps.

2011-03-15 Thread Nate Aune
You are not alone. We've seen many folks struggle with the deployment of Django. It can be done but it requires some reading up on documentation on various components in the stack. I suggest that you watch Jacob Kaplan Moss' Django deployment workshop video at: http://pycon.blip.tv/file/3632436/

Sweet Job @ Idle Games for Python/Django Programmers

2011-03-15 Thread Lauren Borucki
Idle Games is the paradigm shift that everyone has been looking for in social games! We are looking for some crazy good/cool/awesome Python/Django Engineers to join our small and brilliant team of engineers in building the first real-time, synchronous MMO for Social networking platforms. Our techn

Re: A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
Thanks, Shawn. That was the first question I had. There will likely be more to follow but I didn't want to chase the wrong solution from the start. On Mar 15, 3:02 pm, Shawn Milochik wrote: > You can use formsets, which can be passed querysets upon > initialization. If this doesn't help, feel fre

Django - view on site - I don't get it

2011-03-15 Thread Tomas Cirip
I am trying to understand 'view on site' functionality. From what I read it is supposed to use model's get_absolute_url() to create 'view on site' link. However, when I look at Django-1.2.5/django/contrib/ admin/templates/admin/change_form.html code: {% trans "History" %} {% if has_absolute_ur

unit tests and setUp method

2011-03-15 Thread Martin Tiršel
Hello, I am new to unit tests and I am using django.test.TestCase. What I don't understand, is this situation class GameWorldTests(TestCase): def setUp(self): self.test_world = GameWorld.objects.create( name='Testing world', game=GameWorld.GAME_TYPE_XY,

Re: Cannot configure apache to run my django site

2011-03-15 Thread Tomas Neme
With LogLevel debug: [Tue Mar 15 18:50:46 2011] [warn] mod_wsgi: Compiled for Python/2.6.5. [Tue Mar 15 18:50:46 2011] [warn] mod_wsgi: Runtime using Python/2.6.6. [Tue Mar 15 18:50:46 2011] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch mod_wsgi/3.2 Python/2.6.6 configure

Re: Cannot configure apache to run my django site

2011-03-15 Thread Tomas Neme
> I'm updating the mod_ right now that fixed it. Thank you all -- "The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde |_|0|_| |_|_|0| |0|0|0| (\__/) (='.'=)This is Bunny. Copy and paste bunny (")_(") to help him gain world domination. -- Yo

Re: Django - view on site - I don't get it

2011-03-15 Thread Karen Tracey
On Tue, Mar 15, 2011 at 5:28 PM, Tomas Cirip wrote: > I am trying to understand 'view on site' functionality. From what I > read it is supposed to use model's get_absolute_url() to create 'view > on site' link. However, when I look at Django-1.2.5/django/contrib/ > admin/templates/admin/change_fo

Re: unit tests and setUp method

2011-03-15 Thread Karen Tracey
On Tue, Mar 15, 2011 at 6:40 PM, Martin Tiršel wrote: > I am new to unit tests and I am using django.test.TestCase. What I don't > understand, is this situation > > > class GameWorldTests(TestCase): >def setUp(self): >self.test_world = GameWorld.objects.create( >name='Test

Re: pyfacebook @facebook.require_login() not working

2011-03-15 Thread Matias Aguirre
I don't have the solution for your issue, didn't used pyfacebook, yet. But if you are looking to register users using Facebook OAuth, then django-social-auth may fit your needs: http://github.com/omab/django-social-auth/ Then you can use any other Facebook API around to access users content a

Re: InterfaceError: Connection already closed -- is this a regression?

2011-03-15 Thread Russell Keith-Magee
On Wed, Mar 2, 2011 at 11:46 PM, onelson wrote: > I recently switched a project from mysql to postgres and started to > see httpd throwing intermittent 500 errors. > > mod_wsgi (pid=26467): Exception occurred processing WSGI script '/ > htdocs/django.wsgi'. >  Traceback (most recent call last)

How to override the model validation on server start?

2011-03-15 Thread Allan
hi Everyone I have a model that i exported from a legacy database. when i start the server it tells me that some of the fields cannot have unique=true with a string CharField with a length over 255. Is there a way to override the model validation that runs on server start? Thanks, Allan -- You

Re: How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-15 Thread Juan Gabriel Aldana Jaramillo
Hi, Check this link. http://www.djangobook.com/en/2.0/chapter19/ I think this is an example about what you are looking for: ** *{% for lang in LANGUAGES %} {{ lang.1 }} {% endfor %}*** On Tue, Mar 15, 2011 at 3:04 PM, werefr0g wrote

Re: file upload size problem

2011-03-15 Thread vamsy krishna
Any suggestions please? On Mar 15, 12:18 pm, vamsy krishna wrote: > Hi All, > > I've set a custom error page for the 413 error when the upload file > size exceeds the maximum set in apache LimitRequestBody directive (500 > KB). > This is working fine for all files upto 3 MB. However when the size