Re: how to email a password

2006-07-18 Thread Ian Holsman
I do something similar to Kenneth.the other approach is to use something like OpenID, and make it somebody else's problem.On 19/07/2006, at 3:16 PM, Kenneth Gonsalves wrote:On 18-Jul-06, at 9:20 PM, va:patrick.kranzlmueller wrote: next problem with my user registration process:how do I send the

Re: how to email a password

2006-07-18 Thread Kenneth Gonsalves
On 18-Jul-06, at 9:20 PM, va:patrick.kranzlmueller wrote: > > next problem with my user registration process: > how do I send the password to registered users after they confirmed > their registration? > > the process should look like this: > 1. registration > 2. email confirmation > 3. account

Re: get many from multiple levels of one-to-many relations

2006-07-18 Thread Andrew
Here's how I did it for a similar situation I had. class MyCategory(models.Model): category = models.CharField(maxlength=50) parent_category = models.ForeignKey('self', blank=True, null=True, related_name='sub_categories') def all_items(self): data =

Re: Intermediary M2M admin troubles

2006-07-18 Thread markguy
As an interesting aside, the following portion of the class LabelIngredients *does* seem to have an effect: class Meta: verbose_name = 'Label Ingredient' ordering = [ 'order' ] So the ordering is at least possible!

Re: Intermediary M2M admin troubles

2006-07-18 Thread markguy
Yep, but that doesn't work for intermediary tables, because the field isn't BakedGoods.ingredient, it's LabelIngredients.ingredient_id. Or if it does work, it has to reference a different table somehow. I tried adding all that to the intermediary table, but nothing seemed to have any effect.

Re: Execute a script in manage.py shell

2006-07-18 Thread Russell Keith-Magee
On 7/19/06, Maciej Bliziński < [EMAIL PROTECTED]> wrote: I already checked the documentation for manage.py, but it doesn'tmention anything about executing a script.Sorry - nothing like that is in place at the moment. Other replies on this thread have shown two other alternatives; a third

Re: Extending pluralize?

2006-07-18 Thread Nebojsa Djordjevic
Carlos Yoder wrote: > Hello there, > > I'm currently developing my first app on Django, and it happens to be > in Slovenia, land in which the beautiful Slovenian language is spoken. > > In this language, the rules of pluralization go very crazy, as the > following example (for the word for

Re: Execute a script in manage.py shell

2006-07-18 Thread Russell Blau
"Maciej Blizinski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >On Tue, 2006-07-18 at 22:52 +0200, Maciej Blizinski wrote: >> I already checked the documentation for manage.py, but it doesn't >> mention anything about executing a script. > >Magus- from #django @ Freenode provided

Re: Intermediary M2M admin troubles

2006-07-18 Thread Jay Klehr
Here's the code used in the Tutorial example for collapsing in the admin interface: class Admin: fields = ( (None, {'fields': ('question',)}), ('Date information', {'fields': ('pub_date',), 'classes': 'collapse'}), )

Re: Execute a script in manage.py shell

2006-07-18 Thread Maciej Bliziński
On Tue, 2006-07-18 at 22:52 +0200, Maciej Bliziński wrote: > I already checked the documentation for manage.py, but it doesn't > mention anything about executing a script. Magus- from #django @ Freenode provided a solution: import sys,os sys.path.append('/path/to/root/of/django/projects/')

Re: Intermediary M2M admin troubles

2006-07-18 Thread markguy
Fixed, but not understood... Another post suggested that the order of the class declaration inside models.py was important, so I changed mine to reflect that. Order became Ingredients, BakedGoods, LabelIngredients. Also based on reading that post, I changed the LabelIngredients class to:

Re: Intermediary M2M admin troubles

2006-07-18 Thread markguy
Nope, you understood just fine. I was trying to order it in the M2Mi model. Thanks for the assist! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to email a password

2006-07-18 Thread patrickk
thanks james, jay ... I do see your arguments. it´s just a litte bit frustrating ... building the website using django was damn fast. now i´m stuck with the registration process ... it already took me twice as long as building the actual website. it´d be cool to have some kind of "best

get many from multiple levels of one-to-many relations

2006-07-18 Thread Corey
I have three tables: pubs, routes, and addresses, there is a hierarchical relation ship between them: one pub has many routes which in turn has many addresses. Simplified models: class Publication(models.Model): code = models.CharField(blank=True, maxlength=10, unique=True) name =

Re: how to email a password

2006-07-18 Thread Jay
Most systems do, if they don't send the password, they send a time sensitive link (randomly generated and hard to guess) that will take the user to a password change form where s/he gets to enter a new one. James Bennett wrote: > (but please note that's just me personally; the

Execute a script in manage.py shell

2006-07-18 Thread Maciej Bliziński
Hello djangoers, I'm new to Django and very excited about it. I've build a browsing tool for my legacy database. I have a question. I'd like to write a Python script that would be executed on the server and do some work with the data, using Django database API. Just like in manage.py shell, but

Re: how to email a password

2006-07-18 Thread James Bennett
On 7/18/06, James Bennett <[EMAIL PROTECTED]> wrote: > My personal preference is never to send the password over the wire > when there's not an extremely compelling reason to. So, if it were me, > I wouldn't send the password. (but please note that's just me personally; the PasswordResetForm

Re: how to email a password

2006-07-18 Thread James Bennett
On 7/18/06, patrickk <[EMAIL PROTECTED]> wrote: > 1. so what do you do when a user forgot his password? you obviously > can´t email it, so you have to set a new one. that seems a little > complicated (for the user). Check out the PasswordResetForm, a manipulator defined in

Re: display_name for FormFields

2006-07-18 Thread Todd O'Bryan
On Jul 17, 2006, at 10:43 AM, Todd O'Bryan wrote: > Would anyone object to a patch for FormFields that would allow a (by- > default None) keyword argument for display_name. Validator error > messages would be updated to use the display_name if it's defined, or > the field_name, if not. > > I

Re: how to email a password

2006-07-18 Thread Jay
It's considered bad practice to keep a user's password anywhere on your server in plain view. Many users use the same password across multiple systems, and if your server was ever compromised, the attacker would then have emails, usernames and passwords for a lot of different people

Re: storing language detection result in url (Internationalization)

2006-07-18 Thread littleswo
Thanks Waylan, that should solve my problems. Regards, littleswo --~--~-~--~~~---~--~~ 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

Re: More than one ForeignKey referencing the same model?

2006-07-18 Thread Guillaume Pratte
This seems indeed to be the solution! class Host(models.Model): [...] person_in_charge = models.ForeignKey(Person, related_name='hosts_in_primary_charge_set') backup_person = models.ForeignKey(Person, related_name='hosts_in_secondary_charge_set') Thanks. Le mardi 18

Re: how to email a password

2006-07-18 Thread patrickk
thanks james ... your answer leads to more questions: 1. so what do you do when a user forgot his password? you obviously can´t email it, so you have to set a new one. that seems a little complicated (for the user). 2. the user should set his own password, I agree. but that doesn´t mean,

Re: storing language detection result in url (Internationalization)

2006-07-18 Thread Waylan Limberg
On 7/18/06, littleswo <[EMAIL PROTECTED]> wrote: > > Hi there, > > iam building a mutlilingual site and i maybe wrong but LocaleMiddleware > primarily seems to be made to offer translated content solely based on > cooky, accept-language http header, etc.. but in the end it all seems > to result

Re: More than one ForeignKey referencing the same model?

2006-07-18 Thread James Bennett
On 7/18/06, Guillaume Pratte <[EMAIL PROTECTED]> wrote: > Is there a way around? The problem is that if you don't specify the 'related_name' argument for the foreign keys, the API wil default to calling both of them 'person'. And since you can't have two different things being 'host.person', it

Re: Intermediary M2M admin troubles

2006-07-18 Thread Jay
Forgive me if I'm mis-understanding you here, but to sort the select box of your ingredients you can add an 'ordering' to your ingredients model, like so... class Ingredient(models.Model) name = models.CharField() ... class Meta: ordering = ['name'] Which will sort the

storing language detection result in url (Internationalization)

2006-07-18 Thread littleswo
Hi there, iam building a mutlilingual site and i maybe wrong but LocaleMiddleware primarily seems to be made to offer translated content solely based on cooky, accept-language http header, etc.. but in the end it all seems to result in different content for the same url. What i would like to

Re: Intermediary M2M admin troubles

2006-07-18 Thread markguy
Actually, for a further while I'm at it, is there a way to add class: collapse to the M2M field? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Intermediary M2M admin troubles

2006-07-18 Thread markguy
I have models for baked goods and their ingredients, imaginatively named BakedGoods and Ingredients. I need to save the order of the ingredients for purposes of making informative labels. So, there's a third model, LabelIngredients, that is described by: baked_good = models.ForeignKey(

Re: Set up problems ( webfaction )

2006-07-18 Thread rp
>Wound up just copying the admin media directories into my media >directory. Pipe up if there's a better way ... Instead of copying, you can use a symbolic link to the media files: If the httpd.conf had: alias /media/ /home2/rp/webapps/django/media_files/media the link would be similar to:

Re: django admin errors

2006-07-18 Thread Johann
I'm having a similar issue. Here's a summary of my model. class Encyclopedie(models.Model): titre = models.CharField(maxlength=100, unique=True) index = models.ForeignKey("Page", related_name="index_set", blank=True, null=True) class Page(models.Model): encyclopedie =

Re: how to email a password

2006-07-18 Thread James Bennett
On 7/18/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: > since the password is stored encrypted, I´m not sure how to send it. There isn't any way to get at the 'raw' password once it's been encrypted; you'll need to work around this by emailing the password before it's encrypted, or by

how to email a password

2006-07-18 Thread va:patrick.kranzlmueller
next problem with my user registration process: how do I send the password to registered users after they confirmed their registration? the process should look like this: 1. registration 2. email confirmation 3. account activation & email with username and password 4. now the user can log in

Re: QuerySet

2006-07-18 Thread Aleksandr Vladimirskiy
Thanks Paul! My problem exactly!On 7/18/06, Paul Childs <[EMAIL PROTECTED]> wrote: Check this out.http://code.djangoproject.com/wiki/NewbieMistakesCheers,/Paul-- Александр ВладимирскийОаклэнд, Калифорния --~--~-~--~~~---~--~~ You received this message because you

Django position in Washington D.C. - The Washington City Paper

2006-07-18 Thread Brantley Harris
The Washington City Paper needs a Web Programmer to helm the technical rebirth of the alt newsweekly on the Web. Your job would be to help rethink and rebuild the site and site architecture, publish newspaper content on the Web weekly, produce Web-based projects daily, and rebuild and update

Re: QuerySet

2006-07-18 Thread Malcolm Tredinnick
Hi Sasha, On Tue, 2006-07-18 at 06:26 +, sasha wrote: > I'm sorry this is the method I've been trying to use > > def previous(request, picture_id): > artist_id = > Picture.objects.select_related().get(id=picture_id).artist_id > try: > previous_picture_id = >

Re: QuerySet

2006-07-18 Thread Paul Childs
Check this out. http://code.djangoproject.com/wiki/NewbieMistakes Cheers, /Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: psycopg2

2006-07-18 Thread [EMAIL PROTECTED]
Adrian Holovaty wrote: > From the looks of that traceback, you're using the "postgresql" > backend rather than the "postgresql_psycopg2" backend. To use Django > with psycopg2, make sure your DATABASE_ENGINE setting is set to > 'postgresql_psycopg2'. True, problem fixed. Thanks Adrian, Lorenzo

Re: How to ?

2006-07-18 Thread PythonistL
No, it does NOT work for me. Finally I found a reason. I use old Django version and I must use get_gallery() and not gallery.Similarly get_created() and not created, so wanted_user = photos.get_object(id__exact='3').get_gallery().get_created()

Re: ifequal template problem

2006-07-18 Thread Carlos Yoder
OK, I fixed it, by defining a 'computed' method that returns the int value in str form. So silly! def prva_registracija_mm_str (self): return str(self.prva_registracija_mm) Ohwell :-) On 7/17/06, Carlos Yoder <[EMAIL PROTECTED]> wrote: > Forgot to say, I have the same

