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
Okay, well that was weird. Apparently you need executable permissions
on the directory that this archive file is in.
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
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
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
Thanks! AutoField did the trick.
Tom
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.
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:
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
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
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
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
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
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.
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
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,
16 matches
Mail list logo