Re: User Session leakage

2007-01-19 Thread James Bennett
On 1/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > including releasing 0.95.1 which will include these security fixes, and > this policy should clear all this up in future. Yup, the fix is already committed to a new "0.95-bugfixes" branch, and that branch will, in the next day or so,

Re: User Session leakage

2007-01-19 Thread [EMAIL PROTECTED]
Just in case you missed it - we're currently discussing these issues (partly caused by this thread I think) in Django Developers here: http://groups.google.com/group/django-developers/browse_thread/thread/14071de102b62ed7 & James Bennett has been appointed Release Manager:

Re: Evaluation of urls.py in mod_python

2007-01-19 Thread Jyrki Pulliainen
On 1/11/07, Waylan Limberg <[EMAIL PROTECTED]> wrote: > > If my understanding is correct, when you use this method: > > > choices = { > > 'queryset': Poll.objects.filter(opening_date__lte=datetime.now(), > > closing_date__gte=datetime.now()) > > } > > The value of datetime.now() is evaluated

Re: login and redirect_to

2007-01-19 Thread Rob Hudson
How would one set next from a view with the code i showed above? I think I understand what you're asking. If you sent next as a hidden variable in your template, you get read it by calling: request.REQUEST.get as seen here:

Re: newforms validation

2007-01-19 Thread enigmadude
I had this same dilemma also. I was trying to create my own custom login view, but the current built-in login view still uses the oldforms, while I'm in the process of converting to newforms. The AuthenticationForm in Django has a hasCookiesEnabled() method that requires to have access to the

Re: What can be done about all the spam in django-users?

2007-01-19 Thread Andy Dustman
Don Arbow wrote: On Jan 19, 2007, at 7:40 AM, LD 'Gus' Landis wrote: > If the spam can't be stopped, the unsubscribe is the only option I > guess, eh? No, you go to the Google Groups web page and report the spam. In the title of the message is a "Show Options" link, click that, then click

Re: newforms validation

2007-01-19 Thread Nuno Mariz
Yes, you should implement your own field classes with custom validation. A Field *is* a validator. Yes, I understand the idea. I love the new django.newforms lib, but I think that an extra 'validator_list' parameter at least in CharField is more convenient and easy to implement(less code).

testing django: cookies and twill

2007-01-19 Thread mthorley
Maybe I'm just totally dumb--In fact I'm pretty convinced that's the problem here. I'm trying to test django with twill, but django doesn't appear to be sending any cookies. When I view the site in firefox the cookies are there, when I try it with twill I don't see any cookies. Can some one

Customizing admin fields for built-in models

2007-01-19 Thread Tomi Kyöstilä
Hi, Is it possible to modify the built-in models (specifically the Admin class in it)? I'd like to remove some fields from the flatpage model admin page ( e.g. sites and the advanced options) to reduce the chance of something going wrong when unexperienced users are editing/adding flatpages.

problem deleting session value

2007-01-19 Thread hotani
This is a strange gremlin I have found, and am completely stumped. The form: A list view with filters which are in the form of drop-downs. A filter is set in the session, and removed when the user selects "all ___" in the drop-down. Basic stuff, right? One drop-down works, the other does not:

Re: Django BoF at PyCon 2007

2007-01-19 Thread katamari
There are now two Open Space sessions planned: * Django BoF : An informal gathering for anyone who's interested in Django. Meet and greet and general mingling. * Django application showcase : A presentation

Context-sensitive 'upload_to' parameter for FileField

2007-01-19 Thread Patrick J. Anderson
Hi, I was wondering if it is possible, and if so then how, to have a context-sensitive 'upload_to' parameter set for FileField. Let's say, I have the following model concept: class MyModel(models.Model): folder = models.CharField(maxlength = 8) file_html =

Re: What can be done about all the spam in django-users?

2007-01-19 Thread Jeremy Dunck
On 1/19/07, Don Arbow <[EMAIL PROTECTED]> wrote: On Jan 19, 2007, at 7:40 AM, LD 'Gus' Landis wrote: > If the spam can't be stopped, the unsubscribe is the only option I > guess, eh? No, you go to the Google Groups web page and report the spam. In the title of the message is a "Show

generic relations for auth.User instead of myapp.UserProfile?

2007-01-19 Thread Bram - Smartelectronix
Hello everyone, currently we have a working UserProfile, working with the auth.User. Now, we plenty of things in this profile (tags, favorites, the usual social networking blah ;-)), and we would really like to move them to User as the rest of the models all refer to User! So, there's

Dynamically adding fields to a database model class

2007-01-19 Thread Christian Joergensen
Hey I am trying to save myself some time and use a bit of setattr magic[1] on my models. However when I do that, and later need to fetch the value of the field, I get (insted of the actual value): I suspect there is some django magic happening behind the scenes, and maybe the setattr trick

Re: What can be done about all the spam in django-users?

2007-01-19 Thread Don Arbow
On Jan 19, 2007, at 7:40 AM, LD 'Gus' Landis wrote: If the spam can't be stopped, the unsubscribe is the only option I guess, eh? No, you go to the Google Groups web page and report the spam. In the title of the message is a "Show Options" link, click that, then click the "Report

Python Dev Roon at FOSDEM 2007

2007-01-19 Thread Bader Ladjemi
Python Dev Roon at FOSDEM 2007 -- The french Python user group managed getting a dev room dedicated to Python for the FOSDEM 2007 the 25, 26 and 27 februar. A dev room is dedicated to a technical subject in order to make people discuss, code, share, meet but

