Re: Django isn't working anymore ...

2008-10-11 Thread Kelvin Quee
What you can do is copy the project files over to your local computer, install a copy of Django 0.97 on it and run it off there. If it works, then you can be sure that it's the Django install in your environment that has problems. Else, it's your project files that is causing problems. From

Re: Newbie Forms Question

2008-10-11 Thread Russell Keith-Magee
On Sat, Oct 11, 2008 at 8:05 PM, d. <[EMAIL PROTECTED]> wrote: > > Probably a simple, stupid error I'm making: > > I try to display a form in a template using: > > > {{ rForm.as_table }} > > > > > The browser displays pure html of the form content, having the form- > source all escaped to som

Re: change i18n language through hyperlinks

2008-10-11 Thread Chuck22
thanks Satheesh, the set_language function is partially working for me. When I click the lauguage hyperlinks, only the word "Home" works, but when I change the msgid to be "Home1", it stop working. It seems that "Home" is a django preserved word which get auto-translated. 1. In my base.html, I ha

Re: Picky Generic Views

2008-10-11 Thread Malcolm Tredinnick
On Fri, 2008-10-10 at 18:43 -0600, Jeff Anderson wrote: > Hello, > > So I'm working on a third party Django app, and we use a couple generic > views, specifically login and logout. > > For the urls.py in a project that uses our app, we do this: > > (r'^path', include(smug.urls), {'repo': '

Re: Environment settings error when running unit tests in Django

2008-10-11 Thread Malcolm Tredinnick
On Fri, 2008-10-10 at 11:51 -0700, Karthik Krishnan wrote: > Hi, > > I am trying to run a unit test for my models. My unit test is as > follows > > import os > import unittest > from myproject import models Here's the first problem (or maybe two problems). You can't reliably import models from

Re: How to get the value of a form field within a template?

2008-10-11 Thread Malcolm Tredinnick
On Fri, 2008-10-10 at 13:34 +0200, Matias Surdi wrote: > The same I do > > {{form.interface.initial}} Assuming you mean that "interface" is one of your form fields here (and why make us guess if that's the case?), this isn't a very robust way of getting the initial value. The initial value coul

Re: Django isn't working anymore ...

2008-10-11 Thread Karen Tracey
On Sat, Oct 11, 2008 at 5:15 PM, dbee <[EMAIL PROTECTED]> wrote: > > Been using django for sometime - never had any serious issues with it > as a framework. Now, all of a sudden it won't allow me to login. > > I'm beginning to wonder if perhaps someone hasn't hacked the server > and done some mess

Django isn't working anymore ...

2008-10-11 Thread dbee
Been using django for sometime - never had any serious issues with it as a framework. Now, all of a sudden it won't allow me to login. I'm beginning to wonder if perhaps someone hasn't hacked the server and done some messing about with the backend Environment: Request Method: POST Request

Re: Django book says MSSQL works with 1.0...?

2008-10-11 Thread bobhaugen
On Oct 10, 5:53 pm, "Adam V." <[EMAIL PROTECTED]> wrote: > > OT: I respect your position but, why you use mssql? > > Our IT systems at work are already Windows / SQL Server based, so it > made sense to do our new web development against the same database. In my case, it is a client requirement. -

Re: Redirect user to dynamic url after login

2008-10-11 Thread F.Pighi
On Oct 11, 7:07 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > You can redirect to something like /logged_in, this view has access to > request.user so can redirect you to /users/username/ Thank you for the tips. It worked :-) --~--~-~--~~~---~--~~ You received

Plot Location of IP Addresses on a Google Map

2008-10-11 Thread Merrick
I think it might be overkill to use GeoDjango, anyone else know of a module I can use for this? --~--~-~--~~~---~--~~ 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@g

Re: Redirect user to dynamic url after login

2008-10-11 Thread Arnaud Delobelle
On Oct 11, 2:55 pm, "F.Pighi" <[EMAIL PROTECTED]> wrote: > Hi all, I'm a newbie and I'm having some trouble with the login > process. > > I just want to redirect the user to /users/(?P[^/]+)/profile > or just /users/(?P[^/]+) after a successful login. > > How can I do it? I tried using the defau

Re: related_name in filter search

2008-10-11 Thread Karen Tracey
On Fri, Oct 10, 2008 at 3:19 PM, Alessandro <[EMAIL PROTECTED]>wrote: > In a project I have > class Scheda(models.Model): >referente = models.ForeignKey(User,related_name="schede", > editable=False) > > and I can use: > User.objects.distinct().filter(schede__isnull=False): > > in another I hav

Re: How to detect changes in a model's fields before save() ?

