Re: migration problem from Django0.96 to Django1.0

2008-09-14 Thread vijay bhaskar
I solved that problem. On Mon, Sep 15, 2008 at 11:09 AM, vijay bhaskar <[EMAIL PROTECTED]> wrote: > > > On Mon, Sep 15, 2008 at 11:07 AM, vijay bhaskar <[EMAIL PROTECTED]> wrote: > >> Hi karen,Thanks for your reply.but the problem is ,there is no definition >> for WEEKDAYS_ABBR in the django.util

Re: migration problem from Django0.96 to Django1.0

2008-09-14 Thread vijay bhaskar
Hi karen,Thanks for your reply.but the problem is ,there is no definition for WEEK_ABBR in the django.utils.dates.That's the reason its throwing error.How can i get rid of this? Thanks & regards Vijay On Sat, Sep 13, 2008 at 5:39 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Sat, Sep 13, 200

Re: Persistent Global Imports

2008-09-14 Thread Graham Dumpleton
On Sep 15, 1:50 pm, "Chris Spencer" <[EMAIL PROTECTED]> wrote: > One minor question. I'd like to test multiple mod_wsgi Django apps > locally, each accessed like localhost/app*. Can I simply use the above > directives for each app in httpd.conf without using a VirtualHost for > each app? Not qu

Re: Running into errors using S3 backend for Django

2008-09-14 Thread David Zhou
On Sep 15, 2008, at 1:01 AM, vinay wrote: > File "/usr/lib/python2.5/site-packages/django/core/files/ > storage.py", line 81, in path >raise NotImplementedError("This backend doesn't support absolute > paths.") > NotImplementedError: This backend doesn't support absolute paths. Sounds like

Re: using forloop variable to get the provide special tags for the 4th element.

2008-09-14 Thread Lee Hinde
On Sun, Sep 14, 2008 at 10:00 PM, sotirac <[EMAIL PROTECTED]> wrote: > > In the django template where I am using a for loop, I have to use a > special tag (div class="yui-u first" instead of div class="yui") for > every forth item. Im trying to create a table with three columns. I > can access t

Running into errors using S3 backend for Django

2008-09-14 Thread vinay
I have been trying to test the S3 backend for Django. I am using the code drop from http://code.larlet.fr/doc/django-s3-storage.html for my default storage as per the instructions on the website. The storage tests (included in the instructions) went fine with my S3 account. I have been running in

using forloop variable to get the provide special tags for the 4th element.

