Re: Authentication backend for Facebook problems

2010-04-27 Thread Martin Lundberg
That will improve the situation a lot, thanks! It doesn't change the fact that it would feel more correct to have it in an authentication backend :) On Mon, Apr 26, 2010 at 5:40 PM, Joe wrote: > > On Apr 26, 5:42 am, Martin Lundberg wrote: > >

Django DatabaseError when using sqlall and syncdb

2010-04-27 Thread larsendt
I'm having issues creating a new database for my app. I'm using the Django 1.2 beta. I wrote the "people" app on another computer, and now I'm trying to get it working on a little server I have set up. When I try: ./manage.py sqlall people I get the error: django.db.utils.DatabaseError:

Re: OS X install, not in home directory?

2010-04-27 Thread Rob
Thanks, but none of those suggestions seem to work. I'm not going to worry about this since I've got too many other things to do, (plus I'm in China and so to read a google group I have to use a proxy/tunnel), but for the record here's some more info... I think I'm using the system python...

Template tag to understand if a request if from a spider

2010-04-27 Thread Alessandro Ronchi
Is it possible to check in a django template if a request is from a spider/ bot or not? -- Alessandro Ronchi http://www.soasi.com SOASI - Sviluppo Software e Sistemi Open Source Hobby & Giochi, l'e-commerce del divertimento http://hobbygiochi.com

Re: How to use CommaSeperatedIntegerList with CheckboxSelectMultiple

2010-04-27 Thread Kevin Renskers
Works like a charm, thanks! > The issue with the custom field is that it does not implement a > 'validate' func > > I believe all I did to get it working was add: > >     def validate(self, value, model_instance): >         return -- You received this message because you are subscribed to the

statistics, reporting, charts for django

2010-04-27 Thread Georg Holzmann
Hallo! I want to build an application like google analytics for django ;) : users should be able to log in and see their statistics/charts. So basically it should be somehow like the django-reporting application, but not in the admin section (should be for general users), with additional

Re: Template tag to understand if a request if from a spider

2010-04-27 Thread Daniel Roseman
On Apr 27, 9:42 am, Alessandro Ronchi wrote: > Is it possible to check in a django template if a request is from a spider/ > bot or not? > > -- > Alessandro Ronchi > As long as you use a RequestContext to render your template, and the tag itself has access to the

Re: Redirect to named url pattern not working

