RE: using a models fields

2011-04-05 Thread Chris Matthews
Hi Jay, I am no Geo expert but if you use the CharField then you can specify N/E/S/W (North/East/South/West) or + and - to control latitude & longitude. With the DecimalField you can only use the + and -. BTW, Marty Alchin's book Pro Django (Chapter 5 page 118), shows a nice example to

RE: Python Decorators

2011-04-05 Thread Chris Matthews
Hi cootetom, For decorators you must have a look at the excellent articles/tutorials: http://www.artima.com/weblogs/viewpost.jsp?thread=240808 http://www.artima.com/weblogs/viewpost.jsp?thread=240845 It covers decorators with (what you want to do) and without parameters. Regards

Re: I want to get facebook uid to my python function.

2011-04-05 Thread Mike Ramirez
On Tuesday, April 05, 2011 08:11:49 pm Nge wrote: > Dear All ! > > I am creating Django user login page via facebook. > Now I am using the facebook JavaScript SDK and facebook login button. > I can login and get the facebook user's uid. I want to compare this > facebook uid with my database on

I want to get facebook uid to my python function.

2011-04-05 Thread Nge
Dear All ! I am creating Django user login page via facebook. Now I am using the facebook JavaScript SDK and facebook login button. I can login and get the facebook user's uid. I want to compare this facebook uid with my database on python function. How should I do? Now I can not take the

Re: django-admin.py startproject mysite

2011-04-05 Thread Karen Tracey
On Mon, Apr 4, 2011 at 4:11 AM, Santiago Caracol wrote: > Does the Django tutorial still match reality? Yes, startproject is still a valid command for django-admin.py. Do you have the environment variable DJANGO_SETTINGS_MODULE set to something? That would cause

Including other fields in Admin interface

2011-04-05 Thread Joseph Hunt
Greetings, I'm sure there is a simple solution to what I'm trying to do but unfortunately I wasn't able to find it in the documentation. I have the following model (simplified version shown): class Student(models.Model): student_id = models.IntegerField(primary_key=True, unique=True,

Re: LDAP and 1.2

2011-04-05 Thread Mike Dewhirst
On 6/04/2011 12:44am, Sells, Fred wrote: Because our active directory contains many more users than are allowed to use my django app, I have a cron job that runs every 5 minutes and updates a mysql database with the subset I care about. That way if AD is offline at the time, I’m not hosed.

Re: LDAP and 1.2

2011-04-05 Thread Mike Dewhirst
On 5/04/2011 5:46pm, Szabo, Patrick (LNG-VIE) wrote: Hi, has anyone sucessfully conncted their django 1.2 app with Active Directory ?! Which snippet did you use ?! I have had great success with Peter Herndon's ldap-groups in eDirectory ... http://code.google.com/p/django-ldap-groups/

how to have a comment hidden while moderated?

2011-04-05 Thread mongoose
hi How do I setup the django comments so that when a comment is posted it will not appear and be pending moderation( email sent to admin to approve or reject comment )? As default it just posts and shows straight away. Do I need to use "class CommentModerator moderate_after" ? thanks. -- You

Re: wsgi configuration

2011-04-05 Thread Graham Dumpleton
Stop changing things around so much, it makes any suggestions by people useless by the time they suggest it. Go watch: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations It explains how to do things and where you can go wrong. Graham On Wednesday, April 6,

Re: wsgi configuration

2011-04-05 Thread Mark
Not sure if this will help, but worth a stab. Check this page: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango I had a similar error and it fixed it for me. After it tells you how to set up the django.wsgi it says this may not work if you used the Django server to set up your site.

Jinja2 & Django 1.3 Integration - Example?

2011-04-05 Thread deefr
Hello- I've been reading http://docs.djangoproject.com/en/dev/ref/templates/api/#using-an-alternative-template-language and am interested in integrating Jinja2 with my Django 1.3 project. The only useful example I have found is the following snippet: http://djangosnippets.org/snippets/2063/ I

Re: form.errors is not a dictionary?

2011-04-05 Thread Daniel Roseman
On Tuesday, April 5, 2011 9:43:48 PM UTC+1, Roy Smith wrote: > > I'm using django-1.3 . I have a view with the following code: > > def item_create(request): > if request.method == 'POST': > form = ItemForm(request.POST) > if form.is_valid(): > url =

Caught NoReverseMatch while rendering:

2011-04-05 Thread GOUTAM KUMAR RANA
Environment: Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages',

form.errors is not a dictionary?

2011-04-05 Thread Roy Smith
I'm using django-1.3 . I have a view with the following code: def item_create(request): if request.method == 'POST': form = ItemForm(request.POST) if form.is_valid(): url = form.cleaned_data['url'] item.save() return

Re: wsgi configuration

2011-04-05 Thread yongzhen zhang
Hi, thanks for reply, i have tried this. Now in order to make it clear, i move the iStore under home, like this: "/home/yongzhen/ iStore". django.wsgi is inside apache file and the apache file is under iStore: "/home/yongzhen/iStore/django.wsgi". The content of django.wsgi: import os, sys

Re: wsgi configuration

