Re: contrib.auth.views - n00b question

2010-07-06 Thread reduxdj
Thanks, It looks like still have this nagging n00b issue, the problem seems to be with the way things configured, none of my templates for my installed apps are working correctly, for instance, my django admin isn't running out of the box, i always get the error no module named LOGIN, as below:

Re: WSGI trouble

2010-07-06 Thread Graham Dumpleton
On Jul 7, 1:25 pm, John Griessen wrote: > John Griessen wrote: > > What causes the wsgi version of a buildout to have a problem with > > TIME_ZONE? > > I found that my libapache2-mod-wsgi package was too old. > > Perhaps a buildout for django needs to build specific

Re: WSGI trouble

2010-07-06 Thread John Griessen
John Griessen wrote: What causes the wsgi version of a buildout to have a problem with TIME_ZONE? I found that my libapache2-mod-wsgi package was too old. Perhaps a buildout for django needs to build specific versions of apache2 and wsgi also? John -- You received this message because you

WSGI trouble

2010-07-06 Thread John Griessen
What causes the wsgi version of a buildout to have a problem with TIME_ZONE? setting.py has # system time zone. TIME_ZONE = 'America/Chicago' bin/django runserver works fine with postgresql database. bin/django.wsgi still uses development include file with: from industromatic_com.settings

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Graham Dumpleton
On Jul 7, 12:01 pm, Graham Dumpleton wrote: > On Jul 7, 11:47 am, Oleg Lomaka wrote: > > > Exactly for your case, you may set LOGIN_URL point to > > '/myapp/accounts/login/', but 'next' parameter still left > >

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Jacob Fenwick
I agree with Graham's analysis. I've seen both the links Oleg posted and I feel like both those hacks should be unnecessary. I ran into this same problem when I tried to submit a form. I found out after some research that I needed to use a the url tag in my templates. Once I replaced the

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Graham Dumpleton
On Jul 7, 11:47 am, Oleg Lomaka wrote: > Exactly for your case, you may set LOGIN_URL point to > '/myapp/accounts/login/', but 'next' parameter still left > inaccurate.http://docs.djangoproject.com/en/dev/ref/settings/#login-url As far as I am concerned, Django should

Re: Django developer opening

2010-07-06 Thread reduxdj
ew, u lost me at "The visuzlation"... sorry, lame ad. On Jul 6, 8:22 pm, j wrote: > The Visualization & Reporting Engineer will contribute to the design > and implementation of Silver Peak’s dynamic reporting and charting > engine.  The reporting engine is a sophisticated

Is Django admin's "delete confirmation" considered RESTful?

2010-07-06 Thread Margie Roginski
I have an app that is modeled after the django admin app. In general it seems to me that the admin app is RESTful. However, I am encountering a situation that is similar to the admin apps delete confirmation process, and I'm curious if anyone out there could comment on whether this particular

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Oleg Lomaka
Exactly for your case, you may set LOGIN_URL point to '/myapp/accounts/login/', but 'next' parameter still left inaccurate. http://docs.djangoproject.com/en/dev/ref/settings/#login-url For more general case, to make working not only auth urls, look at those snippets: -

Re: Filter based on result of model method

2010-07-06 Thread Wiiboy
> As I understand it, parameters passed to filter() are translated into SQL > statements.  An arbitrary python method that you write for your object can > do any number of things, which might not be translatable into SQL.  So I > don't see how any "filter on the result of any method" feature

Django developer opening

2010-07-06 Thread j
The Visualization & Reporting Engineer will contribute to the design and implementation of Silver Peak’s dynamic reporting and charting engine. The reporting engine is a sophisticated component of Silver Peak’s Global Management System used by customers to track trends, monitor performance and

Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Jacob Fenwick
I'm deploying my Django app on Apache using mod_wsgi. The app is using a non-root mount point. So instead of accessing it as: http://server.com/ I access it as: http://server.com/myapp/ When I navigate to a url that requires logging in, I get redirected, but my mount point is dropped, e.g.:

Re: New tutorial added to Django by Example

2010-07-06 Thread Rainy
Oh! I forgot the URL: http://lightbird.net/dbe/ -- 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