2008-10-11 Thread Donn
Sounds like you should be doing something in the form's clean() function. You can compare what's in the cleaned_data to what's in the model and then move from there. \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: use related field for date_field argument in generic view

2008-10-11 Thread J
> > You posted the same question in a different thread less than 16 hours > ago. Please realize that everyone who answers questions on this list > volunteers their time to do so, so questions may not be answered > immediately. Increasing the traffic on an already high-traffic list > by duplica

Redirect user to dynamic url after login

2008-10-11 Thread F.Pighi
Hi all, I'm a newbie and I'm having some trouble with the login process. I just want to redirect the user to /users/(?P[^/]+)/profile or just /users/(?P[^/]+) after a successful login. How can I do it? I tried using the default login view it seems I have to use the LOGIN_REDIRECT_URL variable in

Re: distinct for ForeignKey field

2008-10-11 Thread Karen Tracey
On Sat, Oct 11, 2008 at 8:38 AM, Stephen Cheng <[EMAIL PROTECTED]>wrote: > > I am wondering how to get distinct values for a ForeignKey field > > For example: > class ModelA(models.Model): >. >city=models.ForeignKey(City) > distinct_cities = ModelA.values('

Re: use related field for date_field argument in generic view

2008-10-11 Thread Karen Tracey
On Sat, Oct 11, 2008 at 7:52 AM, J <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've got a couple of related models that I want to use together in a > queryset, which I will be passing to a the generic view > "date_based.archive_index". This generic view requires a "date_field" > argument specifying

Re: Registration - adding first_name and last_name to form.

2008-10-11 Thread Karen Tracey
On Sat, Oct 11, 2008 at 4:39 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > These lines in forms.py > --- > 92. new_user = > > RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], > 93. pass

distinct for ForeignKey field

2008-10-11 Thread Stephen Cheng
I am wondering how to get distinct values for a ForeignKey field For example: class ModelA(models.Model): . city=models.ForeignKey(City) I understand that I can pass the list to template than probably use regroup and get the group values, but is there a ef

Newbie Forms Question

2008-10-11 Thread d.
Sorry, I first posted this on the django developppers group, which was obviously wrong. Probably a simple, stupid error I'm making: I try to display a form in a template using: {{ rForm.as_table }} The browser displays pure html of the form content, having the form- source all escaped to s

use related field for date_field argument in generic view

2008-10-11 Thread J
Hi all, I've got a couple of related models that I want to use together in a queryset, which I will be passing to a the generic view "date_based.archive_index". This generic view requires a "date_field" argument specifying "the name of the field that the date-based archive [view] should use to de

Re: Building Django web application

2008-10-11 Thread Graham Dumpleton
On Oct 11, 12:53 pm, mguthrie <[EMAIL PROTECTED]> wrote: >   Discussing all of this has made me re-think my approach and whether > Django will be a good fit for this specific project.  It may be better > for me to simply use a different python framework and let the client > separation be handled

Re: array grouping in templates

2008-10-11 Thread Daniel Roseman
On Oct 11, 7:58 am, jhf555 <[EMAIL PROTECTED]> wrote: > I have an array and I want to use Django templating to display each > item in a table, grouped by 3 per row. > For example, if i have >   arr = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] > Then I'd want it to show up as > >   abc >  

array grouping in templates

2008-10-11 Thread jhf555
I have an array and I want to use Django templating to display each item in a table, grouped by 3 per row. For example, if i have arr = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] Then I'd want it to show up as abc def ghi j In general, the array could be any length, and it's p

Re: Syncdb Command

2008-10-11 Thread Russell Keith-Magee
On Sat, Oct 11, 2008 at 3:01 PM, Hingarajiya,Ravi <[EMAIL PROTECTED]> wrote: > Hi All, > > I want to know that how to run syncdb command using command line arguments > as site-username, password and email id. > >Example : python manage.py syncdb > > > I don't want to insert site-usern

Re: Registration - adding first_name and last_name to form.

2008-10-11 Thread NoviceSortOf
These lines in forms.py --- 92. new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], 93. password=self.cleaned_data['password1'], 94. first_name=self.cleaned_data['first_name'],

Can I connect mysql database ?

2008-10-11 Thread Hingarajiya,Ravi
Hi All I am using Jython interpreter for Django Web Framework. Anybody know that how to connect mysql database with Jython interpreter for Django Application ? Ravi Hingarajiya. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Syncdb Command

2008-10-11 Thread Hingarajiya,Ravi
Hi All, I want to know that how to run syncdb command using command line arguments as site-username, password and email id. Example : python manage.py syncdb I don't want to insert site-username,site-password and email id after command manage.py syncdb Ravi Hingarajiya. --~--~