Problem

2005-08-19 Thread PythonistL
After I finished tutorials I wanted to start playing with my own application. So I created my new project called shopproject and defined my model like this shop.py# from django.core import meta class Registration(meta.Model): fields = ( meta.CharField('Logi

Re: Generic Views - TemplateDoesNotExist Error

2005-08-19 Thread [EMAIL PROTECTED]
Okay, well that was weird. Apparently you need executable permissions on the directory that this archive file is in.

Generic Views - TemplateDoesNotExist Error

2005-08-19 Thread [EMAIL PROTECTED]
Hi Folks, My app is nearing completion (god I love Django so far), but this is a missing piece for me. I'm trying to create a generic view for a table, based on daily archives. My (abbreviated) app-level URLCONF file is (I'm removing "main/" from it in my settings-level URLCONF file, so it isn't

Anyone out there writing custom filters? (I have one, works in the dev site, but requires a different import under mod_python)

2005-08-19 Thread Scanner
Hello, this may be a bug but I was sent here. I have a django project with three apps. There are three apps to seperate out kinds of data models. However the views of the apps build on each other. The documentation implies you can define your own filters but does not detail how this is done so

Tutorial Index not working with generic views

2005-08-19 Thread deltabps
Hi. I tried the tutorials from http://www.djangoproject.com/documentation/tutorial?/ and http://www.postneo.com/2005/08/17/django-generic-views-crud and I ran into the same problem with both. Especially with the djangoproject.com one. The tutorial 4 worked fine till the point, where generic view

Re: Adding Record Problem

2005-08-19 Thread [EMAIL PROTECTED]
Thanks! AutoField did the trick. Tom

Re: On referencing ForeignKey fields in meta.Admin

2005-08-19 Thread Brant Harris
It seems to me that you could simply use the rel_name, and if that's not specified than what it defaults to: the class name. But in my case ,"supervisor_id" didn't work. I had to use "user_id", and I still don't know how to get the ManyToManyField shown there.

Re: On referencing ForeignKey fields in meta.Admin

2005-08-19 Thread Jacob Kaplan-Moss
On Aug 19, 2005, at 12:27 PM, Brantley wrote: Below is a model I created to track departments. When I give it "admin = meta.Admin()" I am then allowed to change my "supervisor", "manager", and "parent" fields. But if I define my own, how do I reference them? I tried something like:

On referencing ForeignKey fields in meta.Admin

2005-08-19 Thread Brantley
Below is a model I created to track departments. When I give it "admin = meta.Admin()" I am then allowed to change my "supervisor", "manager", and "parent" fields. But if I define my own, how do I reference them? I tried something like: ("Management", {'fields': ('supervisor', 'm

Re: Recipie/tutorial for Django and no apache?

2005-08-19 Thread David S.
I have been persuing the same sort of path, i.e. SQLite, wxPython, cx_freeze for the same reasons. But I am pretty excited about Django and how quickly I can get functionality that has been so tedious to build myself. And, I am happy to go for the web app even for clients with 1 in-house user fo

Re: Adding Record Problem

2005-08-19 Thread David S .
Robin Munn gmail.com> writes: > Django will only auto-increment fields listed as AutoField. If you use > any other type (CharField, IntegerField), it's assumed that you want > to specify the primary key yourself each time. The only drawback seems that you can never specify the id when you use

Re: Adding Record Problem

2005-08-19 Thread Robin Munn
On 8/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > --- > Here's my class definition: > --- > > class Notify(meta.Model): > db_table = 'notify' > fields = ( > meta.IntegerField('id', pri

Re: Existing Database?

2005-08-19 Thread Jason F. McBrayer
On Fri, 2005-08-19 at 08:35 +0200, Andreas Kostyrka wrote: > And there is completely another answer that would match with the > question: How to write a completely "independant" model -> which APIs > must be implemented by a model. (Consider "legacy databases" that are no > SQL databases.) I am

Re: Adding Record Problem

2005-08-19 Thread Dagur
If you created the database from scratch (i.e. if you're not using an existing database) you shouldn't need to have the line: meta.IntegerField('id', primary_key=True), the primary key would be created automatically. If that's the case you might want to try creating the tables again.

Re: Adding Record Problem

2005-08-19 Thread jtm
If I understand things correctly, Django creates an 'id' field for each model automatically, I assume set to unique and to auto-increment, thus avoiding the problem you are seeing. The easiest thing to do is not to create your own 'id' field and use the one Django puts in place for you. jtm

Adding Record Problem

2005-08-19 Thread [EMAIL PROTECTED]
I'm getting the following error when adding a new record to a "Notify" table: --- There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 62, in get_response return callback(request,