Re: Running django-admin.py Commands without a Shell

2010-07-06 Thread Russell Keith-Magee
On Wed, Jul 7, 2010 at 1:39 AM, maxweld wrote: > Thanks Russ for the information. > > I am very interested in the new self.stdout and self.stderr feature of > management.commands. I can see that this is implemented in trunk for > some commands but not yet for others. I guess

Re: WSGI documentation

2010-07-06 Thread Graham Dumpleton
On Jul 7, 3:56 am, Richard Shebora wrote: > This blog post by Graham Dumpleton could be listed > as additional reading for mod_wsgi implementations... > > http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html > > It clears up what look like real problems on

New tutorial added to Django by Example

2010-07-06 Thread Rainy
I've added a new tutorial: A simple Blog to my Django by Example site. As always, feedback is appreciated. This tutorial covers display of monthly archive, pagination, a simple, basic comment system, notification when comments are posted and a flexible interface for deletion of spammy comments.

Easiest way to pass variables between modelforms (genericforms)

2010-07-06 Thread Erich
I am using create_update.create_object to handle my forms (generic forms both use modelforms). I have two forms. The second relies on the pk of the first as a fk. I can't figure out what is the best practice to A: save the pk as a variable or into the session, then B: pull that variable either out

using a SelectDateWidget marks the field always as changed

2010-07-06 Thread cico
Hi everyone, I'm having issues with a custom ModelForm: is I specify a SelectDateWidget for choosing values for a DateField, that field will always be marked as changed.. I'm not sure this is proper behavior, and if I build it as a simple forms.DateField() its status gets flagged as one'd expect.

Re: Override Django ORM with virtual model class - is it possible or no?

2010-07-06 Thread test157
ok, I'll try to explain once again. I have real model class GenericModel(models.Model): val1 = models.CharField(max_length=50) val2 = models.CharField(max_length=80) it has its table in database like generic_model with fields like id | val1 | val2 the idea is just to create one this

Re: Override Django ORM with virtual model class - is it possible or no?

2010-07-06 Thread thusjanthan
Hi, I am not sure if what your asking is possible as a field type in a database is generally a single field. What you are trying to do is have an object as a field type. Perhaps you can do a ForeignKey and have a m2m relationship between the GenericModel? From what I remember you can have custom

Re: How to record/capture IP address of user/registrant in Django

2010-07-06 Thread thusjanthan
This would be done in the view that calls the registration page. Suppose its like this def index(request): message = request.META['REMOTE_ADDR'] ... send message ... Basically short of it is the dictionary request.META contains the Key: REMOTE_ADDR which contains the ip. You would access

Re: HTML Frames and Django Template include

2010-07-06 Thread thusjanthan
Hi, You can definitely have HTML frames. All you need to do is write a base.html file that looks exactly the way you want statically and in the part where you want your django apps to put content in you can do the following in the base.html: {% block content %}{% endblock %} Suppose the div

How to record/capture IP address of user/registrant in Django

2010-07-06 Thread NoviceSortOf
I would like to record the IP numbers of persons registering on our Django driven site. The IP can simply be recorded in the form generated and sent to us during the registration process, as we have custom notifiers sent to us whenever somebody registers. But I'm wondering in the registration

HTML Frames and Django Template include

