LatestCommentsFeed causing AssertionError due to slicing

2007-05-27 Thread Cybo
Hi, New to both Python and Django. Not sure if my problem is user error or a bug... but here we go. I'm trying to use feeds.py in contrib/comments/ to produce an rss feed of comments for a blog. However, I'm getting this: Traceback (most recent call last): File

Re: ManyToMany relation seems to break

2007-05-27 Thread Doug B
Thanks to Malcolm, this was resolved. The problem was because I was trying to use a model before all models had fully been loaded. Unfortunately it was due to my own mistake rather than anything that would help with ticket 1796, but I'm grateful he stuck around to help figure it out anyway.

ManyToMany relation seems to break

2007-05-27 Thread Doug B
I've got a problem I can't figure out, and from the silence in IRC I'm either doing something really stupid or it's as strange as I think it is. I'd appreciate any assistance. For a nice highlighted version try: http://dpaste.com/11163/ """ I'm sorry this is so long. The nutshell version is

Re: Alternative approach to UserProfile

2007-05-27 Thread ZZorba
I'm also aware of trickiness of eval() methods, so,, I could solve the problem in this way " profile_fields = "email email_backup brother sister".split() for key in profile_fields: getattr(request.user.get_profile(), key) " And, it works well. Really approciate you both. :) On 5월28일,

Re: change db connection upon login

