Re: Django on Apache (mod_python) administration cookie problem

2008-10-24 Thread M.Ganesh
Graham, Option 3: I use other utilities like wordpress and phpMyAdmin, so I cannot afford to disable php completely Option 2: I use Linux Mint (Ubuntu variant) for developement and Debian Etch for production. So for option 2, I will require two sets of instructions, which means more trouble fo

Re: Django on Apache (mod_python) administration cookie problem

2008-10-21 Thread M.Ganesh
Hi Daniel, I am also facing the same problem. I really can't understand the technicalities of the solution offered in this thread. Since you seemed to have solved the problem, can you please give a little more details on how to do it Thanks in advance Regards Ganesh Daniel bodom_lx Grazioti

Re: Cookie problem

2008-09-22 Thread M.Ganesh
plungerman wrote: > On Sep 19, 11:40 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > >> Getting the following error message when I try to access the admin page >> of my spanking new django 1.0 installation : >> "Looks like your browser isn't conf

Re: [Fwd: Cookie problem]

2008-09-20 Thread M.Ganesh
Malcolm Tredinnick wrote: > On Sun, 2008-09-21 at 07:17 +0530, M.Ganesh wrote: > >> Anyone? >> >> > > After all it's almost 24 hours since the last time you posted. And that > was a repeat of the thing you sent 24 hours or so before that. On a >

[Fwd: Cookie problem]

2008-09-20 Thread M.Ganesh
Anyone? I tried with 'runserver' instead of apache. The problem didn't go away. Kindly give me some pointers Regards Ganesh Original Message Hi, The in my apache config file has ServerName django1. I access the site with http://django1/admin/. I get a login page. when

Cookie problem

2008-09-19 Thread M.Ganesh
Hi, The in my apache config file has ServerName django1. I access the site with http://django1/admin/. I get a login page. when I give my username and password, I get the message given below. When I check the firefox cookies there is a cookie with name sessionid for this django1 site. W

Cookie problem

2008-09-19 Thread M.Ganesh
Getting the following error message when I try to access the admin page of my spanking new django 1.0 installation : "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." Other information : 1. django 0.96 working well in the same

Re: [Fwd: Custom field in JSON serializer]

2008-06-28 Thread M.Ganesh
Russell Keith-Magee wrote: > On Sat, Jun 28, 2008 at 6:03 PM, M.Ganesh <[EMAIL PROTECTED]> wrote: > >> people who asked after me got their answers, sometimes >> within 15 minutes. I've not got any answers >> > > Don't worry - we still l

[Fwd: Custom field in JSON serializer]

2008-06-28 Thread M.Ganesh
people who asked after me got their answers, sometimes within 15 minutes. I've not got any answers Should I reword my query? Regards Ganesh Original Message Hi All, I picked up this sample code from django documentation: from django.core import serializers data = se

Re: Models in multiple files and django command extensions

2008-06-27 Thread M.Ganesh
Vidja wrote: > Hi all > > Thanks to the help of Magus on IRC i have been able to setup my models > and their functions as separate files. > This works great for maintenance (the models.py file is created > automatically through a (ehm, perl) script) > But unfortunately it breaks Django command ext

Re: User Filtering

2008-06-27 Thread M.Ganesh
TiNo wrote: > Maybe even nicer, a selectbox containing all users, and an input that > pops up on focus to filter. That way the form degrades nicely when js > is turned off. Makes a big selectbox though... > > Hi TiNo I am also looking for a similar solution. Can you please point me to a tut

Custom field in JSON serializer

2008-06-26 Thread M.Ganesh
Hi All, I picked up this sample code from django documentation: from django.core import serializers data = serializers.serialize('xml', SomeModel.objects.all(), fields=('name','size')) How do I extend this to do the following: data = serializers.serialize('xml', SomeModel.objects.all(), fiel

Re: How to use dynamic choice in a ChoiceField

2008-06-26 Thread M.Ganesh
mwebs wrote: > Thanks Nathaniel, > > but where and how do I pass the Queryset? From my view? > I am sorry but I dont understand completly > > class MyModelChoiceField(forms.ModelChoiceField): > def label_from_instance(self, obj): > return "My Object #%i" % obj.id > > > class PictureFor

Re: How to use dynamic choice in a ChoiceField

2008-06-26 Thread M.Ganesh
mwebs wrote: > Hello, > > I am trying to do something like this > > class PictureForm(forms.Form): > image = forms.ImageField(label='Picture') > gallery= forms.ChoiceField(Gallery.objects.all()) > > this just works fine, but I only want to pass several Galleries to the > C

Re: help - limit_choices_to

2008-06-22 Thread M.Ganesh
Karen Tracey wrote: > On Sat, Jun 21, 2008 at 9:23 PM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Hi All, > > This question might have been answered so may times, but I am > unable to > glean the information I

help - limit_choices_to

2008-06-21 Thread M.Ganesh
Hi All, This question might have been answered so may times, but I am unable to glean the information I am looking for from the 260 odd entries that turn up while searching the mailing-list archives. So here I ask again #my models class entity(models.Model): name = models.Charfield()

Re: Timestamped comment field

2008-06-19 Thread M.Ganesh
Chris H. wrote: > On Jun 19, 12:53 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > >> Hi Chris, >> >> May be you can try this model : >> ... >> > > While I could store each comment off as an instance of a Comments > model,

Re: Timestamped comment field

2008-06-18 Thread M.Ganesh
Chris H. wrote: > Greetings all, > > I'm trying to figure out the best DRY way of doing this. I want to > have a comments field on several of my models. The idea behind this > field is that it would not actually be stored in the database, > instead it would be appended to another field with a t

Re: iterate over alphabet in template

2008-06-18 Thread M.Ganesh
Ned Batchelder wrote: > If you wanted to keep the alphabet issue out of the view, you could > also do this: > > {% for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" %} > > --Ned. > http://nedbatchelder.com > Super. I was just wondering how to do it. Thanks Ned Regards Ganesh --~--~-~--~~

Re: iterate over alphabet in template

2008-06-17 Thread M.Ganesh
> On Jun 17, 12:03 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > >> I would probably just pass in a python list with all of the letters in the >> alphabet, then just >> {% for l in alphabet_list %} ... >> -richard >> >> On 6/17/08, M.Gan

iterate over alphabet in template

2008-06-17 Thread M.Ganesh
Hi All, I am relatively new to both python and django. Please help me to do this : {% for letter in [A to Z] %} < how do I write this line in a template? {{letter}}  {% endfor %} Thanks in advance Regards Ganesh --~--~-~--~~~---~--~~ You received this

Re: Add filters to the Users List/Page in the admin app

2008-06-13 Thread M.Ganesh
Rajesh Dhawan wrote: > Hi Rishabh, > > >> This is what I was thinking, but I thought there was a glimmer of hope of >> achieving this without moving over to newforms-admin. Is there absolutely no >> way to do this using trunk?? >> > > There is: > > 1. You can tweak the django.contrib.auth

Re: Importing data from 'MS Access' .mdb files

2008-06-10 Thread M.Ganesh
Peter Herndon wrote: > Two possibilities come to mind. First, is the Python ADODBAPI module: > http://sourceforge.net/projects/adodbapi > > Second, as an *extremely* useful tool for this sort of thing, may I > suggest Navicat for MySQL on Windows? The Windows version allows you > to import .mdb

Re: Importing data from 'MS Access' .mdb files

2008-06-09 Thread M.Ganesh
and >>> then load it into your mysql db with python. there is a lot of >>> options, select the way you familiar with. >>> >>> On 9 июн, 04:30, "Jeffrey Johnson" <[EMAIL PROTECTED]> wrote: >>> >>>> Use access on y

Importing data from 'MS Access' .mdb files

2008-06-08 Thread M.Ganesh
Hi All, I am looking for tools/methods to read(if possible also write) data from .mdb files which are copied into my linux box with python. I require this for coercing existing legacy data into MySQL with some change in the data structure. The ultimate aim is to replace an application develop

Re: Help - m2m field in my model

2008-06-07 Thread M.Ganesh
[EMAIL PROTECTED] wrote: > The point for those "magic methods" in python is to provide a common > api to them, it's the same reason you do len(sequence) instead of > sequence.__len__(), or the reason we do 3 + 4 instead of 3.__add__(4). > > Thanks for your time Regards Ganesh --~--~-

Re: Help - m2m field in my model

2008-06-07 Thread M.Ganesh
[EMAIL PROTECTED] wrote: > Don't use the internal method, instead do unicode(self.location_type) > + ' - ' > > Done. BTW is there any specific reason for this suggestion? Thanks Ganesh --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Help - m2m field in my model

2008-06-06 Thread M.Ganesh
Rajesh Dhawan wrote: > >> My model : >> >> class phonenumber(models.Model): >> location_type = models.ForeignKey(location_type) >> location_description = models.CharField(max_length=50, blank=True) >> >> def __unicode__(self): >> if self.location_description: >>

Help - m2m field in my model

2008-06-06 Thread M.Ganesh
Hi, Excuse me for the dumb question. My model : class phonenumber(models.Model): location_type = models.ForeignKey(location_type) location_description = models.CharField(max_length=50, blank=True) def __unicode__(self): if self.location_description: retval = sel

Re: generic relations

2008-06-06 Thread M.Ganesh
Filippo Santovito wrote: > Hi all, > I've read http://www.djangoproject.com/documentation/models/generic_relations/ > . > How can I share a tag between Animal and Vegetables? > > have a look at http://code.google.com/p/django-tagging/ Ganesh --~--~-~--~~~---~--~--

Re: django-tagging installation problem

2008-06-04 Thread M.Ganesh
e consider the trees before print this email. > > On 2-Jun-08, at 11:05 PM, M.Ganesh wrote: > >> >> Hi, >> >> Running 'python manage.py syncdb' after including 'tagging' in the >> INSTALLED_APPS throws the following error. >> >>

Re: django-tagging installation problem

2008-06-03 Thread M.Ganesh
Matthias Kestenholz wrote: > On Tue, 2008-06-03 at 08:35 +0530, M.Ganesh wrote: > >> Hi, >> >> Running 'python manage.py syncdb' after including 'tagging' in the >> INSTALLED_APPS throws the following error. >> >> My django ver

django-tagging installation problem

2008-06-02 Thread M.Ganesh
Hi, Running 'python manage.py syncdb' after including 'tagging' in the INSTALLED_APPS throws the following error. My django version : (0, 97, 'pre') r7543 (trunk) Python version : Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) django tagging version : (0, 2.1001, None) How do I f

Re: url parameters go missing

2008-05-31 Thread M.Ganesh
Karen Tracey wrote: > On Sat, May 31, 2008 at 3:29 AM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Karen Tracey wrote: > > On Fri, May 30, 2008 at 9:48 PM, Karen Tracey > <[EMAIL PROTECTED] <mailto:[EMAIL PR

Re: url parameters go missing

2008-05-31 Thread M.Ganesh
Karen Tracey wrote: > On Fri, May 30, 2008 at 9:48 PM, Karen Tracey <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > On Fri, May 30, 2008 at 7:53 PM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > >

url parameters go missing

2008-05-30 Thread M.Ganesh
Hi All, I have this url to start a note_l1 addition : '/contacts/note_l1/add/?entity=2' This reaches the server and my code intact. An 'Add; page is displayed. After I fill the form and press the 'Add' button only the '/contacts/note_l1/add/' portion reaches the server. the '?entity=2' is m

Many to Many field and the template

2008-05-25 Thread M.Ganesh
Hi All, Unable to find a relevent info in the mail archives/ documentation. I am getting this error : TemplateSyntaxError at /contacts/entity/8/show/ Could not parse the remainder: ' et in entity.entity_type.all' from 'for et in entity.entity_type.all' #my model class entity(models.Model):

Re: admin and foreign key problem

2008-05-25 Thread M.Ganesh
Karen Tracey wrote: > On Sat, May 24, 2008 at 11:11 PM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Hi All, > > Having some problem with foreign key and adm

admin and foreign key problem

2008-05-24 Thread M.Ganesh
Hi All, Having some problem with foreign key and admin interface : #models--- class tagword(models.Model): name = models.CharField(max_length=50) def __unicode__(self): return self.name clas

Re: class diagram from models.py

2008-05-22 Thread M.Ganesh
Juanjo Conti wrote: > Several times I tried to generate an UML class diagram from my python > classes. I have used epydoc and the buil-in feature of SPE but the > resulting diagram did not like me. > > Is there a way to generate an UML class diagram from models.py? a > stanalone app or command? >

Re: How to use a string in filter()

2008-05-17 Thread M.Ganesh
caustic wrote: > > On May 17, 9:13 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > >> Hi All, >> >> I am back with another query >> >> I have this (generic) view function >> >> --8><-

How to use a string in filter()

2008-05-16 Thread M.Ganesh
Hi All, I am back with another query I have this (generic) view function --8>< def object_list(request, object, filter_string = None): if filter_string: object_list = object.objects.filter(filter_string) else: o

Re: Reference to the url of the current page in a template

2008-05-16 Thread M.Ganesh
}} in your templates, > assuming that the URLs are all on the same host. If not, you'll need > to use something like {{ request.META.HTTP_HOST }}://{{ request.path }}. > > -- Scott > > > On Fri, May 16, 2008 at 12:58 PM, M.Ganesh <[EMAIL PROTECTED] > <mailt

Reference to the url of the current page in a template

2008-05-16 Thread M.Ganesh
Hi, I don't know how to clearly explain what I want to know. Let me try once again... I have a small controlpanel page which I include in all my other pages. This control panel page has got a link to 'login' page. Users are allowed to view the pages without login, but they have to login if th

passing a string to model.objects.filter() method

2008-05-15 Thread M.Ganesh
Hi All #my function code def object_list(request, object, filter_string = None): if filter: object_list = object.objects.filter(filter_string) else: object_list = object.objects.all() return render_to_response(object.__name__ + '_list.html',

Re: Getting back to the same page after completing a task in another page

2008-05-15 Thread M.Ganesh
Adi Jörg Sieker wrote: > > On 13.05.2008, at 16:18, phillc wrote: > >> >> "I am new to web programming" >> "I am trying to use my own loginpage " >> >> is there a reason that contrib.auth doesnt meet your needs? >> > Good question. :) > > adi > Yes, I do agree, these two statements put next to eac

Re: Getting back to the same page after completing a task in another page

2008-05-12 Thread M.Ganesh
Adi Jörg Sieker wrote: > Hi, > On 12.05.2008, at 22:07, Adi Jörg Sieker wrote: > >> but the idea is the same. >> >> def login_view(request, next_url_from_page): > this might need to be a default parameter like: > def login_view(request, next_url_from_page=None): > >> if request.method == 'POST': >

