introducing Lettuce, BDD tool for python with Django integration

2010-06-07 Thread Gabriel Falcão
There is not much to say, the documentation is at http://lettuce.it, and the code is GNU/GPL3+ located at http://github.com/gabrielfalcao/lettuce There is a blog post introducing it at http://gabrielfalcao.com/2010/06/08/lettuce-0-1-official-release/

Good idea to process form data in separate thread or process to avoid blocking? How?

2010-06-07 Thread Chris Seberino
I don't want Django site to block while form data is being processed. What is easiest way to run a separate script in a separate thread or process with form data as input parameters? e.g. commands.getoutput("my_script arg1 arg2") or os.system("my_script arg1 arg2") <--- possible to run

IndentationError: unexpected indent for Django-1.2.1, Python 2.6.4 on ubuntu

2010-06-07 Thread albert kao
I downloaded Django-1.2.1 and installed it for Python 2.6.4 on ubuntu. Please help to fix the IndentationError: unexpected indent problem. Thanks. $ uname -a Linux core2quad 2.6.31-17-generic-pae #54-Ubuntu SMP Thu Dec 10 17:23:29 UTC 2009 i686 GNU/Linux $tar xzvf Django-1.2.1.tar.gz $cd

Is it possible to use Django with an API as its back-end?

2010-06-07 Thread Douglas Graves
Hello fellow Django enthusiasts! I'm a new Django user, and have been experimenting with 1.2 for the last few weeks. Thus far, I love it! I love that it has thus far been so simple for me to learn, that the documentation is actually readable and simply written, and that the set up was sooo fast

Re: ManyToMany field documented correctly on django docs ?

2010-06-07 Thread Russell Keith-Magee
On Tue, Jun 8, 2010 at 4:07 AM, gvkalra wrote: > Hi. > Please have a look here: > http://docs.djangoproject.com/en/1.2/topics/db/models/#many-to-many-relationships > > The line I am pointing to is: > As with ForeignKey, you can also create recursive relationships (an > object

Re: Best intranet solution for a small digital agency?

2010-06-07 Thread Russell Keith-Magee
On Tue, Jun 8, 2010 at 12:12 AM, Rob B (uk) wrote: > I work for a small digital agency (10-15 employees).  We design and > build websites (using php and Django).  Are we better off building our > own intranet using django or going for a pre built (free or paid for) >

Django/MySQL trailing spaces bug?