2007-05-27 Thread James Bennett
On 5/27/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > No, Django is not designed like that. All connections to the database > are done as the user you specify in the settings file. You would need to > reimplement connection and cursor management inside the > django/db/backends/* if you

Re: Alternative approach to UserProfile

2007-05-27 Thread Russell Keith-Magee
On 5/27/07, EL AATIFI Sidi Mohamed <[EMAIL PROTECTED]> wrote: > > > > - The eval() technique suggested in another reply may work, but isn't > > really a good practice. eval() exists to make interactive prompts > > possible, not as a general programming technique. There is no > > protection on

Re: Unicode-branch: testers wanted

2007-05-27 Thread Malcolm Tredinnick
On Sun, 2007-05-27 at 13:34 -0700, itsnotvalid wrote: > I got an error when I am using admin interface to submit some forms as > following the Django book (CH6). > > When the form in admin interface saving. > Traceback (most recent call last): > File

Re: Cross validation of form fields (svn)

2007-05-27 Thread Malcolm Tredinnick
On Sun, 2007-05-27 at 23:21 +, [EMAIL PROTECTED] wrote: > Hi all, > > i'm running django svn and trying to validate two fields against each > other. Problem is: if i pass both values it should pass validation, > instead it displays both errors. If, instead, i pass one value and not >

Re: change db connection upon login

2007-05-27 Thread Malcolm Tredinnick
On Sun, 2007-05-27 at 13:50 -0700, olivier wrote: > Hi group, > > I'm wondering if there a way to change the database connection upon > login, to have the following pattern : > > 1) Anonymous user is connected to my db server as 'default'. The > database or schema for 'default' holds the tables

Cross validation of form fields (svn)

2007-05-27 Thread [EMAIL PROTECTED]
Hi all, i'm running django svn and trying to validate two fields against each other. Problem is: if i pass both values it should pass validation, instead it displays both errors. If, instead, i pass one value and not another, it works as expected. Both fields are declared as required=False Is

change db connection upon login

2007-05-27 Thread olivier
Hi group, I'm wondering if there a way to change the database connection upon login, to have the following pattern : 1) Anonymous user is connected to my db server as 'default'. The database or schema for 'default' holds the tables for authentication. 2) After authentication, username1's

Re: newforms and recaptcha => MultiWidget/MultiField?

2007-05-27 Thread Bram - Smartelectronix
SmileyChris wrote: > > I did this yesterday: > http://smileychris.tactful.co.nz/ramblings/recaptcha/ HOT Damn!! Will try ASAP and report back. - bram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: InvalidTemplateLibrary at /

2007-05-27 Thread Pashka R.
hohoho!!! I won this stuff (Gsser helps a lot :) Its strange but mod_python( or python or django or...) doesn't like symbolic links... I had two links (to django version I want and to my libraries for django (same for all my django projects) So errors gone when I removed symlinks and

Re: Alternative approach to UserProfile

2007-05-27 Thread Vinay Sajip
On May 27, 4:45 pm, EL AATIFI Sidi Mohamed <[EMAIL PROTECTED]> wrote: Another possibility is mentioned here: http://groups.google.com/group/django-users/browse_thread/thread/324eb0c2283bd5/7ad65aeac8bb72ac?lnk=gst=__getattribute__=1#7ad65aeac8bb72ac Whereby you can avoid

Re: Multiple Profiles

2007-05-27 Thread Vinay Sajip
On May 14, 10:15 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > In my opinion there's only one easy solution which doesn't create > ridiculous overhead and that is to be able to add fields to the User > model without having to hack the actual code of the User model. Does > anyone agree

Re: InvalidTemplateLibrary at /

2007-05-27 Thread Pashka R.
New details were found if I opened non-root url (http://kids.dn.ua/info/project.html) and after that root (http://kids.dn.ua/) -- all seems ok but it only for an about one minute... and after that I get InvalidTemplateLibrary error :((( I really don't understand how could it be? may it

Re: Alternative approach to UserProfile

2007-05-27 Thread EL AATIFI Sidi Mohamed
> - The eval() technique suggested in another reply may work, but isn't > really a good practice. eval() exists to make interactive prompts > possible, not as a general programming technique. There is no > protection on what eval() will do, so if an attacker can modify the > string that is being

Hello Dear Friend!

2007-05-27 Thread nobi
Hi dear friends, We are presenting to all of our friends like you the most comprehensive & attractive wllpapers, Avators, Smiles, Inshort EVERSHINE or SADABAHAR collections for you... Try once and Be Use to it for your graphic needs. You will always get So Much New on each visit... Keep Living

Re: GeoDjango Admin interface - Invalid HEX given!

2007-05-27 Thread mikeyparker
On 25 May, 02:37, Justin Bronn <[EMAIL PROTECTED]> wrote: > > I'm just moving an application that we were writing over to the GeoDjango > > branch > > Welcome! Thanks > > > However I am unable to add a new one using the admin ... > > when attempting to create a new instance. > > You found

Re: Best-practices for form with image

2007-05-27 Thread Baurzhan Ismagulov
On Tue, May 22, 2007 at 06:56:31AM -0700, [EMAIL PROTECTED] wrote: > And there are no best practices for using something as inherently > inaccessible and annoying as a captcha. So, what are the best practices to check whether the request has been submitted by a human? FWIW, I've seen captchas

Re: Feisty-updates now contains Python-2.5.1final

2007-05-27 Thread Sam Morris
On Sun, 27 May 2007 03:40:39 -0700, Vinay Sajip wrote: > Thanks for the update, Mike, but I can't seem to get this latest version > - the Python I can get is dated May 2: > > [EMAIL PROTECTED]:~$ sudo apt-get update [snip] > Get: 5 http://archive.ubuntu.com feisty-updates/main Packages [20.1kB]

Re: Cross-refering models across files

2007-05-27 Thread sansmojo
I figured out a weird way to do this a while back but decided it was a bad idea. It works, though: models_a.py: from django.db import models class A(models.Model): text = models.TextField() number = models.IntegerField() class Admin: pass models_b.py: from django.db

Re: Feisty-updates now contains Python-2.5.1final

2007-05-27 Thread Vinay Sajip
On May 27, 4:07 am, Mike Axiak <[EMAIL PROTECTED]> wrote: > Yes, I'm sorry...let me be more clear: > > Feisty Fawn currently ships with Python 2.5.1c1. > Python tried to change its API for dictionaries (which even broke > pickle [1]) -- a change with which Django is not compatible [2]. > They

Re: Alternative approach to UserProfile

2007-05-27 Thread ZZorba
Wow. Thanks a lot- It works pretty well exactly the way I wanted. :) On 5월27일, 오후6시15분, EL AATIFI Sidi Mohamed <[EMAIL PROTECTED]> wrote: > > " > > profile_fields = "email email_backup brother sister".split() > > for key in profile_fields: > > request.user.get_profile().__getattr__(key) > >

Django RSS

2007-05-27 Thread samira
Hello All. I want to use RSS and study Django document about it, but I can't understand. can you help me and describe it for me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

InvalidTemplateLibrary at /

2007-05-27 Thread Pashka R.
Intro I have django project (using django 0.96) All was fine when I develop it on my working computer... Right now I'm trying to move it to ny hosting So what i have Django 0.95 installed on the system, mod_python I've copied my project and setup .htaccess file: SetHandler

Re: Alternative approach to UserProfile

2007-05-27 Thread EL AATIFI Sidi Mohamed
> " > profile_fields = "email email_backup brother sister".split() > for key in profile_fields: > request.user.get_profile().__getattr__(key) > " you can try this: " profile_fields = "email email_backup brother sister".split() for key in profile_fields: