Re: physical path of an uploaded image

2006-03-17 Thread Sasha
Thank you! That work great. --~--~-~--~~~---~--~~ 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

Re: physical path of an uploaded image

2006-03-17 Thread Kenneth Gonsalves
On Saturday 18 Mar 2006 12:06 pm, Sasha wrote: > i have a django app that allows images to be uploaded. when i try > to reference an image in a template by calling > object.get_image_url or object.get_image_filename i get the full > physical path including the filename in response. can anyone >

Re: How to get vote total in poll tutorial

2006-03-17 Thread [EMAIL PROTECTED]
No, one underscore doesn't work: choices.get_values(fields=['poll', 'votes'], poll_id=1) returns TypeError: got unexpected keyword argument 'poll_id' I'm using two underscores because that's my (limited) understanding of the field__lookuptype syntax of the API documentation

physical path of an uploaded image

2006-03-17 Thread Sasha
i have a django app that allows images to be uploaded. when i try to reference an image in a template by calling object.get_image_url or object.get_image_filename i get the full physical path including the filename in response. can anyone recommend an approach to troubleshoot this? i'm running

physical path appear in uploaded image

2006-03-17 Thread Sasha
i have an that allows images to be uploaded. when i try to reference an image in a template by calling object.get_image_url or object.get_image_filename i get the full physical path including the filename in response. can anyone recommend an approach to troubleshoot this? thanks, sasha

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 6:20 pm, Les Smithson wrote: > Write you own login_required and use that as a decorator: > > from django.views.decorators.auth import user_passes_test, > login_required > mylogin_required = user_passes_test(lambda u: not > u.is_anonymous(), login_url="/my/login/") simpler

Many to one screwed up in admin

2006-03-17 Thread Todd O'Bryan
I have a Question class. I also have a QuestionDatum class that has Question as a ForeignKey field (possible multiple choice answers, correct answer, the question text, etc., are stored in QuestionDatum objects). I'm trying to edit these using the admin interface. I've set up edit_inline,

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 6:20 pm, Les Smithson wrote: > Write you own login_required and use that as a decorator: > > from django.views.decorators.auth import user_passes_test, > login_required > mylogin_required = user_passes_test(lambda u: not > u.is_anonymous(), login_url="/my/login/") > >

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 5:43 pm, Amit Upadhyay wrote: > Monkey patching: > > If you find > login_requiredication/#the-login-required-decorator>decorator enough for your > needs, but do not like the /accounts/login/ url, you can edit >

Re: Getting an object' content_type_id

2006-03-17 Thread Adrian Holovaty
On 3/9/06, Rob Slotboom <[EMAIL PROTECTED]> wrote: > Is there a way to get an object's content_type_id? > > I need it to store an object's id and content_type_id in another table. > > Currently I solved this by using an sql-statement but maybe there is > some 'hidden' property or function like: >

Re: Eclipse based Django IDE???

2006-03-17 Thread [EMAIL PROTECTED]
I also use Eclipse and PyDev for my IDE, Eclipse has some very nice plugins for HTML / JS / CSS called the WTP or web tools platform. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: information about django on dreamhost

2006-03-17 Thread James Bennett
On 3/17/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > Kevin Dangoor, author of TurboGears, just posted on the TG list about a > conversation he just had with the folks over at Dreamhost. Sounds like > they're recommending people to not run TurboGears on their servers, and > this would presumably

Re: information about django on dreamhost

2006-03-17 Thread [EMAIL PROTECTED]
I also use Dreamhost for several Django projects of mine. http://www.socialistsoftware.com/ http://impactsport.org/ http://coloradoridge.com/ I wont say that the experience has been perfect, but I have things working and I will continue to be a subscriber. I do recommend every Dreamhost user

Re: Suggested Method of Coordinating DB Schema and Python Model

2006-03-17 Thread Adrian Holovaty
On 3/17/06, Mike <[EMAIL PROTECTED]> wrote: > Here's what I think Django needs: > > A utility which analyzes both the DB Schema *and* the python model. > The output will be a 'suggested' revision to the model which will > retain everything which has not changed, comment out items which have >

Suggested Method of Coordinating DB Schema and Python Model

2006-03-17 Thread Mike
First, I just found out about Django and really like what I have seen so far. Even so, I don't think it will be really successful unless Django provides tools for automatically coordinating DB Schema changes and the Python Code. Please don't hang up yet - I have a suggestion. I just spent

Re: Sorting and Linking in Admin mode

2006-03-17 Thread dave.l
Hi Adrian, Thank you for your swift reply. 1) Perfect! sorted menus 2) I get a 1054, "Unknown column 'coils_buildings.principal_name' in 'order clause'" doing this class Building(meta.Model): class META: ordering = ('principal_name',) admin = meta.Admin() class

Re: information about django on dreamhost

2006-03-17 Thread PythonistL
I use Dreamhost with Django for some time already and I am happy with that.Works great! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Sorting and Linking in Admin mode

