Alternative approach to UserProfile

2007-05-27 Thread ZZorba
Hi I'm in trouble while trying to write simple codes for modifying user profiles. My purpose is to display current user's prior profile on modifying templates. For example, if user already have '[EMAIL PROTECTED]' as his email, then '[EMAIL PROTECTED]' should be initially displayed input box. Ho

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: eval('request.user.get_profile().%

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 python

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

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) > > "

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 dec

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 import

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: 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 wit

Re: Offline Django Apps

2007-05-27 Thread Baurzhan Ismagulov
On Tue, May 22, 2007 at 06:20:12PM -, Rob Hudson wrote: > I have a need for a way to run Django-based websites offline as an > installable application. ... > I'm curious if there are others who could use this functionality but > for Django. If so, perhaps we can all collaborate and come up wi

Re: Alternative approach to UserProfile

2007-05-27 Thread Russell Keith-Magee
On 5/27/07, ZZorba <[EMAIL PROTECTED]> wrote: > > Hi > I'm in trouble while trying to write simple codes for modifying user > profiles. > > My purpose is to display current user's prior profile on modifying > templates. > For example, if user already have '[EMAIL PROTECTED]' as his email, > then '

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 a

Re: GeoDjango Admin interface - Invalid HEX given!

2007-05-27 Thread Jeremy Dunck
On 5/23/07, mikeyparker <[EMAIL PROTECTED]> wrote: > > I'm just moving an application that we were writing over to the > GeoDjango branch FYI, I'm woefully behind on merging that branch up to trunk. I really need to do that. Please take a look at the backwards-incompatible changes list since 0.

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 a

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

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 b

alls 0

2007-05-27 Thread haa73
http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www.0alsoufia.jeeran.com http://www

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: 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&q=__getattribute__&rnum=1#7ad65aeac8bb72ac Whereby you can avoid user.get_profil

Re: InvalidTemplateLibrary at /

2007-05-27 Thread Pashka R.
hohoho!!! I won this stuff (Gösser 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 add

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 sessio

Re: Unicode-branch: testers wanted

2007-05-27 Thread itsnotvalid
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 "F:\python25\Lib\site-packages\django-svn\unicode\django\core \handlers\base.py" in get_response 77. response

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 use

Relationships within different tables and using (JavaScript)

2007-05-27 Thread Greg
I'm working on a site where I'll be selling area rugs online. I will have multiple manufacturers that contain multiple collections which contain multiple styles which contain multiple sizes and prices. I'm wanting to develop my model structure so that when I add a collection I can specify 10 (o

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 t

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

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 > another,

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 "F:\python25\Lib\site-packages\django-svn\unic

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 what

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 wante

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일, 오전8시5

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 tha

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. Hope

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 "/usr/lib/python2.5/site-packages