2010-06-07 Thread Steven Davidson
Hi all, Not sure if this is actually a bug (or has already been spotted but couldn't see a trac ticket for it). It seems MySQL has some peculiarities in the way it treats trailing spaces in character columns: they will be ignored for comparison

Re: Latest wisdom on 'small migrations'

2010-06-07 Thread Dave E
Thanks for the advice. South installed, but glitches on converting (that I'll no doubt iron out). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: new objects display first on admin filter display

2010-06-07 Thread Daniel Roseman
On Jun 7, 5:25 pm, rahul jain wrote: > Hi Daniel, > > New objects first on the filter display, but my filter is applied on > Charfield. > > So for ex: , I am creating like suppose x number of objects with a > field with value key_timestamp (charfield). > > Then I am

Re: ASCII problem strikes again - Caught DjangoUnicodeDecodeError while rendering...

2010-06-07 Thread Daniel Roseman
On Jun 7, 9:23 pm, zayatzz wrote: > > What is listed in list_display for the ModelAdmin for the Game model? > > Traceback seems to show you've got a callable attribute on the model listed > > there, and that is the item that is causing trouble. It would be easier to > >

Re: deserialize object using simplejson

2010-06-07 Thread Daniel Roseman
On Jun 7, 8:53 pm, nissu wrote: > Hello list, > > I'm looking for info on how to deserialize something like this: > > { >     "pk": 1, >     "model": "store.book", >     "fields": { >         "name": "Mostly Harmless", >         "author": ["Douglas", "Adams"] >     } > >

no checkboxes for read only objects

2010-06-07 Thread rahul jain
Hi Django, Is this possible ? On change list page, I would like to provide check boxes only for the objects which could be effected by admin actions. But for some of the objects I would not like to provide admin actions since I don't wont them to be modified. check box if we can modify the

Re: ASCII problem strikes again - Caught DjangoUnicodeDecodeError while rendering...

2010-06-07 Thread zayatzz
> What is listed in list_display for the ModelAdmin for the Game model? > Traceback seems to show you've got a callable attribute on the model listed > there, and that is the item that is causing trouble. It would be easier to > diagnose if I could see what that model attribute is defined to do. >

ManyToMany field documented correctly on django docs ?

2010-06-07 Thread gvkalra
Hi. Please have a look here: http://docs.djangoproject.com/en/1.2/topics/db/models/#many-to-many-relationships The line I am pointing to is: As with ForeignKey, you can also create recursive relationships (an object with a many-to-one relationship to itself) and relationships to models not yet

User-level permissions?

2010-06-07 Thread bax...@gretschpages.com
OK, I'm going nuts. For some reason, my user-level permissions have disappeared. I can change permissions at the group level, but at the user level I can only assign groups -- I can no longer just add individual permissions to that individual user. Any suggestions on where the functionality may

deserialize object using simplejson

2010-06-07 Thread nissu
Hello list, I'm looking for info on how to deserialize something like this: { "pk": 1, "model": "store.book", "fields": { "name": "Mostly Harmless", "author": ["Douglas", "Adams"] } into a django object Any help will be appreciated :) regards, Genis -- You

Re: ASCII problem strikes again - Caught DjangoUnicodeDecodeError while rendering...

2010-06-07 Thread Karen Tracey
On Mon, Jun 7, 2010 at 1:41 PM, zayatzz wrote: > Some time ago i found a problem that at the time remained unsloved > cause i lacked the time to track down the issue. The thread about last > problem can be found here : > >

Re: MacOSX error using " ./bin/django-admin.py startproject sdlsdl"

2010-06-07 Thread JohnC
Took a long time to realize this, but Python 2.4 is compatible with both Django and Panther. But Python doesn't include built-in SQLLite until 2.5. So there's more configuration fun, on the SQL front, if you try to thread that needle. Still trying to navigate that one. - John Campbell -- You

Re: Module loading error in django trunk.

2010-06-07 Thread scanelas
Hi, I'm a newbie with Python and Django framework and my english sucks...but I have basicly the same problem that BEN...how I access to fix this bug in my machine? I can download a patch or something? or download the last version of Python? Help me please... Thanks in advice... On May 20, 3:50 

Re: Making query with LIKE where __contains is not enough.

2010-06-07 Thread Gyanit Singh
2 %% works perfectly. For future stumblers of this post. CLASSNAME.objects.raw("select * from table where full_name like'%%ipod% %nano%%' ") works!! Thanks mrfunyon. ps: This should be added to the doc. On Jun 6, 9:03 pm, mrfunyon wrote: > Try using 2 %'s  in your query >

ASCII problem strikes again - Caught DjangoUnicodeDecodeError while rendering...

2010-06-07 Thread zayatzz
Some time ago i found a problem that at the time remained unsloved cause i lacked the time to track down the issue. The thread about last problem can be found here : http://groups.google.com/group/django-users/browse_thread/thread/5f444a06bdfd8fde/d57a901bf9a7b4b6 The new problem i have is with

Re: Django sessions issue

2010-06-07 Thread aa56280
> You better show some code now... My urls.py has the following entry: (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page' : '/'}) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: new objects display first on admin filter display

2010-06-07 Thread rahul jain
Hi Daniel, New objects first on the filter display, but my filter is applied on Charfield. So for ex: , I am creating like suppose x number of objects with a field with value key_timestamp (charfield). Then I am creating a filter on the CharField. I am not sure how its implementing it but its

Re: Multiple languages question about /jsi18n/

2010-06-07 Thread Stodge
Ok I think I see what's happening. I have js strings defined in project/locale and project/app/locale. jsi18n isn't picking up the project level strings but it is seeing the app strings. This doesn't sound right to me. On Jun 7, 9:06 am, Stodge wrote: > I have the jsi18n view

Best intranet solution for a small digital agency?

2010-06-07 Thread Rob B (uk)
I work for a small digital agency (10-15 employees). We design and build websites (using php and Django). Are we better off building our own intranet using django or going for a pre built (free or paid for) solution? Key features needed: - Project management (basecamp clone) - Time reporting

Re: Aggregation of related tables

2010-06-07 Thread Łukasz Rekucki
On Jun 6, 10:12 pm, Tomas Kouba wrote: > Hello all, > > I am writing an application that often lists objects and some of their > attributes in tables. > I get the list in my view and then access attributes in template. > It means that the table rendering results in many simple sql

Loading more than one templatetag library at a time

2010-06-07 Thread Thomas Allen
Hi everyone, I have a template tag directory: templatetags/ |-__init__.py |-all.py |-contrib.py |-forms.py |-menus.py |-sites.py `-utils.py And I tried to use all.py "{% load all %}" as a shortcut for including all of these: # all.py from contrib import * from forms import * from menus import

Re: Cycle tag since 1.2

2010-06-07 Thread cootetom
Thanks, I've used the method that you have explained. I've had a read of the ticket on this and there is now a patch which I've used so I can pass a parameter into the cycle tag to tell it now to write an output. On Jun 7, 2:38 am, Russell Keith-Magee wrote: > On Sun,

Re: How to pass List to Form Meta Class

2010-06-07 Thread Bill Freeman
If I understand you correctly, this is difficult. If there are just a few possible value sets for "fields" it is better to make several form classes, one for each subset of the fields that you will need, and choose which form to instantiate depending on which set of fields you want. Note: The

Re: How to write the reverse function for the following

2010-06-07 Thread Alex Robbins
Clark, The reverse call just uses kwargs to find out which pattern it matches to. If your url regex was r'^register/(?P\w+)/', then you would pass kwarg1 as a kwarg to reverse. You are not trying to find a url with a kwarg in the regex, so you shouldn't be adding that in the reverse call. You

Re: django + ajax

2010-06-07 Thread Phlip
On Jun 7, 4:48 am, tazimk wrote: > Also how should I implement the same thing using jquery library ? Isn't that how the online examples all work? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Using array of URLs for MEDIA_URL

2010-06-07 Thread Steven L Smith
Hi Martin- I don't know what the "official" answer would be, but you could write your own context processor that had something like: from random import choice MEDIA_URLS = 'static1.site.com', 'static2.site.com', 'static3.site.com' ] def media(request): return {'MEDIA_URL':

Noobie and MySQL Latin1

2010-06-07 Thread Fred
I'm just converting to Django and man is it cool. Please accept my appreciation for a job well done and my apologies for taking your time with such beginner questions as: I have searched the group and found excellent information about converting latin1 to utf8, but that's not my issue. I've got

Using array of URLs for MEDIA_URL

2010-06-07 Thread Martin Siniawski
Hey guys, I wanted to ask if there's any way or accepted solution for using more than one URL simultaneously as the MEDIA_URL, so as to enable browsers to further parallelize the download of static content. That is, having something like: MEDIA_URL = [ 'static1.site.com', 'static2.site.com',

Re: Multiple languages question about /jsi18n/

2010-06-07 Thread Stodge
I have the jsi18n view defined in my URLs. I've added a call to gettext() in javascript and added the string definition in djangojs.po. I then compiled the messages and re-started the server. But the resulting string retrieved from gettext() is the tag, e.g. 'my_title'. Did I forget something?

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Filip Gruszczyński
> rather than disable it, why do you not use it? it's going to be there for a > long time, and although it is a bit tedious to enable it, it is worth doing > once and for all - remember that this is practically the only security hole > found in django after nearly 5 years of release. I guess we

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Filip Gruszczyński
> I suspect you are using the contrib.auth login view. All contrib app views > use the csrf_protect decorator ("All contrib apps use a csrf_protect > decorator to protect the view. This requires the use of the csrf_token > template tag in the template. If you have used custom templates for contrib

Re: django + ajax

2010-06-07 Thread Dmitry Dulepov
Hi! tazimk wrote: > Also how should I implement the same thing using jquery library ? This may help: http://www.google.com/search?=django+jquery+ajax -- Dmitry Dulepov Twitter: http://twitter.com/dmitryd/ Web: http://dmitry-dulepov.com/ -- You received this message because you are subscribed

Re: Template issue, maybe?

2010-06-07 Thread Tim Walter
This turned out to be an issue in my settings.py, I had to point the media (jss/css/etc) to the correct directory. On 6/4/10, Vectar wrote: > > Hello all, > > New to Django, I have been through all the tutorials and verified > things appeared to be working. I am running a

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Kenneth Gonsalves
On Monday 07 June 2010 18:00:53 Filip Gruszczyński wrote: > If you do not have any of the middleware in your MIDDLEWARE_CLASSES, > you will have a working installation but without any CSRF protection > for your views (just as you had before). It is strongly recommended to > install

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Karen Tracey
2010/6/7 Filip Gruszczyński > Docs say: > > If you do not have any of the middleware in your MIDDLEWARE_CLASSES, > you will have a working installation but without any CSRF protection > for your views (just as you had before). It is strongly recommended to > install

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Filip Gruszczyński
Docs say: If you do not have any of the middleware in your MIDDLEWARE_CLASSES, you will have a working installation but without any CSRF protection for your views (just as you had before). It is strongly recommended to install CsrfViewMiddleware and CsrfResponseMiddleware, as described above. So

Re: Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Kenneth Gonsalves
On Monday 07 June 2010 17:53:46 Filip Gruszczyński wrote: > I have just upgraded to 1.2 and when I run ./manage runserver and > tried to open main page of our project first I was asked to login and > when I hit enter I got: > > Forbidden (403) > CSRF verification failed. Request aborted. > > I

Haven't enabled CSRF protection and yet server throws CSRF based 403

2010-06-07 Thread Filip Gruszczyński
I have just upgraded to 1.2 and when I run ./manage runserver and tried to open main page of our project first I was asked to login and when I hit enter I got: Forbidden (403) CSRF verification failed. Request aborted. I haven't turned CSRF protection when I was using 1.1.1, so my project should

How to write the reverse function for the following

2010-06-07 Thread Superman
The urlconf: url(r'^register/$', register, { 'backend': 'registration.backends.default.DefaultBackend' }, name='registration_register'), The view: def register(request, backend,

Re: Problems with email and Django 1.2.1

2010-06-07 Thread Tom Evans
On Mon, Jun 7, 2010 at 10:57 AM, José María wrote: > Hi. > > I've a strange problem while sending emails. I need to send emails > with utf-8 content in the body and subject. While subjects show text > fine, bodies always appear to have encoding problems. > > My test code

Problems with email and Django 1.2.1

2010-06-07 Thread José María
Hi. I've a strange problem while sending emails. I need to send emails with utf-8 content in the body and subject. While subjects show text fine, bodies always appear to have encoding problems. My test code is really simple: cadena = send_mail('Cosas que hacer mañana', 'José

Re: error while migrating from 1.1 to 1.2

2010-06-07 Thread Filip Gruszczyński
It seems that some old 1.1.2 eggs must have been messing with me. I have removed them all and it works now just right. -- Filip Gruszczyński -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django is not work Error :Message

2010-06-07 Thread Dmitry Dulepov
Hi! It gices you a hint: Jagdeep Singh Malhi wrote: > More information about this error may be available in the server error > log. Please, check the web server error log. You will see errors there. Sometimes you can see them in the browser if you set DEBUG = True in your settings.py. --

Re: error while migrating from 1.1 to 1.2

2010-06-07 Thread Filip Gruszczyński
OK, it seems, that django 1.2 simply doesn't work on my machine. I have created an empty project and run ./manage shell and got the same error. I have kept generated settings and only changed the following: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add

Django is not work Error :Message

2010-06-07 Thread Jagdeep Singh Malhi
This the Error message : Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmas...@localhost and inform them of the time the error occurred, and anything you might have done

DjangoCon Early Bird Regstrations End Soon!

2010-06-07 Thread Steve Holden
Django users: If you are coming to DjangoCon 2010 (in Portland, OR from September 7-9) then you should sign up soon to get early bird savings on your registration. Early bird pricing closes on June 8! http://djangocon.us/ Hope to see you there! regards Steve -- You received this message

error while migrating from 1.1 to 1.2

2010-06-07 Thread Filip Gruszczyński
I am trying to migrate our project from 1.1 to 1.2, but I get following error: Traceback (most recent call last): File "./manage.py", line 11, in execute_manager(settings) File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager

Re: MacOSX error using " ./bin/django-admin.py startproject sdlsdl"

2010-06-07 Thread bvcelari
All rigth, I miss check compatibilities between versions... in linux works perfectly And finally you are in truth, i must change client computer OS version. Thank you very much bvcelari On Jun 6, 10:13 pm, Daniel Roseman wrote: > On Jun 6, 7:43 pm, bvcelari

Re: Customization administration pages

2010-06-07 Thread stanleyxu2005
Thanks, you made my day ^^) On Jun 7, 10:18 am, Daniel Roseman wrote: > On Jun 7, 9:01 am, stanleyxu2005 wrote: > > > Hi All, > > > I have two questions: > > > 1. The default title of adminstration page named "Django site admin". > > I want to

Re: Customization administration pages

2010-06-07 Thread Daniel Roseman
On Jun 7, 9:01 am, stanleyxu2005 wrote: > Hi All, > > I have two questions: > > 1. The default title of adminstration page named "Django site admin". > I want to remove the prefix "Django" for production use. Is there any > easy way to change the translatable string,

Re: new objects display first on admin filter display

2010-06-07 Thread Daniel Roseman
On Jun 7, 4:35 am, rahul jain wrote: > Hi Django, > > How to display ordering on admin filter in reverse order. Its a char Field > > I would like to display new objects created first. > Well, which? Do you want it reverse sorted by your charfield? Or do you want to

Customization administration pages

2010-06-07 Thread stanleyxu2005
Hi All, I have two questions: 1. The default title of adminstration page named "Django site admin". I want to remove the prefix "Django" for production use. Is there any easy way to change the translatable string, besides editing the template in "/usr/lib/python/django/.../admin/base_site.html"

Re: Django 1.2.1. admin issue - You don't have permission to edit anything.

2010-06-07 Thread Sithembewena Lloyd Dube
Problem solved. I had not enabled the admin.autodiscover() code in my urls.py file. Thanks. On Mon, Jun 7, 2010 at 9:19 AM, Sithembewena Lloyd Dube wrote: > Hi all, > > I am using the latest Django release (1.2.1.) and I am having a problem > with activating the admin site. >

Django 1.2.1. admin issue - You don't have permission to edit anything.

2010-06-07 Thread Sithembewena Lloyd Dube
Hi all, I am using the latest Django release (1.2.1.) and I am having a problem with activating the admin site. I created a super user and modified my settings.py and urls.py files accordingly, but when I log into the admin site, I see the message "You don't have permission to edit anything." My

Re: Django + Ajax + Jquery

2010-06-07 Thread Massimiliano della Rovere
This is useful too: http://www.dajaxproject.com/ On Mon, Jun 7, 2010 at 07:57, Dmitry Dulepov wrote: > Hi! > > tazimk wrote: >>     I want to use ajax in my templates using jquery. >>     Can someone provide me some sample examples /links related to >> this. > >

Re: How to share a session with a php application.

2010-06-07 Thread Dmitry Dulepov
Hi! nameless wrote: > In your opinion what is the best way to share userid with the PHP > application ? If you know where PHP sessions are stored on the file system, you can fetch them manually and deserialize (there is a Python class to deserialize PHP objects). Then you can fetch user id from

Re: How to share a session with a php application.

2010-06-07 Thread nameless
Hi, In your opinion what is the best way to share userid with the PHP application ? --- On Jun 7, 7:59 am, Dmitry Dulepov wrote: > Hi! > > nameless wrote: > > Someone has telled me that I could share the user id ( from Django and > > PHP ) > >  

Re: Django Job in Austin and Seattle (Multiple positions available)

2010-06-07 Thread Russell Keith-Magee
On Mon, Jun 7, 2010 at 1:54 PM, Dane wrote: > Any suggestions on where to post to find experience Django > developers? Three suggestions: * djangogigs.com * djangozen.com/jobs * hiddenhires.com - this hasn't been officially launched yet, but it's being organized by Jacob