2008-09-14 Thread sotirac
In the django template where I am using a for loop, I have to use a special tag (div class="yui-u first" instead of div class="yui") for every forth item. Im trying to create a table with three columns. I can access the first loop but how do I do it for every third. -- {% extends "b

Re: Persistent Global Imports

2008-09-14 Thread Chris Spencer
One minor question. I'd like to test multiple mod_wsgi Django apps locally, each accessed like localhost/app*. Can I simply use the above directives for each app in httpd.conf without using a VirtualHost for each app? Chris On Sun, Sep 14, 2008 at 11:43 PM, Chris Spencer <[EMAIL PROTECTED]> wrot

Re: Persistent Global Imports

2008-09-14 Thread Chris Spencer
Nevermind. I just found your post on this issue at http://code.google.com/p/modwsgi/wiki/ConfigurationIssues On Sun, Sep 14, 2008 at 11:32 PM, Chris Spencer <[EMAIL PROTECTED]> wrote: > Ok, so this is what I put at the bottom of my httpd.conf: > > WSGIDaemonProcess myapp processes=1 threads=25 >

Re: Persistent Global Imports

2008-09-14 Thread Chris Spencer
Ok, so this is what I put at the bottom of my httpd.conf: WSGIDaemonProcess myapp processes=1 threads=25 WSGIProcessGroup myapp Alias /myapp/static /usr/local/django/myapp/static/ Order deny,allow Allow from all WSGIScriptAlias /myapp /usr/local/django/myapp/apache/django.wsgi Orde

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread lingrlongr
Are we still on this!?!? There are SPAM filters (like Spam Assassin) that automatically add this in the subject if it this an email is SPAM. Relax! On Sep 14, 9:19 pm, n00m <[EMAIL PROTECTED]> wrote: > Next time you open your own thread > let me know: > I'll mark it as ***SPAM*** > and we'll se

Re: working with yaml fixtures

2008-09-14 Thread Russell Keith-Magee
On Mon, Sep 15, 2008 at 10:27 AM, sotirac <[EMAIL PROTECTED]> wrote: > > I'm trying to initialize my database using yaml fixtures. > I've created a yaml fixtures directory (src/fixtures). Within the > yaml fixtures directory, I created a yaml fixtures file title > websites.yaml. ... > Now when I

working with yaml fixtures

2008-09-14 Thread sotirac
I'm trying to initialize my database using yaml fixtures. I've created a yaml fixtures directory (src/fixtures). Within the yaml fixtures directory, I created a yaml fixtures file title websites.yaml. I first had error saying that: neptune:$ python manage.py loaddata fixtures/websites.yml Probl

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread n00m
Next time you open your own thread let me know: I'll mark it as ***SPAM*** and we'll see how tolerant *you* are. On Sep 15, 1:47 am, Martin Diers <[EMAIL PROTECTED]> wrote: > Chill out. It's a personal website - no product being sold or   > advertised. > > If this group were moderated, you wou

Re: Admin inlines and foreign keys

2008-09-14 Thread Karen Tracey
On Sun, Sep 14, 2008 at 4:26 PM, Donn <[EMAIL PROTECTED]> wrote: > > > That should happen automatically - you shouldn't see the foreign key > > to the parent model. Can you post your model and admin code on > > dpaste.com so we can work out what's wrong? > Thanks, I'm sure it's something dumb I'm

Re: Admin Inline does not want to edit

2008-09-14 Thread Aric Coady
I think this is the same error I'm seeing in http://code.djangoproject.com/ticket/9076. It involves getting duplicate pks from the form. I've used the below workaround in the meantime. Index: django/forms/models.py === --- django/f

Re: The User mess

2008-09-14 Thread Rodney Topor
I second this suggestion. I've struggled to decide whether to extend auth.User with a profile class with a reference to auth.User as recommended in the docs or by defining a superclass of auth.User. Each method has its pros and cons, but neither method is completely satisfactory. Rodney On Sep

Re: uses_case_insensitive_names = True

2008-09-14 Thread Martin Diers
On Sep 14, 2008, at 4:22 PM, sal wrote: > > Have looked extensively but cannot find a solution :( > > While trying to follow tutorial in a django book, I get the following > error when running manage.py a second time: > > _mysql_exceptions.OperationalError: (1050, "Table 'people_person' > already

Re: Strange URL behavoir/problem

2008-09-14 Thread djandrow
No, thats why its wierd, it just says; Page not found (404) Request Method: GET Request URL:http://www.url.net/2008/aug/ no other information at all, thts why its really strange. Andrew --~--~-~--~~~---~--~~ You received this message because you are s

Re: Strange URL behavoir/problem

2008-09-14 Thread Martin Diers
On Sep 14, 2008, at 5:16 PM, djandrow wrote: > > I have the folling urls: > > (r'^(?P\d{4})/$', > 'django.views.generic.date_based.archive_year', archive_info), > (r'^(?P\d{4})/(?P[a-z]{3})/$', > 'django.views.generic.date_based.archive_month', archive_info), > > and archive_info is: > > archive_

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Martin Diers
On Sep 14, 2008, at 12:59 PM, n00m wrote: > > What is the http://www.thomas-guettler.de/? > > Remove from your sig this link to your f**king spam-like site. > > On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: >> Thomas Guettler,http://www.thomas-guettler.de/ > Chill out. It's a pe

foreign key passed as form field?

2008-09-14 Thread Rob
Apologies for the likely noob question as I'm just getting started with Django: I'd like users to be able to input a Book.id as a form field, with validation that the id exists. Here's what I have so far: class ShelfSaveForm(forms.Form): barcode = forms.IntegerField( label='enter ID',

Strange URL behavoir/problem

2008-09-14 Thread djandrow
I have the folling urls: (r'^(?P\d{4})/$', 'django.views.generic.date_based.archive_year', archive_info), (r'^(?P\d{4})/(?P[a-z]{3})/$', 'django.views.generic.date_based.archive_month', archive_info), and archive_info is: archive_info = { 'queryset' : Entry.objects.all(), 'dat

uses_case_insensitive_names = True

2008-09-14 Thread sal
Have looked extensively but cannot find a solution :( While trying to follow tutorial in a django book, I get the following error when running manage.py a second time: _mysql_exceptions.OperationalError: (1050, "Table 'people_person' already exists ") I am running a development server on Window

Re: Problems with signals accessing kwargs

2008-09-14 Thread Erik Allik
Or: def mail_on_create_intro(sender, created=None, **kwargs): if created: email_body = 'A new intro at ' + instance.url email_subject = 'New intro' else: email_body = 'An intro has changed at ' + instance.url email_subject = 'Changed Intro' mail_

Re: Problems with signals accessing kwargs

2008-09-14 Thread globophobe
Try: if 'created' in kwargs: if kwargs['created']: # Send email --~--~-~--~~~---~--~~ 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@googlegroup

Problems with signals accessing kwargs

2008-09-14 Thread Benjamin Buch
Hi, I have this code in myapp.intros.models to send a mail to the managers each time an intro gets saved: from django.db.models.signals import post_save from django.core.mail import mail_managers def mail_on_create_intro(sender, **kwargs): if created: email_body = 'A new intro a

Re: Admin inlines and foreign keys

2008-09-14 Thread Ali Deniz EREN
So closed problem with me. My model's parent is itself. I mean, I want it like that. class Content(models.Model): subtitle = models.CharField(blank=True, max_length=300, help_text='Something is coming.') title = models.CharField(max_length=300, unique=True, help_text='Something is coming.'

Re: Admin inlines and foreign keys

2008-09-14 Thread Donn
> That should happen automatically - you shouldn't see the foreign key > to the parent model. Can you post your model and admin code on > dpaste.com so we can work out what's wrong? Thanks, I'm sure it's something dumb I'm doing. Here: http://dpaste.com/78053/ \d --~--~-~--~~

Change 'name' attribute of form field

2008-09-14 Thread globophobe
Prior to django's 1.0 release, I had unfortunately avoided django's forms. Now, I've mostly converted my project to make use of them. I want to use django to display the form field in my templates; however, I want the 'name' attribute of the field to be as below, but the value does not change: I

Re: Internal server error upgarding from 0.97 to 1.0

2008-09-14 Thread Martin Diers
On Sep 9, 2008, at 10:39 AM, Haku wrote: > > Hello, i'm quite frustrated by this problem. > Today i had the idea to update my svn from the old 0.97 to the 1.0 > release, and now nothing is working anymore. > > I always get an anonymous "Internal Server Error" > Maybe because my project included

Re: ORM vs SQL vs HBase

2008-09-14 Thread Martin Diers
On Sep 13, 2008, at 7:11 PM, Russell Keith-Magee wrote: > > On Sun, Sep 14, 2008 at 7:24 AM, Martin Diers <[EMAIL PROTECTED]> wrote: >> >> On Sep 6, 2008, at 11:36 AM, Posi wrote: >>> >>> Still though, how tied are we to a true relational model and how >>> does >>> that tie to a column based D

Re: Admin inlines and foreign keys

2008-09-14 Thread Daniel Roseman
On Sep 14, 9:05 am, Donn <[EMAIL PROTECTED]> wrote: > Hi, > I have been looking, but can't find. > > I have a Client model with a Website inline (related by FK). it's open in a > change screen in the admin. > The inline below has a field that refers to the parent Client. > That field is a drop-dow

Re: Customizing new comment

2008-09-14 Thread Dmitry Dzhus
chatchai wrote: > 2. Once I authenticate user, no need to have user filling user name > and email. Unfortunately, comment form required those fields. Not really. If user is authenticated, her id is stored along with comment in DB, and you can transparently access user_name and user_email like if

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden
Steve Holden wrote: > n00m wrote: >> What is the http:[...]? >> >> Remove from your sig this link to your f**king spam-like site. >> >> On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: >> >>> Thomas Guettler[...] > If you think it's spam, why add another link to Google by quoting

Re: Database Security

2008-09-14 Thread Mario
All, Thank you very much for all the insightfull techniques. I will test the proposed functionalities in a lab environment prior to deployment. V/r, -Mario On Sep 13, 5:32 pm, Sander Steffann <[EMAIL PROTECTED]> wrote: > Hi Mario, > > > DATABASE_HOST ="http://192.168.1.128"; > > DATABASE_HOST

Re: 3 models need to access 1 model

2008-09-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Thanks Steve. I currently don't have an admin.py file in any of my > apps. Is this as simple as creating the file and moving all > admin.site.register() and admin.ModelAdmin sections into it ? and the > file gets autoloaded ? > Pretty much, yes. regards Steve --~-

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden
n00m wrote: > What is the http://www.thomas-guettler.de/? > > Remove from your sig this link to your f**king spam-like site. > > On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > >> Thomas Guettler,http://www.thomas-guettler.de/ If you think it's spam, why add another link to Goo

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread n00m
What is the http://www.thomas-guettler.de/? Remove from your sig this link to your f**king spam-like site. On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Thomas Guettler,http://www.thomas-guettler.de/ --~--~-~--~~~---~--~~ You received this mess

Re: maxlength or max_length?

2008-09-14 Thread djandrow
Thanks, its a shared server so I will have to enquire as to what is happening concerning the python path. Regards, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Admin Inline does not want to edit

2008-09-14 Thread Marek Kubica
Hi, I fought against this for the whole day already (with patching Django; creating Form and FormSet subclasses etc.) but nothing helped. I want to have a Message with multiple translations in my database and the admin should display the message and the translations inline. Now the problem is

Re: 3 models need to access 1 model

2008-09-14 Thread [EMAIL PROTECTED]
Thanks Steve. I currently don't have an admin.py file in any of my apps. Is this as simple as creating the file and moving all admin.site.register() and admin.ModelAdmin sections into it ? and the file gets autoloaded ? --~--~-~--~~~---~--~~ You received this messag

Re: Integrity Error (1062, "Duplicate entry '0' for key 1") ???

2008-09-14 Thread Brandon Taylor
Well, after validating, syncing, re-validating and re-syncing, I ended up just dropping the entire database and now it works fine. On Sep 14, 10:10 am, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm using 1.0 Final, MySQL 5, and I'm getting this lovely error for > the first tim

Re: Filtering ManyToManyField

2008-09-14 Thread Amine CHRAIBI
I would also be interested in figuring out how to "filter" a ManyToMany field David Reynolds: I went to see how this thing was done under Satchmo Project, but i didn't see the point with the specified lines of code. Could you be more specific about that please. Many thanks to who can help us Amin

Integrity Error (1062, "Duplicate entry '0' for key 1") ???

2008-09-14 Thread Brandon Taylor
Hi everyone, I'm using 1.0 Final, MySQL 5, and I'm getting this lovely error for the first time. Here is my model: from django.db import models from django.contrib import admin from crider_law.sidebar_modules.models import SidebarModule class Page(models.Model): name = models.CharField(max_

How do you create custom Meta Options ?

2008-09-14 Thread lphm
Hi! Just like permission options, I would like to provide an option called "menus" used in my App Models. For example, if I write this in my model class : class Meta: permissions = {.} I'd like to write this for "menus" : class Meta: menus = {.} OR in a options.py file, I'd like

Re: maxlength or max_length?

2008-09-14 Thread Russell Keith-Magee
On Sun, Sep 14, 2008 at 8:31 PM, djandrow <[EMAIL PROTECTED]> wrote: > > I'm currently using django Version: 1.0-final-SVN-9020 and python > Version: 2.4.4, a few weeks ago (maybe a bit longer) I had to change > all my maxlengths to max_length, as I believe that was a change in > Django. > > Anywa

maxlength or max_length?

2008-09-14 Thread djandrow
I'm currently using django Version: 1.0-final-SVN-9020 and python Version: 2.4.4, a few weeks ago (maybe a bit longer) I had to change all my maxlengths to max_length, as I believe that was a change in Django. Anyway now when i try and use manage.py validate I get: __init__() got an unexpected

Re: [solved] Problems with mails and django-contact-form

2008-09-14 Thread Benjamin Buch
Forget about it. Everything works fine. I just didn't check the spam filter... -benjamin --~--~-~--~~~---~--~~ 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: Creating an Archive

2008-09-14 Thread djandrow
I solved this problem, for those who come after me, you can use: Entry.objects.dates('entry_date', 'month', order='DESC') where entry is the name of the table/model and entry_date is the name of the date field. This returns a list of months with objects in. Thanks for everyone's help, Andrew -

Re: Internal server error upgarding from 0.97 to 1.0

2008-09-14 Thread Fangzx
hi,Haku,I have solved the problem: old code from django.newforms.fields import Field --- change to new code --- from django.forms.fields import Field search all code, replace django.newforms with django.forms! On 9月9日, 下午11时39分, Haku <[EMAIL PROTECTED]> wrote: > Hello, i'm quite frus

FileSystemStorage preventing large file uploads

2008-09-14 Thread Donn
Hi, Some code is below. I am in my FileSystemStorage class and I want to prevent users from uploading images over 100K. There are 2 questions here: 1. Is my use of len(content) sensible? I don't have a file yet, only a memory object, so I can't use stat. 2. How would I raise an error so that it

Re: Admin: design question

2008-09-14 Thread Gertjan Klein
Marc Boivin wrote: [queryset method on ModelAdmin] >It is valid, tested and working on Django 1.0. I have it working. It is not >documented, you need to search in the source code to get around it. Ah, yes, it does work -- but not in the way I expected it to! I spent the better part of two hours

Admin inlines and foreign keys

2008-09-14 Thread Donn
Hi, I have been looking, but can't find. I have a Client model with a Website inline (related by FK). it's open in a change screen in the admin. The inline below has a field that refers to the parent Client. That field is a drop-down showing many Clients. Is there any way to tell the inline to