2006-03-17 Thread Adrian Holovaty
On 3/17/06, dave.l <[EMAIL PROTECTED]> wrote: > 1) Menu item ordering > > class Iconography(meta.Model): > description = meta.CharField(maxlength=255) > def __repr__(self): > return self.description > class META: > admin = meta.Admin( > ordering =

information about django on dreamhost

2006-03-17 Thread Jeremy Jones
Kevin Dangoor, author of TurboGears, just posted on the TG list about a conversation he just had with the folks over at Dreamhost. Sounds like they're recommending people to not run TurboGears on their servers, and this would presumably apply to Django as well. Here's a link to his post:

Re: Advice on developing with django for a team of 10+

2006-03-17 Thread Julio Nobrega
On 3/17/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > Actually, if you do ``svn export > http://path.to.svn.server/path/to/repository/`` > it'll strip out all the .svn cruft for you. I didn't know that Jeremy, tnx! -- Julio Nobrega - http://www.inerciasensorial.com.br

Re: How to populate a form with multiple values

2006-03-17 Thread limodou
On 3/17/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Limodou, > I have the custom manipulator, see the beginning of this thread. > But I do not know how to populate data from that manipulator to the form > the data passed to FormWrapper should match the name of FormField's field_name. I checked

Re: Advice on developing with django for a team of 10+

2006-03-17 Thread Jeremy Jones
On Thu, 16 Mar 2006 23:53:56 -0300 "Julio Nobrega" <[EMAIL PROTECTED]> wrote: > > Hey tone, > > Eric provided a good explanation of what's like working with svn. I > would like to comment a little on point number 3. > > Having everything on svn helps us on deployment too. Most software

Re: Once more: sqlall and sqlindexes

2006-03-17 Thread Ned Batchelder
Submitted as http://code.djangoproject.com/ticket/1508 --Ned. Adrian Holovaty wrote: On 3/16/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: Why doesn't the sqlall command include sqlindexes? It should. Why would I want to create and initialize a database without the indexes?

problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
hi, my site is on "/web/', so for example, my home page is: http://mysite.com/web/home/ and admin is in: http://mysite.com/web/admin/ but using login_required decorator, the thing is directed to: http://mysite.com/accounts/login/ when i want it to go to http://mysite.com/web/login/ How to

Re: How to populate a form with multiple values

2006-03-17 Thread PythonistL
Kenneth,Thank you for your idea.It can be really better to use sessions. But now the biggest problem for me is that I can not display multiple values from the shopping cart in input fields of my form. Any idea? Thanks --~--~-~--~~~---~--~~ You received this

Re: How to populate a form with multiple values

2006-03-17 Thread [EMAIL PROTECTED]
limodou wrote: > On 3/17/06, PythonistL <[EMAIL PROTECTED]> wrote: > > > > Kenneth, > > > > I think ChangeManipulator is concerned to a single object, but what > you will deal with are many objects, so you should create a custom > manipulator yourself. My concern with a custom manipulator would

Sorting and Linking in Admin mode

2006-03-17 Thread dave.l
I have been playing with Django for only a day or so but have had great success coercing a legacy database into the Django world. I have quickly found that the Admin interface *nearly* provides all the editing features I currently need for updating my DB and I think it would be a great shame to

Re: How to populate a form with multiple values

2006-03-17 Thread PythonistL
Limodou, Thanks for your reply and your comments. But still I do not know how to transfer data from the shopping cart into a form Can you advise? Thanks L. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: How to populate a form with multiple values

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 3:32 pm, PythonistL wrote: > I have a table that stores a shopping cart. But do you think that > storing the shopping cart in a dictionary in the session would be > a better solution? yes - then, when all is done, you can save it into one or more tables. At least that is

Re: How to populate a form with multiple values

2006-03-17 Thread limodou
On 3/17/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Kenneth, > Thank you for your reply. > I have a table that stores a shopping cart. But do you think that > storing the shopping cart in a dictionary in the session would be a > better solution? > > Thank you for the reply > I think

Re: How to populate a form with multiple values

2006-03-17 Thread PythonistL
Kenneth, Thank you for your reply. I have a table that stores a shopping cart. But do you think that storing the shopping cart in a dictionary in the session would be a better solution? Thank you for the reply --~--~-~--~~~---~--~~ You received this message

Re: How to populate a form with multiple values

2006-03-17 Thread limodou
On 3/17/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Limodou, > Thank you for your reply. > And do you have any idea how FormWrapper should be used? > In my shop project I need to provide a feature to a user , when he > does/finish shopping to be able to check all items in his basket.In > other

Re: How to populate a form with multiple values

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 2:49 pm, PythonistL wrote: > Item1               Quantity1(input field so that the user can > change that) > Item2               Quantity2(input field so that the user can > change that) > Item3               Quantity3(input field so that the user can > change that) > ... >

Re: How to populate a form with multiple values

2006-03-17 Thread PythonistL
Limodou, Thank you for your reply. And do you have any idea how FormWrapper should be used? In my shop project I need to provide a feature to a user , when he does/finish shopping to be able to check all items in his basket.In other words, he will see all items he has put into the basket so far.

Re: Django, Eclipse, Pydev, Ant (was: Ant and Eclipse (build.xml by Steven Armstrong))

2006-03-17 Thread Todd O'Bryan
As you suspected, running helloworld.py from build.xml didn't work, either. No useful errors, just the following: -- Buildfile: /Users/tobryan1/Documents/eclipse/workspace/pytest/build.xml hello-world: BUILD FAILED /Users/tobryan1/Documents/eclipse/workspace/pytest/build.xml:10: