Re: Django critter helps us code at the speed of light.

2009-04-04 Thread Scott Lyons
Done and done, good sir. http://www.flickr.com/photos/damagedgenius/3412982843/ and http://www.flickr.com/photos/damagedgenius/3412982715/ On Mar 17, 2:33 pm, Eric Walstad wrote: > On Mar 16, 5:29 pm, Scott Lyons wrote:> Based on > mrts' drawings,

Re: Custom validation in view?

2009-04-04 Thread Paddy Joy
Thanks Alex that's exactly what I was looking for! Paddy On Apr 5, 10:40 am, Alex Gaynor wrote: > On Sat, Apr 4, 2009 at 8:37 PM, Paddy Joy wrote: > > > I need to validate some data from a form however I need access to the > > request object as the

Re: Custom validation in view?

2009-04-04 Thread Alex Gaynor
On Sat, Apr 4, 2009 at 8:37 PM, Paddy Joy wrote: > > I need to validate some data from a form however I need access to the > request object as the data validation will be different depending on > the logged on user. > > What is the preferred method for this type of

Re: django.contrib.auth user password decryption

2009-04-04 Thread Joshua Partogi
On Apr 4, 11:49 pm, Masklinn wrote: > On 4 Apr 2009, at 15:38 , Joshua Partogi wrote: > > > Dear all, > > > I already take a look at the django.contrib.auth.models but could not > > find any methods for decrypting the user password. > > > Sometimes we need to get the

Re: dev server vs. real server oddity

2009-04-04 Thread Reiner
This is intended behavior and documented in the generic view documentation here: http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-date-based-archive-year It states that this view raises a 404, when the queryset is empty, so the resulting page basically is considered

Re: Cascading Select Boxes in Admin?

2009-04-04 Thread Alex Gaynor
On Sat, Apr 4, 2009 at 3:47 PM, JGAllen23 wrote: > > Is there any way to have cascading select boxes in the admin app? The > second select box depends on what was chosen in the first. > > > There's no automated way to do this, you'd need to write some of your own

Re: Sqlite3 database fail

2009-04-04 Thread zayatzz
Thanks to both of you. worked just fine. Alan On Apr 4, 10:50 pm, dls wrote: > Yes, once you have executed the initial "python manage.py syncdb" your > database will automatically be created by Django and you will be able > to open in using SQLite. If you are starting a

Re: Sqlite3 database fail

2009-04-04 Thread dls
Yes, once you have executed the initial "python manage.py syncdb" your database will automatically be created by Django and you will be able to open in using SQLite. If you are starting a brand new project you should try "python manage.py startapp [appname]", which will create a new application

Cascading Select Boxes in Admin?

2009-04-04 Thread JGAllen23
Is there any way to have cascading select boxes in the admin app? The second select box depends on what was chosen in the first. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Sqlite3 database fail

2009-04-04 Thread zayatzz
So i should just set the database file name in settings.py and stop worring about it untill i hit syncdb?' Alan. On Apr 4, 10:38 pm, Alex Gaynor wrote: > On Sat, Apr 4, 2009 at 3:34 PM, alan.kesselm...@gmail.com < > > > > alan.kesselm...@gmail.com> wrote: > > > Hello > >

Sqlite3 database fail

2009-04-04 Thread alan.kesselm...@gmail.com
Hello I decided to check out django and i finished tutorial and it was all good. When i wanted to try something for myself and created another app and proceeded to create new database for this project - i failed. I installed sqlite3 on my computer (i use kubuntu 9.04) and when i run sqlite3

Re: Reacting to browser closing the socket

2009-04-04 Thread Marcus Weseloh
On Sat, 4 Apr 2009 00:53:31 -0700 (PDT) Graham Dumpleton wrote: > There have been discussions about detection of client connection > closing on the mod_wsgi list before. It is a far from simple problem. > This is because it can only be detected at certain points, >

How to keep the translations for the templates from different applications separately?