2010-07-06 Thread NoviceSortOf
I would like to use html frames in Django but my initial experiements with it have not worked out. * Is there anyway to combine HTML frames into a Django template {% include t? * I definitely need Django Context on the right side of the frame, the left side is strictly navigational and of

Re: Blog Widget in Django

2010-07-06 Thread Daniel Lathrop
Didier-- Sounds like you need is clientside javascript for displaying for displaying external blog content. IF you try googling "display rss feed javascript" you should get about 29 million hits. -Daniel --- Daniel Lathrop 206.718.0349 (cell) On Tue, Jul 6, 2010 at 8:44

Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Upgrading to 1.2.1 fixed this issue. Thanks for the help Tom. On Jul 6, 3:18 pm, Rishtastic wrote: > Looks like there is a larger problem with my django.. > > I literally copy and pasted > > "{% if "bc" in "abcdef" %} >   This appears since "bc" is a substring of "abcdef"

Re: Broken if tag in templating system?

2010-07-06 Thread Rishtastic
Upgrading to 1.2.1 fixed this issue. On Jul 6, 3:28 pm, Rishtastic wrote: > I literally only have > " >         {% if "bc" in "abcdef" %} >             This appears since "bc" is a substring of "abcdef" >         {% endif %} > " > > in my template page (copied straight from

Broken if tag in templating system?

2010-07-06 Thread Rishtastic
I literally only have " {% if "bc" in "abcdef" %} This appears since "bc" is a substring of "abcdef" {% endif %} " in my template page (copied straight from django docs) and I get the error: "'if' statement improperly formatted" ifequal and my forloop tags work just

Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Looks like there is a larger problem with my django.. I literally copy and pasted "{% if "bc" in "abcdef" %} This appears since "bc" is a substring of "abcdef" {% endif %}" into my template and I still get the "if statement improperly formatted" error message On Jul 6, 3:15 pm, Rishtastic

Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Thanks Tom, I am aware of the in operator but unfortunately it's not working in the context of comments.readers.all I get an error, "if statement improperly formatted" but it is properly formatted... Any other suggestions? On Jun 30, 11:30 am, Tom Evans wrote: > On

Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Right, I am aware of the "in" operator...but it is not working in the context of readers.all foo is the user object Any suggestions? On Jun 30, 11:30 am, Tom Evans wrote: > On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic wrote: > > Bump? > > > Sorry

Override Django ORM with virtual model class - is it possible or no?

2010-07-06 Thread test157
hello, I need one solution so hope you can help me, e.g. I have this model class GenericModel(models.Model): val1 = models.CharField(max_length=50) val2 = models.CharField(max_length=80) and I need to create many virtual models based on this one above, so it will looks this way: class

Re: WSGI documentation

2010-07-06 Thread Richard Shebora
This blog post by Graham Dumpleton could be listed as additional reading for mod_wsgi implementations... http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html It clears up what look like real problems on the surface, but are really normal when you understand the process better.

Re: Running django-admin.py Commands without a Shell

2010-07-06 Thread maxweld
Thanks Russ for the information. I am very interested in the new self.stdout and self.stderr feature of management.commands. I can see that this is implemented in trunk for some commands but not yet for others. I guess the others will come in time, although maybe I could help by contributing some

URL configuration

2010-07-06 Thread Nick
I currently have several django projects on one server. I am working with subdomains for some of these projects and I'd like the base URL to be a little different than the default behavior. I am working with modwsgi and apache. I have a project called MyProject. I have a subdomain set up at

Email login in admin site

2010-07-06 Thread Gonzalo Delgado
Hello there, I have setup email login in a Django site in a very similar way as http://djangosnippets.org/snippets/74/ It works on the admin, meaning a correct email/password combination logs the user in. The problem is when there is no user with the entered email address in the database. The

Re: Tutorial Help

2010-07-06 Thread Bradley Hintze
Thanks James, I feel sheepish ;) On Tue, Jul 6, 2010 at 12:03 PM, James Bennett wrote: > On Tue, Jul 6, 2010 at 10:56 AM, Bradley Hintze > wrote: >> Error: No module named pollsdjango.contrib.admin > > Look at your INSTALLED_APPS setting.

Re: Tutorial Help

2010-07-06 Thread James Bennett
On Tue, Jul 6, 2010 at 10:56 AM, Bradley Hintze wrote: > Error: No module named pollsdjango.contrib.admin Look at your INSTALLED_APPS setting. You're missing a comma between the polls app and the admin app. -- "Bureaucrat Conrad, you are technically correct -- the

Tutorial Help

2010-07-06 Thread Bradley Hintze
Hi all, I am following the tutorial part 2 (http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02) and I am stuck. I uncommented the 'django.contrib.admin' as directed and ran 'python manage.py syncdb' and got the following error: Error: No module named

Re: Blog Widget in Django

2010-07-06 Thread didier rano
I don't understand where and how django-basic-apps or pinax manage a Blog widget. In fact, I need to implement a widget to display information outside an Django application. For example, display information in a Wordpress site, or display information in iGoogle... Thanks for your help 2010/7/5

Re: Is it possible to localize the admin site?

2010-07-06 Thread Daniel Roseman
On Jul 6, 4:05 pm, AllenDang wrote: > I want to create a localized admin site, for example, I created models > like below shows: > > class Inventory(models.Model): >     price = models.PositiveIntegerField() >     quantity = models.PositiveIntegerField() > > Then in my

Is it possible to localize the admin site?

2010-07-06 Thread AllenDang
I want to create a localized admin site, for example, I created models like below shows: class Inventory(models.Model): price = models.PositiveIntegerField() quantity = models.PositiveIntegerField() Then in my admin.py, I created a admin model for it like below: class

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-06 Thread Yateen
Hi Bill, Thanks. You were right. The Postgres encoding and Django encoding are different. The parser is Python. Postgres encoding was SQL_ASCII. I changed it to UTF8, and the parser failed to insert in DB!! I believe I need to fix it first. -- You received this message because you are

Re: gettext with latin1 chars.

2010-07-06 Thread Alexander Brill
You can just disregard this thread. I got it working. I hadn't been catching an error that said I had some dupes. And this caused my errors in creating a .mo file :) Alex On Tue, Jul 6, 2010 at 4:32 PM, Alexander Brill wrote: > Is there a special way of doing this? I thought it

Re: gettext with latin1 chars.

2010-07-06 Thread Alexander Brill
Is there a special way of doing this? I thought it was enough to have the .po written using utf-8? Alex On Tue, Jul 6, 2010 at 4:30 PM, Bill Freeman wrote: > Just for fun, try specifying the non-ASCII strings as unicode strings > and let us know how you make out. > > On Tue,

Re: gettext with latin1 chars.

2010-07-06 Thread Bill Freeman
Just for fun, try specifying the non-ASCII strings as unicode strings and let us know how you make out. On Tue, Jul 6, 2010 at 10:09 AM, Alexander Brill wrote: > Hi, > > I got some translation strings set up. But they aren't translated if > the translation string contains a

gettext with latin1 chars.

2010-07-06 Thread Alexander Brill
Hi, I got some translation strings set up. But they aren't translated if the translation string contains a non-ascii character. I.e.: msgid "Aalesund" msgstr "Ålesund" msgid "Norway" msgstr "Norge" >>> from django.utils.translation import ugettext as _ >>> _("Norway") 'Norge' >>>

Displaying a derived value in the admin console

2010-07-06 Thread tsmets
Hi, Reading http://docs.djangoproject.com/en/dev/ref/contrib/admin/, I am a bit confused on how to display the age of a person in the admin- console. class UserProfile(models.Model): """ """ user = models.ForeignKey(User, unique=True) addresses = models.ManyToManyField(Address,

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-06 Thread Bill Freeman
I doubt that you can fault Postgres. It doesn't need to care about the encoding of contents, other than it must find the end of the string (and the conventions used may depend on the interface and connection settings). When you say contents of a url, do you mean the url itself, or the page

Re: Problem with L10N of DecimalField

2010-07-06 Thread Simon Westphahl
I'm using Django 1.2.1 and it doesn't work any longer ;) Just switched back to Django 1.2 and it works. But I think that's not a solution. Regards Simon On 6 Jul., 15:21, saboter wrote: > I used the workaround in project that runs under django 1.2 and it > looks good

