Hello Jacob Kaplan-Moss!
On Tue, 6 Dec 2005 14:16:06 -0600 you wrote:

>       class Story(meta.Model):
>               headline = meta.CharField(maxlength=100, primary_key=True)
>               body = meta.TextField()
> 
> you'll get::
> 
>       CREATE TABLE stories (
>               headline varchar(100) NOT NULL PRIMARY KEY,
>               body text NOT NULL
>       )
>       
> Clear?

I want to use it in my own auth model, but have error: 
> django-admin.py sql auth --settings=anastas.settings
BEGIN;
Traceback (most recent call last):
  File "/usr/local/bin/django-admin.py", line 5, in ?
    management.execute_from_command_line()
  File "/home/greg/www/django_src/django/core/management.py", line 958,
in execute_from_command_line    output = action_mapping[action](mod)
  File "/home/greg/www/django_src/django/core/management.py", line 70,
in get_sql_create    rel_field = f.rel.get_related_field()
  File "django/core/meta/fields.py", line 841, in get_related_field
    return self.to.get_field(self.field_name)
  File "/home/greg/www/django_src/django/core/meta/__init__.py", line
463, in get_field    raise FieldDoesNotExist, "name=%s" % name
django.core.meta.FieldDoesNotExist: name=id

It is possible to fix?

-- 
Всего наилучшего!
greg [at] anastasia [dot] ru Григорий.

Reply via email to