On 12/9/05, braver <[EMAIL PROTECTED]> wrote:
> Basically, if I stuff data into the database as defined by
> django-admin.py sql app, via an external loader, and then open it in
> django, will I see proper objects -- or there's more to objects stored
> in django's own tables, and I have to load th
Basically, if I stuff data into the database as defined by
django-admin.py sql app, via an external loader, and then open it in
django, will I see proper objects -- or there's more to objects stored
in django's own tables, and I have to load them via django calls?
On 12/9/05, braver <[EMAIL PROTECTED]> wrote:
> unique_together = (("key","date",...),)
>
> Is it the way? It creates proper SQL. What about indexes on several
> columns?
Yes, that's the way to do multiple unique fields. There's no way to do
indexes across several columns -- you can do
OK. In addition, I need UNIQUE with several fields in a list. I've
found the following way to do it:
class Log(meta.Model):
key = ...
date = ...
class META:
unique_together = (("key","date",...),)
Is it the way? It creates proper SQL. What about indexes on several
columns
On 12/8/05, braver <[EMAIL PROTECTED]> wrote:
> I want to add a UNIQUE() contraint to a table, and create extra
> indexes on tables. Should I just go ahead and do it in SQL, or there's
> a python way to specify such extras?
Add "unique=True" to the appropriate fiel
I want to add a UNIQUE() contraint to a table, and create extra
indexes on tables. Should I just go ahead and do it in SQL, or there's
a python way to specify such extras?
Also -- can a ForeignKey be supplied with a human-readable name, like
other fields?
6 matches
Mail list logo