Re: Getting back to the same page after completing a task in another page

2008-05-12 Thread M.Ganesh
Valts Mazurs wrote: > On Mon, May 12, 2008 at 4:13 PM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Thanks Ronny for your response, however this doesn't answer my > requirement. Probably I've to state my requirement m

Re: Getting back to the same page after completing a task in another page

2008-05-12 Thread M.Ganesh
Adi Jörg Sieker wrote: > > On 12.05.2008, at 15:13, M.Ganesh wrote: > >> Thanks Ronny for your response, however this doesn't answer my >> requirement. Probably I've to state my requirement more clearly. I have >> various pages for general viewing where auth

Re: Getting back to the same page after completing a task in another page

2008-05-12 Thread M.Ganesh
Ronny Haryanto wrote: > On Sun, May 11, 2008 at 11:55 AM, M.Ganesh <[EMAIL PROTECTED]> wrote: > >> I am displaying a list of records in a page. I have a link in that page >> which will take me to a form for adding one more record. How do I come >> back to th

Re: newforms and views.generic.create_update.create_object

2008-05-11 Thread M.Ganesh
Karen Tracey wrote: > On Sun, May 11, 2008 at 5:55 AM, M.Ganesh <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Hi all > > I am a django rookie. > > Is it true that "views.generic.create_update.create_object" gene

newforms and views.generic.create_update.create_object

2008-05-11 Thread M.Ganesh
Hi all I am a django rookie. Is it true that "views.generic.create_update.create_object" generate a oldform? (the documentation says so!) I have a template which renders a newform created with 'forms.Modelform' to my satisfaction. However when I try to use the same template in create_object

Getting back to the same page after completing a task in another page

2008-05-10 Thread M.Ganesh
Hi all, Trying to learn django. I am displaying a list of records in a page. I have a link in that page which will take me to a form for adding one more record. How do I come back to the previous page after adding a record? I remember seeing somewhere a trick involving something like Add.

UTF-8 encoding

2008-03-09 Thread M.Ganesh
Hi All, I am using MySQL. How to select UTF-8 encoding for the CharFields and TextFields in the models I create? Regards Ganesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: ModelForm ManyToMany add

2008-03-07 Thread M.Ganesh
Malcolm Tredinnick wrote: > On Thu, 2008-03-06 at 15:24 +0100, Alper Çugun wrote: > > >> If I have a model with a ManyToMany relation, the django admin shows >> multiselect widgets with a plus so you can add the related objects on >> the spot. Is there a way to duplicate this functionality when

Widgets from admin app

2008-03-06 Thread M.Ganesh
Hi, How do I go about using the widgets that are used in the admin app in my own app? Regards Ganesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: Iteration not working inside template

2008-03-06 Thread M.Ganesh
Malcolm Tredinnick wrote: > On Thu, 2008-03-06 at 09:17 +0530, M.Ganesh wrote: > >> Hi, >> >> I've pasted a minimalist code here: http://dpaste.com/hold/38198/ >> >> Only the table caption and the table headers show-up in the web page. >> The Lun

Iteration not working inside template

2008-03-05 Thread M.Ganesh
Hi, I've pasted a minimalist code here: http://dpaste.com/hold/38198/ Only the table caption and the table headers show-up in the web page. The LunchEnrty_list.count also shows up correctly, but there are no table rows. What am I missing TIA Regards Ganesh --~--~-~--~~-

initial value not working when used with SelectDateWidget

2008-03-05 Thread M.Ganesh
Hi, I want to show the current date in the Date field. It works 'SelectDateWidget' when I use the default widget. If I use 'SelectDateWidget' then I always get 1st January 2008. Is there a way to use 'SelectDateWidget' and still get current date in the input box? The code is pasted in the lin

initial value not working when used with SelectDateWidget

2008-03-05 Thread M.Ganesh
Hi, I want to show the current date in the Date field. It works 'SelectDateWidget' when I use the default widget. If I use 'SelectDateWidget' then I always get 1st January 2008. Is there a way to use 'SelectDateWidget' and still get current date in the input box? The code is pasted in the lin