Re: Stephane += Aspen 0.7 (Python webserver)

2007-01-19 Thread Adrian Holovaty
On 1/17/07, Chad Whitacre <[EMAIL PROTECTED]> wrote: I've updated Stephane to: - use DJANGO_SETTINGS_MODULE directly, if set - fall back to 'stephane.settings' - encourage setting this directly in grappelli.py And I've updated the wiki page with this info:

Re: Passing values from Django to client-side JavaScript

2007-01-19 Thread Brian Beck
The JSON method mentioned above should work fine. Two methods that might be less fragile than code generation: - Hidden form inputs. Less fragile because the 'escape' filter should allow you to safely dump data into attribute values in your template, I think. Then use form.elements or

Re: Passing values from Django to client-side JavaScript

2007-01-19 Thread Jeremy Dunck
On 1/19/07, rzimerman <[EMAIL PROTECTED]> wrote: I'd like to pass variable values from Django to client-side JavaScript at page load time. Currently I've use Django's templating system to dynamically rewrite the JavaScript code, such that the appropriate values get set. But, is there a less

Re: Passing values from Django to client-side JavaScript

2007-01-19 Thread Jeremy Dunck
On 1/19/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: var foo = {{ data }}; alert(data['bouzouki']); Err, that should be: alert(foo['bouzouki']) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Passing values from Django to client-side JavaScript

2007-01-19 Thread rzimerman
I'd like to pass variable values from Django to client-side JavaScript at page load time. Currently I've use Django's templating system to dynamically rewrite the JavaScript code, such that the appropriate values get set. But, is there a less hackish way? If it helps, I'm already using MochKit.

ManyToMany and form

2007-01-19 Thread Sandro Dentella
hi all, I've got a Project model that has an 'attach' field defined as follows: class Project(models.Model): ... attach_file = models.ManyToManyField(File) Which is the easiest way to get a file, save and add it to the project? I think I should create a Custom Manipulator folr

What can be done about all the spam in django-users?

2007-01-19 Thread LD 'Gus' Landis
Hi, If the spam can't be stopped, the unsubscribe is the only option I guess, eh? Cheers, --ldl On 1/19/07, Nancy Brad <[EMAIL PROTECTED]> wrote: Media Mall Toolbar : Advanced 1-click System to the Following Items : - 200 Live TV Channels - FM Radio With alot of Radio Stations and

Great Free Surprise

2007-01-19 Thread Nancy Brad
*Media Mall Toolbar : Advanced 1-click System to the Following Items :* *- 200 Live TV Channels - FM Radio With alot of Radio Stations and You Can Add More. - Live WebCams around The World - Tools and Essentials as : Online Spyware Scanners,Online Virus Scanners and Online Firewall

Re: Splitting models.py into separate modules

2007-01-19 Thread Rubic
Here's another possibility if you're still having problems with __init__.py. Assuming you've got your other modules in the directory: mymodules/ othermodels.py Put a conventional models.py file in your app directory: myapp/ models.py Then import othermodels classes into models: #

Re: dump and restore tool for django

2007-01-19 Thread [EMAIL PROTECTED]
I was looking for something like this :) I'll test it today :) --~--~-~--~~~---~--~~ 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

Re: dynamic query key asignment

2007-01-19 Thread kamil
gracias Jorge --~--~-~--~~~---~--~~ 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 email to [EMAIL

Re: multi-level foreign key query optimization

2007-01-19 Thread Karsu
You could use select_related() metod. try: ProductType.objects.filter(product__producer__region__country=country).distinct().select_related() or ProductType.objects.filter(product__producer__region__country=country).select_related().distinct() -Karsu On 17 tammi, 14:09, "akaihola" <[EMAIL

Re: Charset hell (xgettext and utf-8 message ids)

2007-01-19 Thread guzru
On Jan 19, 11:32 am, Michael Radziej <[EMAIL PROTECTED]> wrote: It's probably still possible to improve this, but I tried and gave up after I found out about the above. Any cool shortcut much appreciated! I'll see what I can do ;) it's a real pain. Perhaps you should rather really start

Retrieving attachments in Django Admin interface

2007-01-19 Thread o.drew
I'm writing an app, and I need to do the following: Once I've added an attachment, I need to be able to view it directly from the Django Admin interface (note: there's no public interface to this app). As I'm in development, I'm only using the Django dev. server at the moment, and I'm

Re: Charset hell (xgettext and utf-8 message ids)

2007-01-19 Thread Michael Radziej
guzru: Julio Nobrega ha scritto: I had a bunch of unicode errors using the template tag trans while using Python 2.3. Upgrading to 2.4 solved all my problems. What version of Python are you using? I'm using python 2.4.3. I've also tried updating gettext without success. Nah, the

Re: login and redirect_to

2007-01-19 Thread Benedict Verheyen
Rob Hudson schreef: IIRC, that gets set based on what is in the login form's hidden field named "next". REDIRECT_FIELD_NAME is in django.contrib.auth and is set to "next" by default. You can override it in the template like this: This will always redirect to the root of the site "/".

Re: generic views and non-editable foreign keys

2007-01-19 Thread Maxime Biais
On 1/19/07, qhfgva <[EMAIL PROTECTED]> wrote: I think you have a small error in your example. Should be: class Thing(models.Model): #element = models.ForeignKey(Thing) element = models.ForeignKey(Element) name = models.CharField(maxlength=100) Thank you, corrected. So I guess