2011-04-05 Thread anvydigital
try changing: os.environ['DJANGO_SETTINGS_MODULE']='www.iStore.settings' to: os.environ['DJANGO_SETTINGS_MODULE']='iStore.settings' Since 'www' folder is on your path. GL -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: wsgi configuration

2011-04-05 Thread yongzhen zhang
Hi, i changed the path to path='/home/yongzhen/workspace/www' But it still has error: 21:31:30 2011] [error] [client 82.130.18.44] mod_wsgi (pid=7421): Exception occurred processing WSGI script '/home/yongzhen/workspace/ www/apache/django.wsgi'. [Tue Apr 05 21:31:30 2011] [error] [client

Re: QuerySet "disappearing"

2011-04-05 Thread Matthew Riedel
Nevermind- I *finally* figured it out.. It was this bit: "for contact in contacts[startIndex:startIndex+100]:" The contacts.count() in this case would steadily decrease as I changed the status of the objects to no longer fit the queryset criteria. So the startIndex value would get to the point

QuerySet "disappearing"

2011-04-05 Thread Matthew Riedel
Ok, I'm having a bit of a weird issue with a medium-sized QuerySet (~21k records). I have an app that syncs information from our LDAP Directory and creates shared contacts in Google Apps for our domain. Google puts a limit on 100 entries per batch, so I'm cycling through these 21k records 100 at a

Re: Django app for data management and visualization

2011-04-05 Thread Gianluca Riccardi
On 5 Apr, 17:06, alessio c wrote: > Ciao, ciao Alessio, > > yes I do. I need more basic stuff then that and I need tables. Think of this > as tentative to reduce Excel use (which is killing me). > > I can use matplotlib or openflash if I want to go really fancy.

Re: [Suspected Spam] Django app for data management and visualization

2011-04-05 Thread alessio c
Sells, this is interesting. But what about the integration with the framework? I mean, I can import a plug in, but I still need to create a template and to give a url, etc. 2011/4/5 Sells, Fred > There are guys in this group who are much more sophisticated meta >

Re: Django app for data management and visualization

2011-04-05 Thread alessio c
Hi Javier, maybe we could have a talk, it sounds you need something similar to what I need. Most of the reports needs a lot of ad hoc features, that is why it is really difficult to find a proper level of abstraction. However, a robust django framework could at least help to organize the work.

Re: Django app for data management and visualization

2011-04-05 Thread Javier Guerra Giraldez
On Tue, Apr 5, 2011 at 10:06 AM, alessio c wrote: > yes I do. I need more basic stuff then that and I need tables. Think of this > as tentative to reduce Excel use (which is killing me). I feel your pain what i'm currently doing is to use jqGrid as a frontend for tables.

Re: Django app for data management and visualization

2011-04-05 Thread alessio c
Ciao, yes I do. I need more basic stuff then that and I need tables. Think of this as tentative to reduce Excel use (which is killing me). I can use matplotlib or openflash if I want to go really fancy. However, now I need to set up the framework. After that, I have a platform from which I can

Re: Apache2 with static file

2011-04-05 Thread Steve
I'm not sure what settings you have defined outside the 'VirtualHost' section in your http.conf. My guess is that you haven't set up the permissions to allow access to the static media directory: Order allow,deny Allow from all Also, I can't see your WSGIScriptAlias anywhere? Are you

Re: [Suspected Spam] Django app for data management and visualization

2011-04-05 Thread Mike Ramirez
On Tuesday, April 05, 2011 07:39:57 am Sells, Fred wrote: > You can get all the files in your > plugins dir and import them using the python function (forgot it's name, > don't use it) or just eval ('import %s' % filename) crude but works for > older python > imp[1] and implib, knee.py[2] is

Re: Static/media url in template

2011-04-05 Thread Jon J
N/M, I solved it. I found this little gem: from django.template import RequestContext [code...] return render_to_response('base.html',locals(), context_instance = RequestContext(request)) which gives me access to the URL from the templates. This should definitely be in the

Re: Static/media url in template

2011-04-05 Thread Ryan Osborn
You need to have *django.core.context_processors.media* in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use this template tag. The same with STATIC_URL, you need to have * django.core.context_processors.static* in order to use it. Hope this helps, Ryan -- You received this message

Re: Static/media url in template

2011-04-05 Thread Daniel Roseman
On Tuesday, April 5, 2011 3:39:17 PM UTC+1, JohnnyWalker wrote: > > It doesn't appear that simple. When I try to insert {{MEDIA_URL}} into > my template, I get no output whatsoever. I haven't been able to find > anything on this. You don't seem to be looking very hard.

RE: LDAP and 1.2

2011-04-05 Thread Sells, Fred
Because our active directory contains many more users than are allowed to use my django app, I have a cron job that runs every 5 minutes and updates a mysql database with the subset I care about. That way if AD is offline at the time, I'm not hosed. From: django-users@googlegroups.com

RE: [Suspected Spam] Django app for data management and visualization

2011-04-05 Thread Sells, Fred
There are guys in this group who are much more sophisticated meta programmers than I. But here's a very simple method: It is easiest if each unique module has the same class name, such as "class Controller:" Then define and import all your plugins (does not allow uploading plugin, but that's

Re: Static/media url in template

2011-04-05 Thread Jon J
It doesn't appear that simple. When I try to insert {{MEDIA_URL}} into my template, I get no output whatsoever. I haven't been able to find anything on this. On Mon, Apr 4, 2011 at 7:49 PM, Sam Walters wrote: > Yes it already exists {{MEDIA_URL}} > > Thats what the

Re: Django app for data management and visualization

2011-04-05 Thread Gianluca Riccardi
On 5 Apr, 15:39, alessio c wrote: > Hello, > > I am thinking about starting a Django app to manage data (I need it > for financial reporting). > > What I am wondering about those days is a way to create an application > that: > > 1) Allows the privileged user to insert a

