Oh, sorry.
It works.
Even, I found a mention about that in documentation.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Stano you are inattentive,
Then you define your model User
in ManyToManyField you write Project, but it must be 'Project', in quotes.
I wrote this in my preview post.
so your model will look like this
class User(models.Model):
. # definition of User model
projects =
I tried move Project into separate file models_project.py and in
models.py add
from models_project import Project
And in models_project.py add
from django.db import models
from models import User
but does not work too :-(
Stano.
--~--~-~--~~~---~--~~
You
I tried this before I comment it.
But it has error:
Error: Couldn't install apps, because there were errors in one or more
models:
timetracker.tracker: name 'Project' is not defined
I think because class Project is defined after User in source code. If
I copy Project above User,
projects = models.ManyToManyField('Project',
without comments :)
stano пишет:
> Hi, I am totally new. I am trying make TimeTracker project.
> Now I am playing only with admin interface.
>
> I have this model:
>
> class User(models.Model):
> timestamp = models.DateTimeField()
> login
Hi, I am totally new. I am trying make TimeTracker project.
Now I am playing only with admin interface.
I have this model:
class User(models.Model):
timestamp = models.DateTimeField()
login = models.CharField()
password = models.CharField()
# does not work, Project is
6 matches
Mail list logo