Re: Jumping from Django to php : maintaining session variables..

2010-07-06 Thread euan.godd...@googlemail.com
I think the solution is pretty self-explanatory. Could you give details of the specific problem you're encountering, because, as far as I can see, the snippet given in the referenced post is excellent, although I fail to see why any one would want to support a cross-PHP/ python application out of

Re: contrib.auth.views - n00b question

2010-07-06 Thread Chris Lawlor
You probably don't want to reference the login view to /accounts. You probably mean to do this: (r'^accounts/', include ('django.contrib.auth.urls'), That will map /accounts/login to django.contrib.views.login, /accounts/ logout to django.contrib.views.logout, etc. In general, when using an

Re: Problem with L10N of DecimalField

2010-07-06 Thread saboter
Hello, ticket 13546 si definitely more relevant than 13560. :) Thanks. I used the workaround in project that runs under django 1.2 and it looks good in admin even after repeated editation. Regards, Martin On 5. Júl, 23:43 h., Simon Westphahl wrote: > Hi, > > I

Re: contrib.auth.views - n00b question

2010-07-06 Thread Tom Evans
On Tue, Jul 6, 2010 at 2:00 PM, reduxdj wrote: > Hi, > > I have an issue where i am including contrib.auth into my URLs, > however, I get this error: > > my url pattern: > > (r'^accounts/', include('django.contrib.auth.views.login')), > django.contrib.auth.views.login

