Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 20:08 -0700, carlwenrich wrote: > I knew it was a problem (I didn't want to do it in the first place, > though I thank you for letting me know that it was even worse than I > thought). What I need to know is how to pass those values from one view > to a template, and then

Re: ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 20:12 -0700, frank wrote: > > Malcolm Tredinnick wrote: > > On Mon, 2006-10-02 at 16:05 -0700, frank wrote: > > > I have a simple loop which sets up a series of radio-buttons. > > > "objgroup" is > > > obtained through a DB query/filter: > > > > > > {% for obj in objgroup

Re: ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread frank
Malcolm Tredinnick wrote: > On Mon, 2006-10-02 at 16:05 -0700, frank wrote: > > I have a simple loop which sets up a series of radio-buttons. > > "objgroup" is > > obtained through a DB query/filter: > > > > {% for obj in objgroup %} > > >{% ifequal seek_id obj.id %}

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread carlwenrich
I knew it was a problem (I didn't want to do it in the first place, though I thank you for letting me know that it was even worse than I thought). What I need to know is how to pass those values from one view to a template, and then forward to the next view.

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 19:34 -0700, carlwenrich wrote: > How do I pass those (global) values from one view to another when going > through a template? You could put the information in the user's session (see [1]). You can store pretty much anything you like a session object, so if you want

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread carlwenrich
How do I pass those (global) values from one view to another when going through a template? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread seemant
Andy, This certainly gets me past the syncdb, so thanks! However, when I try to add a service, I get this (note that I have not yet added people or roles, I wanted to try adding them using the + in the service tab): TypeError at /admin/services/service/add/ Cannot resolve keyword ' name' into

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Malcolm Tredinnick
On Tue, 2006-10-03 at 12:12 +1000, Malcolm Tredinnick wrote: [...] > > In order to have a limit_choices_to that is only evaluated at runtime, > which is probably closer to what you want, you need to do something > similar to models.LazyDate() in Django -- which is the example given in > the docs

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Malcolm Tredinnick
On Tue, 2006-10-03 at 01:45 +, seemant wrote: > Hi, > > I'm sorry about that. All the ManyToManyFields have this sorta thing: > > LEM = models.ManyToManyField ( > Person, > related_name = 'LEM', > filter_interface = models.HORIZONTAL, >

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, seemant <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm sorry about that. All the ManyToManyFields have this sorta thing: > > LEM = models.ManyToManyField ( > Person, > related_name = 'LEM', > filter_interface = models.HORIZONTAL, >

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread seemant
Hi, I'm sorry about that. All the ManyToManyFields have this sorta thing: LEM = models.ManyToManyField ( Person, related_name = 'LEM', filter_interface = models.HORIZONTAL, limit_choices_to = { 'role__pk': Role.objects.get(name = 'LEM').id},

Anybody know of an example of a Django app that uses a JavaScript module?

2006-10-02 Thread carlwenrich
What I want to do is call a JavaScript module with clickable images, and then go to a Django view when a user clicks on an image. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Carl Wenrich
thanks much.Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: On Mon, 2006-10-02 at 16:51 -0700, carlwenrich wrote:[...]> def admin_wslots(request):> global venue> global vslot> global week> global wslot> global dayYou *really* don't want to use globals here. There doesn't appear to beany need

Re: Importing models from each other.

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 06:41 -0700, Gacha wrote: > I try to import like: "import myproject" and then > myproject.auth.models.User but no luck, Django throws error, that auth > has no models class. Is there a way to make this to work? I don't really have any ideas of the top of my head. However,

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 16:51 -0700, carlwenrich wrote: [...] > def admin_wslots(request): > global venue > global vslot > global week > global wslot > global day You *really* don't want to use globals here. There doesn't appear to be any need and it's going to cause

Re: ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 16:05 -0700, frank wrote: > I have a simple loop which sets up a series of radio-buttons. > "objgroup" is > obtained through a DB query/filter: > > {% for obj in objgroup %} > {% ifequal seek_id obj.id %} CHECKED {% endifequal %} > > showing other

Re: customizing the admin interface

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 18:06 -0400, Paul Barry wrote: > Is the admin interface customizable at all? Specifically: > > 1. Can you create a workflow, like step 1, step 2, step 3, then save object? > > 2. Can you create a lookup select for a foreign key? For example, if > I have an object that

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 17:54 -0400, Seemant Kulleen wrote: > Dear All, > > I've attached two files: people/models.py and services/models.py. I > have two many-to-many relationships defined: one is between people and > roles (each person can fill many roles, and each role can be filled by > many

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Carl Wenrich
i'll try it, but the database seems to be initialized properly, because when i look at the data thru the admin interface, it all looks good. it's the part where the template shows the checkboxes (after retrieving the data and presumably picking up the dslots.taken flag for each one) that shows

Re: Checkboxes all come up checked (after I've initialized them unchecked)

2006-10-02 Thread Vizcayno
> INSERT INTO sched_day (name) VALUES ('Eight To Five'); > INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('08:00', > 'True', '1'); > INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('09:30', > 'True', '1'); > INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('11:00', >

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread DruShell
Monday October 2, 2006 Seemant, I am new to django, but from my computer science and database background understand your question in regards to how databases work. The table 'people_role' would be a "linking table" for correct database relationship of performing a many-to-many operation. It

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, Seemant Kulleen <[EMAIL PROTECTED]> wrote: > Dear All, > > I've attached two files: people/models.py and services/models.py. I > have two many-to-many relationships defined: one is between people and > roles (each person can fill many roles, and each role can be filled by > many

customizing the admin interface

2006-10-02 Thread Paul Barry
Is the admin interface customizable at all? Specifically: 1. Can you create a workflow, like step 1, step 2, step 3, then save object? 2. Can you create a lookup select for a foreign key? For example, if I have an object that has a ForeignKey and there are 10,000 instances of the foreign

Re: urls and generic views with 2 slugfields

2006-10-02 Thread zenx
I will take a look at it. Thank you! --~--~-~--~~~---~--~~ 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

ManyToManyFields are not syncdb'able

2006-10-02 Thread Seemant Kulleen
Dear All, I've attached two files: people/models.py and services/models.py. I have two many-to-many relationships defined: one is between people and roles (each person can fill many roles, and each role can be filled by many people); and one is between each activity in the service (banner

Re: Need help understanding Custom Views

2006-10-02 Thread Waylan Limberg
On 10/2/06, adamjspooner <[EMAIL PROTECTED]> wrote: > > > Do you mean that you do not understand how to pass the data to the > > template for display, or something else? > > Waylan, > > I mean I don't understand how to pass the data from my Django app to my > PHP webservice and then let the user

Re: Need help understanding Custom Views

2006-10-02 Thread adamjspooner
> Do you mean that you do not understand how to pass the data to the > template for display, or something else? Waylan, I mean I don't understand how to pass the data from my Django app to my PHP webservice and then let the user know that everything went ok or post errors if it didn't. I

Re: Need help understanding Custom Views

2006-10-02 Thread adamjspooner
> Do you mean that you do not understand how to pass the data to the > template for display, or something else? Waylan, I mean I don't understand how to pass the data from my Django app to my PHP webservice and then let the user know that everything went ok or post errors if it didn't. I

sharing session information with plone

2006-10-02 Thread ashwoods
does anybody have experience of sharing session information from a plone site. I want our intranet users that are authenticaded in plone to be able to access django without having to relog. thx, ashley --~--~-~--~~~---~--~~ You received this message because you

Re: Need help understanding Custom Views

2006-10-02 Thread Waylan Limberg
On 9/29/06, adamjspooner <[EMAIL PROTECTED]> wrote: > > Adrian, > > I guess what I don't understand is how to use GET and POST...and what > exactly they are GETting and POSTing...and what to name things and how > to get those named things in the view to get to a template. > > I want to learn the

Re: urls and generic views with 2 slugfields

2006-10-02 Thread RajeshD
The generic list view can only directly handle pre-defined querysets (i.e. not ones that take slugs and other parameters from the request, url.) However, for your case, you can easily write your own view that builds the right queryset using the artist slug and album slug, and then hands off the

Re: php and django

2006-10-02 Thread Wade Leftwich
Onno Timmerman wrote: > Is it a problem to run PHP and django on the same server? > > Onno > This is a FAQ for modpython: http://www.modpython.org/FAQ/faqw.py?query=mod_php=simple=yes=search (Even though the title of the FAQ refers to MySQL, there is a mod_php conflict addressed there.) So

Re: php and django

2006-10-02 Thread phxx
It could be a problem if you are using the apache webserver with php using mod_php and django using mod_python. This could raise some mystical disappointments with MySQL. So I think its the best idea to run django with FastCGI. just my opinion, phxx

Re: Importing models from each other.

2006-10-02 Thread Gacha
I try to import like: "import myproject" and then myproject.auth.models.User but no luck, Django throws error, that auth has no models class. Is there a way to make this to work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Shared hosting - FastCGI problems

2006-10-02 Thread orestis
Sorry for the double post, this message didn't show up for 12 hours or so. Please continue here: http://groups.google.com/group/django-users/browse_frm/thread/ca36e7f1ce71c577/93ec9ceebf4bbd5e#93ec9ceebf4bbd5e --~--~-~--~~~---~--~~ You received this message

Re: Was: [Re: Why I'm giving up on Django] Now: Creating Debian Application Installer package

2006-10-02 Thread Jon Atkinson
Thanks for that information, Ian - I was anticipating a day or so of reasearch next week to package up my app, but hopefully I won't have to now. --Jon On 10/2/06, ian <[EMAIL PROTECTED]> wrote: > > Baurzhan Ismagulov wrote: > > Hello mamcxyz, > > > > On Fri, Sep 29, 2006 at 07:43:49AM -0700,

Was: [Re: Why I'm giving up on Django] Now: Creating Debian Application Installer package

2006-10-02 Thread ian
Baurzhan Ismagulov wrote: > Hello mamcxyz, > > On Fri, Sep 29, 2006 at 07:43:49AM -0700, mamcxyz wrote: >> - Deployment. I work on Delphi and the idea of put a EXE and all is >> working right (tm) is a feeling I lost with python on hosting. > > So what about writing a small script that will do

Deployment using cpanel

2006-10-02 Thread orestis
Hello, I need some help on deploying django on a cpanel shared server. I follow the last section in the documentation on using fastcgi, but I get the following error when hitting the URL: [Sun Oct 1 18:19:00 2006] [error] [client xx.xx.xx.xx] FastCGI: incomplete headers (0 bytes) received from

urls and generic views with 2 slugfields

2006-10-02 Thread zenx
Hi, I've got 3 models: Artist, Album and Song. For getting an artist info I use: (r'^artists/(?P[-\w]+)/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, slug_field='identificador')), I want an url like www.mysite.com/artists/black_eye_peas/albums/album_name for getting

Re: createsuper user by shell

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 10:55 +0200, Holger Schurig wrote: > > In the last svn version I can't use django-admin > > createsuperuser name mail passw > > > > How to add a super user by python shell ? > > from django.contrib.auth.models import User > > user = User( > username='name', >

Re: Custom Manager in a separate file gives strange error

2006-10-02 Thread Malcolm Tredinnick
On Mon, 2006-10-02 at 02:10 -0700, Corey wrote: > Never mind, I figured it out. I put the import inside the class instead > of outside the class. > > I need more caffeine. Wait a minute, here... I just wrote 400 words on where the problem is going to be (assuming it was a Django bug) and how

Re: Custom Manager in a separate file gives strange error

2006-10-02 Thread Malcolm Tredinnick
Hi Corey, On Mon, 2006-10-02 at 02:06 -0700, Corey wrote: > I have put a custom manager in a file called managers.py. When I import > it in the model, and assign it to objects I get this strange error: > > unbound method contribute_to_class() must be called with AddressManager > instance as

Re: createsuper user by shell

2006-10-02 Thread Holger Schurig
> In the last svn version I can't use django-admin > createsuperuser name mail passw > > How to add a super user by python shell ? from django.contrib.auth.models import User user = User( username='name', password='sha1$8b4ed$jfhjdhfjhsw4334uhxnxcywjiewwcccf3a6d8326', email='[EMAIL

Custom Manager in a separate file gives strange error

2006-10-02 Thread Corey
I have put a custom manager in a file called managers.py. When I import it in the model, and assign it to objects I get this strange error: unbound method contribute_to_class() must be called with AddressManager instance as first argument (got ModelBase instance instead) I don't get the error

Re: displaying email adresses as pictures

2006-10-02 Thread Onno Timmerman
[EMAIL PROTECTED] schreef: > I'm building a new site for my research department, andsince we are all > getting fresh email adresses, we would like to display the email > adsresses as pictures (to prevent getting the enourmous amounts of spam > like on the old ones...) > > I have some sort of

Re: displaying email adresses as pictures

2006-10-02 Thread Daniel Roseman
[EMAIL PROTECTED] wrote: > I'm building a new site for my research department, andsince we are all > getting fresh email adresses, we would like to display the email > adsresses as pictures (to prevent getting the enourmous amounts of spam > like on the old ones...) > > I have some sort of user

displaying email adresses as pictures

2006-10-02 Thread [EMAIL PROTECTED]
I'm building a new site for my research department, andsince we are all getting fresh email adresses, we would like to display the email adsresses as pictures (to prevent getting the enourmous amounts of spam like on the old ones...) I have some sort of user database so that in the admin i can

Re: HTTPS protocol

2006-10-02 Thread puyuus
ok! thank you very much for your answers. petru. --~--~-~--~~~---~--~~ 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