2010-04-27 Thread Tom Evans
On Mon, Apr 26, 2010 at 10:16 PM, Daniel Klein wrote: > Hi, > > I'm trying to avoid hardcoding a URL in a redirect call, but I can't > for the life of me make redirect work. The relevant code segments > first: > > From urls.py: > >        url(r'^game/(\d+)/$', 'views.game',

odering User in a form

2010-04-27 Thread Alfredo Alessandrini
Hi, I've this model: class Pubblicazioni(models.Model): anno = models.DateField(blank=True, null=True,default=datetime.date.today) autori = models.CharField(max_length=500) titolo = models.CharField(max_length=500) autori_daf = models.ManyToManyField(User) I need to ordering

Partial ModelForm produces empty var on ManyToMany relationship

2010-04-27 Thread Florian Le Goff
Hi, I'm using Django's 1.1.1 official release and I'm trying to build a partial form, using ModelForm, with only one field, of the ManyToManyField type. If my partial form's Meta class "fields" attribute contains several attributes names, everything is working pretty smoothly. My form is

I want "DEBUG = False" but still get the DEBUG data logged

2010-04-27 Thread Tomasz Chmielewski
Have cake and eat it it, too? I have a website which will be more or less a production site soon - but I'd like to still get all debugging information. Leaving "DEBUG = True" is not an option, as it will potentially print sensitive information in user's browser. Setting "DEBUG = False"

Re: I want "DEBUG = False" but still get the DEBUG data logged

2010-04-27 Thread Tom Evans
On Tue, Apr 27, 2010 at 12:21 PM, Tomasz Chmielewski wrote: > Have cake and eat it it, too? > > > I have a website which will be more or less a production site soon - but I'd > like to still get all debugging information. > > > Leaving "DEBUG = True" is not an option, as it will

Re: Partial ModelForm produces empty var on ManyToMany relationship

2010-04-27 Thread Tom Evans
On Tue, Apr 27, 2010 at 9:50 AM, Florian Le Goff wrote: > Hi, > > I'm using Django's 1.1.1 official release and I'm trying to build a > partial form, using ModelForm, with only one field, of the > ManyToManyField type. > > If my partial form's Meta class "fields" attribute

Re: I want "DEBUG = False" but still get the DEBUG data logged

2010-04-27 Thread Tomasz Chmielewski
Am 27.04.2010 14:08, Tom Evans wrote: On Tue, Apr 27, 2010 at 12:21 PM, Tomasz Chmielewski wrote: Have cake and eat it it, too? I have a website which will be more or less a production site soon - but I'd like to still get all debugging information. Leaving "DEBUG = True"

reverse function results in NoReverseMatch when passing parameters

2010-04-27 Thread Frank
I suspect I have a simple problem here... But I'm a Django beginner (plus my Python could be stronger) I'm trying to use the reverse(...). When I call it as such: return HttpResponseRedirect( reverse('my_site.core_prototype.views.PostWithList') ) it works as expected. Now I need to call it

Re: While trying to set up Django on Windows: Attrib uteError: ‘Settings’ object has no attribute ‘DATABASE S’

2010-04-27 Thread Karen Tracey
On Tue, Apr 27, 2010 at 12:10 AM, cornflake wrote: > Thank you, the problem is solved! > Turns out in the development version of Django some settings have been > changed, so I had to declare DATABASES instead of DATABASE_ENGINE, > DATABASE_HOST etc. >

Re: Track "before" and "after" state of an object when editing in the Admin?

2010-04-27 Thread Tony Czeh
I had a very similar problem where I needed to track all changes to models throughout the entire application. I've posted my solution at http://pastebin.com/2Wc4Nwcd for you to take a look at. Basically, as was previously suggested, I've hooked into the various pre_*, post_* and m2m_changed

Re: I want "DEBUG = False" but still get the DEBUG data logged

2010-04-27 Thread Tomasz Zieliński
On 27 Kwi, 14:52, Tomasz Chmielewski wrote: > Am 27.04.2010 14:08, Tom Evans wrote: > > > If DEBUG is False, it will email any errors to ADMINS - is this not > > sufficient? > > Technically, should be fine, thanks. > > But I just checked, and I'm not getting any emails. > >    

Re: reverse function results in NoReverseMatch when passing parameters

2010-04-27 Thread Frank
I think I've discoved that part of my issue is not understanding that reverse(...) works in conjunction with the UrlConf file and not with the views directly... On Apr 27, 8:21 am, Frank wrote: > I suspect I have a simple problem here... But I'm a Django beginner >

Re: Django DatabaseError when using sqlall and syncdb

2010-04-27 Thread Fred Chevitarese
Hi! As you said, you´ve created a new database, or you created a database and restore a backup ? Try to create a new and after this, run syncdb. http://chevitarese.wordpress.com Fred Chevitarese - GNU/Linux 2010/4/27 larsendt > I'm having issues creating a new

Re: OS X install, not in home directory?

2010-04-27 Thread Bill Freeman
Rob, See http://docs.python.org/install/index.html#alternate-installation You may want the "home" scheme, but there's a lot of interesting information there. I don't know if you have to have created the corresponding subdirectories (e.g.; ~/lib/python2.6/site-packages) or not, nor whether the

E-commerce comparison: satchmo and lfs

2010-04-27 Thread Michel Thadeu Sabchuk
Hi guys, I found 2 e-commerce applications available for django: Satchmo [1] and LFS [2]. None of then is widely used in country (Brazil). I planning to adapt them to the Brazilian reality, create payment modules, etc. I will try both before make a choice. Anyway, do you have any useful note

Re: statistics, reporting, charts for django

2010-04-27 Thread shacker
On Apr 27, 2:18 am, Georg Holzmann wrote: > Hallo! > > My question: is there a django application which I could reuse (or > learn from) or which could help in the development ? > It would be nice to have a dashboard to put charts, statistics, ... > onto and an easy interface to

Auth tests fail, remote_user

2010-04-27 Thread manu CAZ
Hi, Tests of the auth app are failing with my environnement, especially the remote_user tests. I didn't try to custom this app or anything. 'admin' , 'sites' and 'contenttypes' are in my INSTALLED_APPS. Did I missed a dependency ? Here is a traceback: ERROR: test_known_user

Not translating the admin

2010-04-27 Thread filias
Hi, I have a project with several applications and I am using i18n. I would like to have everything translated except the admin. Is it somehow possible to select which apps are subject to the i18n middleware? Thanks for your help. -- You received this message because you are subscribed to the

Generic solution to Update Schema in multidb

2010-04-27 Thread Anand Agarwal
Hi Guys We have a SaaS based application. We have developed the application on Django 1.1. For each account we have a separate database. So its a multidb. We make release every few weeks. Sometime there is some change in schema. Currently we have customized django-evolution to update schema in

Re: multi-language capabilities of Django/Satchmo

2010-04-27 Thread Leo
I'm not sure exactly what your application needs are, but... we implement our intranet apps on Django at a bilingual (English/ Japanese) company. It's pretty much like the docs say it is... The hardest part may be setting up the gettext utilities if you don't already have them. Make sure the

Re: multi-language capabilities of Django/Satchmo

2010-04-27 Thread Andy McKay
> I'm interested in finding out more about practical use of django's > multi-language capabilities for international sites. Do any of you > have experience with this? And can you point towards resources/apps > etc. for utilizing these features? This is for i18n of the interface:

Increase number of rows of a formset dynamically

2010-04-27 Thread Sonal Breed
Hello all, I have a ModelFormSet defined as RowFormSet = modelformset_factory(Row, extra=7) The requirement is to give user capability to add more rows to the displayed form so that now total number of rows in the formset increases by 1. Can we dynamically add more rows to the formset? If so,

Re: I need django-evolution app

2010-04-27 Thread Anand Agarwal
Hey Shwan, Does south support multidb schema updates? Regards Anand bootstraptoday On Fri, Mar 12, 2010 at 8:58 PM, Shawn Milochik wrote: > South has become the dominant DB migration tool for Django. Have a go at > that. > >

Re: I need django-evolution app

2010-04-27 Thread Shawn Milochik
The newly-released South 0.70 does. 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-us...@googlegroups.com. To unsubscribe from this group, send email to

Problems with first block

2010-04-27 Thread Jonathan Hayward
I'm working on a base template. Django is giving a TemplateSyntaxError at my first attempted block declaration: TemplateSyntaxError at / Could not parse the remainder: ' dtd' from 'block dtd' Request Method:GETRequest URL:http://linux:/Exception Type: TemplateSyntaxErrorException Value:

Re: Problems with first block

2010-04-27 Thread creecode
Hello Jonathan, Use {% block dtd %} instead of {{ block dtd }}. {{ }} are for accessing variables < http://docs.djangoproject.com/en/dev/topics/templates/#variables >. {% %} are for tags < http://docs.djangoproject.com/en/dev/topics/templates/#tags >. Toodle-loo... creecode

usage of TIME_ZONE and zone-to-zone conversion

2010-04-27 Thread Shawn Milochik
Given a date/time value and a value that is valid for the TIME_ZONE setting in settings.py, how do I convert that date/time to the time zone defined in settings.py? Example: settings.py contains: TIME_ZONE = 'America/New_York' Input contains:

Re: I need django-evolution app

2010-04-27 Thread Anand Agarwal
How does it work if i want to run the schema changes for various database instances? In my scenario each account has different database instance & there are hundreds of them. I want to update schema changes in all the databases in one go. Regards Anand bootstraptoday

Re: Problems with first block

2010-04-27 Thread x13
Did you read the tutorial? http://docs.djangoproject.com/en/1.1/topics/templates/#topics-templates Seems to be a syntax problem It's not {{ block dtd }} ... {{ endblock dtd }} the properly syntax (for last Django version) would be: {% block dtd %} ... {% endblock %} Notice you

Re: Problems with first block

2010-04-27 Thread creecode
It is OK to include the name of the block in the endblock tag ( search for 'For extra readability' in < http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance >). It is optional and I find it useful when working with longer blocks. Toodle-looo. creecode

Re: I need django-evolution app

2010-04-27 Thread Shawn Milochik
On Apr 27, 2010, at 3:10 PM, Anand Agarwal wrote: > How does it work if i want to run the schema changes for various database > instances? > In my scenario each account has different database instance & there are > hundreds of them. I want to update schema changes in all the databases in one

Re: Problems with first block

2010-04-27 Thread Jonathan Hayward
Thank you, x13 and creecode! On Tue, Apr 27, 2010 at 2:04 PM, x13 wrote: > > Did you read the tutorial? > http://docs.djangoproject.com/en/1.1/topics/templates/#topics-templates > > Seems to be a syntax problem > > It's not > > {{ block dtd }} ... {{ endblock dtd }} > >

Re: usage of TIME_ZONE and zone-to-zone conversion

2010-04-27 Thread Peter Herndon
Hi Shawn, http://pytz.sourceforge.net/ looks like it would be useful for converting time zone strings. The one thing I keep hearing, though, whenever anyone brings up time zones here on django-users is: "*ALWAYS* store dates in UTC, then convert as needed". Don't know how useful that is,

Run external script with Django cron

2010-04-27 Thread Alexis Selves
Hi there, I have problem with django cron and calling external script. I am trying this first in another file pokus.py: sys.path.append('/home/petarda/Django/gheat-0.2/__/') from bin import db bin is child directory of '__' which contains __init__.py and db.py which include method that I need

Re: Getting a Blog included in the Django community aggregator

2010-04-27 Thread Rob
By strange coincidence, I sent an email to Jacob earlier today requesting that my blog be included in the Django community aggregator. I had a suspicion that this type of situation might arise, as I expect many are doing the same. My blog address is http://www.robgolding.com/blog and the RSS

Re: Interesting Django or Python Issue

2010-04-27 Thread Kenneth Loafman
Ping. Anyone? Kenneth Loafman wrote: > Folks, > > I have a user command that runs, via cron, twice hourly with multiple > threads and queues. At the end of the run, I wait for all of the queues > to empty and join all of the threads. I close Xapian, print some log > info, and delete the pid

Re: Run external script with Django cron

2010-04-27 Thread Shawn Milochik
I don't understand what the problem is. What error message are you getting? Are you confusing PATH and PYTHONPATH? 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-us...@googlegroups.com. To

Re: Run external script with Django cron

2010-04-27 Thread Alexis Selves
problem is, that I cannot import file db.py to another python script pokus.py when i try to execute my pokus.py I got this: home/ petarda/pokus.py does not point to a directory Is it clear now? And what is difference between PATH and PYTHONPATH? Thanks for help. On 27 dub, 22:26, Shawn Milochik

Re: Run external script with Django cron

2010-04-27 Thread Alexis Selves
On 27 dub, 22:26, Shawn Milochik wrote: > I don't understand what the problem is. What error message are you getting? > > Are you confusing PATH and PYTHONPATH? > > Shawn > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: Oracle cursor.execute problem

2010-04-27 Thread Tim Sawyer
Ian wrote: On Apr 25, 11:13 am, Tim Sawyer wrote: >>> import cx_Oracle >>> from django.db import connection >>> cursor = connection.cursor() >>> lOutput = cursor.var(cx_Oracle.STRING) >>> cursor.execute("BEGIN %s := 'N'; END;", [lOutput]) Traceback (most

Re: Run external script with Django cron

2010-04-27 Thread Shawn Milochik
> > And what is difference between PATH and PYTHONPATH? Appending to your environment's PATH means you'll be able to execute files without specifying the full path. For example, instead of having to do ./filename.py you can just use filename.py to call a Python script. This is just a *nix

permissions like widget to add users to groups

2010-04-27 Thread Preston Holmes
Has anyone adapted the interfaced used for adding permissions to a group/user to allow one to add users to a group? How reusable is the CSS/JS? -Preston -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: usage of TIME_ZONE and zone-to-zone conversion

2010-04-27 Thread Shawn Milochik
On Apr 27, 2010, at 3:36 PM, Peter Herndon wrote: > Hi Shawn, > > http://pytz.sourceforge.net/ looks like it would be useful for converting > time zone strings. > > The one thing I keep hearing, though, whenever anyone brings up time zones > here on django-users is: "*ALWAYS* store dates in

Re: Django DatabaseError when using sqlall and syncdb

2010-04-27 Thread larsendt
Thanks for the reply. So here's what I just did. In MySQL I did: DROP DATABASE peace_tracker_db; Then I did: CREATE_DATABASE peace_tracker_db; Then: python manage.py syncdb Which gave me the error: django.db.utils.DatabaseError: (1146, "Table

Static media in development server

2010-04-27 Thread Jonathan Hayward
I'm trying to serve up media from a document_root of /media via, in urls.py: urlpatterns = patterns('', ... (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.dirname(__file__), 'media')}), ... It gives a "file not found" error, either this way or

Re: Django DatabaseError when using sqlall and syncdb

2010-04-27 Thread larsendt
Aha! Fixed it. I commented out all of the apps I added to the project, and then ran ./ manage.py syncdb, then I had to uncomment each app and sync one by one. I think my problem was that I had one app depending on the other, and that was causing the error. Dane Larsen On Apr 26, 9:49 pm,

Re: Static media in development server

2010-04-27 Thread Xavier Ordoquy
Hi, Here's something better for your dev server: from django.conf import settings if settings.DEBUG: urlpatterns += patterns('django.views.static', (r'^%s(?P.*)$' % (settings.MEDIA_URL[1:],), 'serve', { 'document_root':

Re: Static media in development server

2010-04-27 Thread Jonathan Hayward
Thank you! Right now, I have, in settings.py: MEDIA_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'media') MEDIA_URL = '/media/' And at the end of urls.py: if settings.DEBUG: urlpatterns += patterns('django.views.static', (r'^%s(?P.*)$' % (settings.MEDIA_URL[1:],),

Re: Increase number of rows of a formset dynamically

2010-04-27 Thread Sonal Breed
Following link helped me solve the problem: http://stackoverflow.com/questions/2448970/django-adding-inline-formset-rows-without-javascript On Apr 27, 10:31 am, Sonal Breed wrote: > Hello all, > > I have a ModelFormSet defined as > > RowFormSet = modelformset_factory(Row,

Remove a field in a form subclass

2010-04-27 Thread Wiiboy
Hi guys, I've got a ModelForm defined like below: class ArticleForm(forms.ModelForm): title = forms.CharField(stuff) def custom_validator(): .. class Meta: model = Article I want to subclass it, but do _not_ want the title field, i.e. class

Re: Static media in development server

2010-04-27 Thread Xavier Ordoquy
It is pretty much what I also have and works both on ubuntu 9.10 32 bits and osx. Did you checked that your media directory exists and lives in the same directory as the settings.py ? Also check that you have the right permissions for accessing it with the user that runs the dev server.

Many2Many / Generic Relation filter, doesn't behave like expected, how is the right way to do it?

2010-04-27 Thread HWM-Rocker
I have a TaggedObject that has a GenericRelation to Foo with the name tags. When I am searching something like that TaggedObject.objects.filter(Q(tags__tag=1)(tags__tag=4)) I get no Objects in return. But when I filter with (or) '|' then I get 4 Objects. But I have only 3 objects tagged. So the

Re: Static media in development server

2010-04-27 Thread Jonathan Hayward
The file permissions are right AFAIK; the directory is mode 755 and the file 644, owned by the user running the server, so accessing and reading shouldn't be a problem. Are you using Django installed through the package manager or the latest release from djangoproject.com? On Tue, Apr 27, 2010

Re: Static media in development server

2010-04-27 Thread Nadae Ivar Badio
Hi, Use this FILE_UPLOAD_PERMISSIONS = 0600 and you have to give permissions to apache to read the file upload directory. Jonathan Hayward wrote: The file permissions are right AFAIK; the directory is mode 755 and the file 644, owned by the user running the server, so accessing and

Re: Static media in development server

2010-04-27 Thread Jonathan Hayward
Thank you; right now I am using the development server (i.e. not deployed to Apache for real use). I added the FILE_UPLOAD_PERMISSIONS assignment to settings.py and can't observe a difference in behavior. On Tue, Apr 27, 2010 at 7:37 PM, Nadae Ivar Badio wrote: > Hi, > >

Re: Getting a Blog included in the Django community aggregator

2010-04-27 Thread Russell Keith-Magee
On Wed, Apr 28, 2010 at 3:49 AM, Rob wrote: > By strange coincidence, I sent an email to Jacob earlier today > requesting that my blog be included in the Django community > aggregator. > > I had a suspicion that this type of situation might arise, as I expect > many are

Recommendations for a twitter oauth library?

2010-04-27 Thread adamjamesdrew
Hi has anyone found a good twitter oauth library for django? -- 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 group, send email to

django tinymce/filebrowser issue

2010-04-27 Thread Bobby Roberts
hey group - I've installed djangotinymce and filebrowser per the instructions. I've run across a strange issue. When I go to insert an image, the image dialog pops up just fine with the button for filebrowser. However, when I click the filebrowser button, nothing happens. Any idea what could be

Re: Remove a field in a form subclass

2010-04-27 Thread creecode
Hello Wiiboy, Take a look at the excellent writing "Dynamic form generation" < http://jacobian.org/writing/dynamic-form-generation/ > by Jacob Kaplan- Moss. It may help you. I had a similar need to yours and ended up using the __init__ method to remove fields. Toodle-l.