how to change form field in admin?

2011-04-05 Thread galgal
Is there any way to change type of 1 specific field? I want to change 1 field from CharField to TextField. I know I can make a modelform and pass it to admin class, but is there any other way? For example - can I somehow use formfield_for_dbfield? -- You received this message because you are

Django app for data management and visualization

2011-04-05 Thread alessio c
Hello, I am thinking about starting a Django app to manage data (I need it for financial reporting). What I am wondering about those days is a way to create an application that: 1) Allows the privileged user to insert a "plug in" that adds a module and its views. 2) Allows the user to add

Re: jQuery namespace woes - calling third-party scripts

2011-04-05 Thread Casey Greene
Also -- you are much more likely to quickly get help for a jQuery issue with a list/forum related to jQuery such as the jQuery forum: http://forum.jquery.com/ Some of us use jQuery but if we're reading a django list we're probably not actively thinking about it. Casey On 04/05/2011 01:26

Re: select_related() changes type of DecimalField?

2011-04-05 Thread Carsten Fuchs
Dear Ian, Am 04.04.2011 22:27, schrieb Ian: Yes, this appears to be a bug. If you would, please create a ticket for it in the Django Trac so that we don't forget about it. Gladly: http://code.djangoproject.com/ticket/15766 Best regards, Carsten -- Cafu - the open-source Game and

Re: Apache2 with static file

2011-04-05 Thread Andres Lucena
On Tue, Apr 5, 2011 at 9:33 AM, yongzhen zhang <4...@live.cn> wrote: > Hi, > i have one problem with my apache2 work with static file. > In apache2/sites-available file: > >        ServerName www.imaboy.cn >        ServerAlias shop.imaboy.cn >       Alias /static

Re: Extending django-admin.py startproject/manage.py startapp: a good layout for reusable apps

2011-04-05 Thread Mike Ramirez
On Tuesday, April 05, 2011 02:12:35 am Thomas Weholt wrote: >and useful outside django so I`ll keep my eye on that as well. > > I find that generating all the framework code and modify it a > little to be 100% complete is quicker than doing it all in the > shell/command line. Just a minor

Re: login -->then on success--> my custom page

2011-04-05 Thread Alasdair Nicol
If you only need to change the success url, then use the LOGIN_REDIRECT_URL setting [1]. You won't need to customise the login page. Alasdair [1] http://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url On 05/04/11 10:14, GOUTAM KUMAR RANA wrote: please help me to make or inherit

login -->then on success--> my custom page

2011-04-05 Thread GOUTAM KUMAR RANA
please help me to make or inherit a login page which on success goes to my custom page -- 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

Re: Odd problem with queryset

2011-04-05 Thread bruno desthuilliers
On 4 avr, 17:44, Adam Tonks wrote: > On Monday, April 4, 2011 4:34:10 PM UTC+1, bruno desthuilliers wrote: > > > If you really did test on the very same data set, same forum, *same > > thread* (IOW ; same value for "self.pk") etc, you would'nt get an > > IndexError, so

LDAP and 1.2

2011-04-05 Thread Szabo, Patrick (LNG-VIE)
Hi, has anyone sucessfully conncted their django 1.2 app with Active Directory ?! Which snippet did you use ?! I'm concastantly getting "Invalid credentials" Error -.- Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis

Apache2 with static file

2011-04-05 Thread yongzhen zhang
Hi, i have one problem with my apache2 work with static file. In apache2/sites-available file: ServerName www.imaboy.cn ServerAlias shop.imaboy.cn Alias /static /home/yongzhen/workspace/www/iStore/static I want use apache to route to my static file. It works somehow, like

Extending django-admin.py startproject/manage.py startapp: a good layout for reusable apps

2011-04-05 Thread MrMuffin
I`m writing a simple extension of django-admin.py/manage.py so I can have a predefined set of configurations and use those when I create a new project or reusable app. For instance, I use sqlite3 in the initial stage of development so that should be set automatically. My name doesn`t change that

Re: Advice: project hosting apps

2011-04-05 Thread Alex Kamedov
Eclipse mylyn can be integrated with Redmine too. We are using Redmine with some plugins for time sheduling, SCRUM support and generating charts about 2 years. It's very nice, but not all good plugins is stable. On Tue, Apr 5, 2011 at 9:03 AM, Sells, Fred wrote: >