Re: Compilation of 30 Django tutorials

2006-07-18 Thread [EMAIL PROTECTED]
I tried to put this list on the wiki but i can't create the page because the wiki seems to think I'm a spammer. I assume it's because it's mostly links but i tried to upload it in sections and it seems like I've been blacklisted. Any help? --~--~-~--~~~---~--~~

Admin and limit_choices_to, part XXXIII =)

2006-07-18 Thread Carlos Yoder
Hello, I know many before me have asked about making a dynamic limit_choices_to tag. So far, I've had no luck (note to Aidas: couldn't make your solution work!). Anyway, I'm thinking on doing it the old school way, which is creating arrays of JS objects with the relationships between 2

Error with "media" dir on Windows, Python 2.3, etc

2006-07-18 Thread Carlos Yoder
Hello people, On my dev box I'm having problems using the MEDIA_URL. I'm running the development server with the 'not-recommended' hack for serving static files, and I believe MEDIA_URL and MEDIA_PATH are correct (similar config work fine on production). Mind you, files get uploaded and saved

Re: QuerySet

2006-07-18 Thread sasha
I have a gallery of images. I've written two views, one pulls the next image, one the previous. i'd like the views to loop, returning the the first image when the next method reaches the end an d the last when the previous method does. The next method loops fine, but the previous doesn't. Here's

Re: QuerySet

2006-07-18 Thread Malcolm Tredinnick
On Tue, 2006-07-18 at 05:52 +, sasha wrote: > i'm trying to access the last record to loop over the query set. > however somehow when i call on Something.objects.order_by("-id")[0] the > set is truncated and it starts to loop over just the first and last > objects. Could you provide a