contrib.auth.views - n00b question

2010-07-06 Thread reduxdj
Hi, I have an issue where i am including contrib.auth into my URLs, however, I get this error: my url pattern: (r'^accounts/', include('django.contrib.auth.views.login')), Could this be an issue with my path, or python path? Thanks for your help, as always, learning something new - it's easy

Re: cached template loader

2010-07-06 Thread Sævar Öfjörð
I've also tried passing this through django.shortcuts.render_to_response, but I get the same error. - Sævar On Jul 6, 2:41 pm, Sævar Öfjörð wrote: > Hi, I've been using the default template loaders and it works fine. > Now I want to add the cached template loader, but I get

cached template loader

2010-07-06 Thread Sævar Öfjörð
Hi, I've been using the default template loaders and it works fine. Now I want to add the cached template loader, but I get an error. I'm using a wrapper function to return responses that include the request in the context, like this: # file helpers/helpers.py from django.template import

Re: object has no attribute '_state'

2010-07-06 Thread Tom Evans
On Tue, Jul 6, 2010 at 3:51 AM, jcage wrote: > Hi everyone. I'm quite new to python and django. I was wondering if > anyone could shed some light on this topic : > > My models.py contains the classes QuestionSet and Question, which > inherits the former. > In the shell, I

Re: Several translations for the same string

2010-07-06 Thread Tom Evans
On Mon, Jul 5, 2010 at 10:53 AM, donato.gr wrote: > Hello, > I'm writing an application which has to be translated in English and > Italian. > The problem is that italian adjectives change form according to the > gender of the word they are referred to. > E. g. "is active"

Re: Several translations for the same string

2010-07-06 Thread donato.gr
Nice idea! Thank you, I'll try it and let you know! On 5 Lug, 19:34, Nuno Maltez wrote: > Have you tried giving the message different IDs and, in the English po > file, translating them to the same string while in the italian > language file translating to the same string?

Jumping from Django to php : maintaining session variables..

2010-07-06 Thread Sudharshan
Hello ppl, I have a situation here which is aptly described by an earlier post http://groups.google.com/group/django-users/msg/a492cb9394b0db4d But my problem is that even after doing whatever the post says i am not able to get away with the problem Can someone revisit the solution to the

Composite primary key (unique_together?) and ForeignKeys

2010-07-06 Thread Massimiliano della Rovere
Greetings, I am creating an event logger; each event spans in time from datetime to datetime. Each event is uniquely identified with the couple event_start_date_time and event_id (ranging from 0 to ). The Hardware event trapper automatically wraps the event_id. I am the programmer of the event

WSGI documentation

2010-07-06 Thread Henrik Genssen
can we please add a hint to the docs here: http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ for: WSGIPassAuthorization on or one will never get HTTP_AUTHORIZATION in request.META regards Henrik Henrik Genssen h...@miadi.net Tel. 0451/6195650 Fax. 0451/6195655 miadi

Re: Filter based on result of model method

2010-07-06 Thread Mark Linsey
Perhaps someone with much more Django experience will correct me, but I am 99% sure that this is impossible. As I understand it, parameters passed to filter() are translated into SQL statements. An arbitrary python method that you write for your object can do any number of things, which might

Re: Filter based on result of model method

2010-07-06 Thread Wiiboy
Anyone? -- 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-users+unsubscr...@googlegroups.com. For more options, visit this