2009-04-04 Thread Valery
Hi How could one keep the translations for the templates from different apps separately? According to Django docs (http://www.djangobook.com/ en/2.0/chapter19/) one could put the application's translations in a correspondent application folder, but it has a few to do with templates whereas the

Re: multiple django versions in mod_python

2009-04-04 Thread Karen Tracey
On Sat, Apr 4, 2009 at 10:57 AM, pault wrote: > > I have one version 1.02 installed in /var/lib/python-support/ > python2.5/django/ (i am on a debian machine) > and one version 0.96 in the folder of my project. Specifics of exactly where you have Django 0.96 installed

Re: multiple django versions in mod_python

2009-04-04 Thread Antoni Aloy
2009/4/4 pault : > >  I have one version 1.02 installed in /var/lib/python-support/ > python2.5/django/ (i am on a debian machine) >  and one version 0.96 in the folder of my project. > > I read the post from Graham but it doesn't seem to work for me it uses > the 1.02 version.

Re: Problem with syncr and picasa - not displaying large images, mostly

2009-04-04 Thread Bas van Oostveen
As far as i know, Google makes the large images available on demand. So unless you view these images through picasa first they are available, but at some later date or without going through picasa first they might not be. Or as another random internet comment says: "This is because original

Re: Unique Field Combinations

2009-04-04 Thread Daniel Roseman
On Apr 4, 2:06 pm, Chris wrote: > How would you enforce a unique column constraint on a combination of > fields? > > For example, say I have the model: > > class Company(models.Model): >     name = models.CharField(unique=True) > > class Article(models.Model): >     company

multiple django versions in mod_python

2009-04-04 Thread pault
I have one version 1.02 installed in /var/lib/python-support/ python2.5/django/ (i am on a debian machine) and one version 0.96 in the folder of my project. I read the post from Graham but it doesn't seem to work for me it uses the 1.02 version.

Re: dev server vs. real server oddity

2009-04-04 Thread dls
Ok, it turns out that the "archive year" generic view throws a 404 error if the querset commands result in an empty set. Through testing I discovered that my development server database works fine because the queryset returns values, but the live database throws a 404 because it returns with an

Re: django.contrib.auth user password decryption

2009-04-04 Thread Masklinn
On 4 Apr 2009, at 15:38 , Joshua Partogi wrote: > Dear all, > > I already take a look at the django.contrib.auth.models but could not > find any methods for decrypting the user password. > > Sometimes we need to get the real text password to be sent to user. > > What is the best way to do this?

django.contrib.auth user password decryption

2009-04-04 Thread Joshua Partogi
Dear all, I already take a look at the django.contrib.auth.models but could not find any methods for decrypting the user password. Sometimes we need to get the real text password to be sent to user. What is the best way to do this? Anybody has got an idea? Thank you very much in advance! --

model gets inconsistent after I delete some objects using object.delete() method

2009-04-04 Thread TTear1943
Many days ago, I deleted some object with object.delete() method. Today I found that my model Product is inconsistent now. Here is the strange result. >>> allproduct=Product.objects.all() >>> allproduct [, ] #Here shows no product with id=7 >>> for ap in allproduct: ... print ap.id ... 4 5

Unique Field Combinations

2009-04-04 Thread Chris
How would you enforce a unique column constraint on a combination of fields? For example, say I have the model: class Company(models.Model): name = models.CharField(unique=True) class Article(models.Model): company = models.ForeignKey(Company) title =

Re: Problem in Model inheritance after some objects are deleted

2009-04-04 Thread TTear1943
Now I have revise the code as follow: The as_leaf_class(): def as_leaf_class(self): content_type = self.content_type model = content_type.model_class() if (model == Product): return self try: obj = model.objects.get(id=self.id)

Re: Problem with syncr and picasa - not displaying large images, mostly

2009-04-04 Thread phoebebright
Rajesh, That make perfect sense. Thank you so much. Phoebe. On Apr 3, 8:18 pm, Rajesh D wrote: > On Apr 3, 12:59 pm, phoebebright wrote: > > > I implemented syncr (http://code.google.com/p/django-syncr/) quickly > > and easily but have one

Problem in Model inheritance after some objects are deleted

2009-04-04 Thread TTear1943
I use a snippet in http://www.djangosnippets.org/snippets/1034/ for my Model inheritance. It works fine at the first.However, after I delete some elements in database, the code works wrong. As I debug, I found that the problem resides in the method: as_leaf_class. In the following code: def

Re: What is the best way to extend the User Model

2009-04-04 Thread James Bennett
On Fri, Apr 3, 2009 at 1:17 PM, Dave Fowler wrote: > Great, thanks guys!  Just wanted to make sure I wasn't missing > anything. If some new 'official' method appeared, the documentation would update to reflect that:

Form wizard - previous step

2009-04-04 Thread eli
Hi, What is the best way to add button "previous step" to multi-steps form ? Thank You. regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Reacting to browser closing the socket

2009-04-04 Thread Graham Dumpleton
On Apr 4, 4:44 pm, Marcus Weseloh wrote: > Hi Malcom, > > thanks for your response! > > On Sat, 04 Apr 2009 12:21:11 +1100 > > Malcolm Tredinnick wrote: > > You're not really trying to solve a valid problem here. The > > development server isn't

Re: Using variable attribute as attribute to another variable

2009-04-04 Thread Briel
Hi I don't believe you can use variables within variables. What you can do is use/make a template tag that will look up in the list. Or you could make if forloop.counter == statements. Or you can make a dictionary and fx make the day_list keys And the table_list values and iterate over the key,