Getting values set across relation spanning multiple tables

2009-09-03 Thread bvemu
Hi I needed a query to get the values set of a model which has multiple child models like below class Vehicle(models.Model): vehicle_pkey = models.OneToOneField(User, primary_key=True, parent_link=True) vehiclename=models.CharField(max_length=20) class no_of_tyres(models.Model

Clarification required on one-to-one save method

2009-08-18 Thread bvemu
Hi All To maintain a 1-1 relation with User table I have defined the following in my models class UserDetails(models.Model): user_id = models.OneToOneField(User, primary_key=True, parent_link=True) choices= models.PositiveSmallIntegerField(null=False, blank=False, choices=menu_

Can I link python editor IDLE 1.2.4 to python manage.py shell

2009-08-05 Thread bvemu
Hi Is there any way to launch IDLE 1.2.4 (a python IDE on windows and comes default with python installation) when we want to launch a shell from manage.py for example # python manage.py shell should open up IDLE with the appropriate env variables set Thanks in advance Regards Subramanyam -

Retrieving the values from query set

2009-08-02 Thread bvemu
Hi In my project I want to store an integer as the username To randomly allocate a new username I need the list of available usernames (integer type list) I tried the following ways user_list=[] user_list=list(User.objects.values('username').order_by('username')) and when I try to print the v

Issue on using emailID as the username

2009-06-22 Thread bvemu
Hi I was using the email ID as the username as shown below in my view.py view.py -- def signup(request) .. username=emailid ; valid_user = authenticate (username=username,password=password ) .. and it works fine for me Django version being the development version # djang

Re: how to use email instead of username for user authentication?

2009-06-22 Thread bvemu
Hi Further to the above discussion, I did implement the code and it worked for me for the authentication while using the email id as the username (username=emailid ; valid_user = authenticate (username=username, password=password ) # django-admin.py --version 1.1 beta 1 SVN-10957 1.) The pro

python manage.py dbshell throws error

2009-05-14 Thread bvemu
Hi All I am executing the command "python manage.py dbshell" and it throws the following error "Profiling timer expired" I have an alias in my .bashrc of alias mysql='mysql -u subramanyam -pxxx' Tried unaliasing mysql but didnt work whereas it works fine from command line Any pointers on th

Re: Django setup problem when executing syncdb

2009-03-02 Thread bvemu
Hi All I apologise for posting a wrong answer , thanks karen for correcting it btw is it also applicable on linux I have been searching for MySQLdb for python 2.6 on linux and could not find it Thanks Vemu On Mar 2, 10:34 pm, Karen Tracey wrote: > On Mon, Mar 2, 2009 at 12:03 PM, bv

Re: Django setup problem when executing syncdb

2009-03-02 Thread bvemu
Hi Ches The issue is that you are using python version 2.6 for which there is no support from the MySQLdb package so you have to downgrade your python version to 2.5.4 and let your PYTHONPATH point to that (for example I am using SLE 11.1 henceforth placed the bin of python 2.5.4 in my /home/s