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 grou

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 ad

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 da

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 user

Re: My Ratings System

2006-10-02 Thread Aidas Bendoraitis
Hello! As generic relations have no equivalents in the world of SQL relationships (1:1, 1:n, n:m), but it is rather a mix of DB technology and programming language, there is no easy way to solve your problem. Although you could combine something with lists of objects in Python level. Maybe the f

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 wh

Re: Custom Manager in a separate file gives strange error

2006-10-02 Thread Corey
Never mind, I figured it out. I put the import inside the class instead of outside the class. I need more caffeine. Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

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 PROTECT

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 firs

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 you

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', > password='

Re: How about a Django apps public repository?

2006-10-02 Thread Sean Schertell
>> I posted publicly about giving up on django because I thought it >> might help air out some niggling issues in django > > you have not answered the question. When you left PHP, did you post > publicly to help air out some niggling issues in PHP, like for > example, in your words 'a feeling of c

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 all

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 se

Shared hosting - FastCGI problems

2006-10-02 Thread orestis
The docs aren't quite clear on this. I follow the last section in the documentation http://www.djangoproject.com/documentation/fastcgi/ But when accessing the url, I get the following in the error log: [Sun Oct 1 18:07:38 2006] [error] [client xx.xx.xx.xx] File does not exist: /home/[username]

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 t

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

Re: How to join 2 QuerySets? (with QuerySet object in result)

2006-10-02 Thread Scater
Joe писал(а): > Are the news and articles using the same fields? yes. > News.objects.extras([ ' WHERE [...] UNION (SELECT * FROM ARTICLES > WHERE [...] )' ]) :))ok. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

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 becaus

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 Goo

php and django

2006-10-02 Thread Onno Timmerman
Is it a problem to run PHP and django on the same server? Onno --~--~-~--~~~---~--~~ 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

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: 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&querytype=simple&casefold=yes&req=search (Even though the title of the FAQ refers to MySQL, there is a mod_php conflict a

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 r

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 r

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 b

long db field names

2006-10-02 Thread ian
Hi, Bit of a newbie question. I am using longish field names in my db ...in the admin pages the ends of the names are covered up by the entry,drop down boxes etc...i am sure somewhere in the css i change this but... . The docs say: All admin pages (except the dashboard) are fluid-width. All fixed-

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 a

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 studie

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 studie

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 k

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

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 emai

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 key

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

2006-10-02 Thread frank
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 %} showing other things... {% endfor %} However the operation never indicates the desired default condition. If I force an exception, I can see that t

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

2006-10-02 Thread carlwenrich
--- Here's the model: class DaySlot(models.Model): slot = models.TimeField(core=True) taken = models.BooleanField(core=True) day = models.ForeignKey(Day, edit_inline=models.TABULAR, num_in_admin=6) def __str__(self): return str(self.slot) --- Here

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 peopl

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 ba

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', > 'False

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

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 h

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 t

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 l

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

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 an

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 this

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

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

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

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 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 f

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 django-users@goo

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 certain

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: 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 %} CHECKED

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, seemant <[EMAIL PROTECTED]> wrote: > > 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 /admi

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

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

2006-10-02 Thread frank
[snip] > > Sure -- seek_id is calculated in the view. It is delivered to the > > template > > via the second argument to render_to_response: { ..., "seek_id" : > > value,...}. > > Yes, I realised it came from the view like that. So my question wasn't > clear. What have you said doesn't tell us w

Re: sharing session information with plone

2006-10-02 Thread spacedman
ashwoods wrote: > 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. Haven't done this directly, but what you'd have to do is get the __ac cookie that p

Re: customizing the admin interface

2006-10-02 Thread Michael
On 10/3/06, Paul Barry <[EMAIL PROTECTED]> 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 has a ForeignKey and