You can use forms.Form when you want to build a custom form which isn't
directly connected to a model on the database. For instance one use for a
forms.Form is where you are collecting data which will be stored into
attributes on different models.
The documentation I think uses forms.ModelForn
On Thursday, 14 January 2016 17:55:41 UTC, Sayse wrote:
>
> Yea I've heard of it. Have they managed to achieve this? I'd be interested
> to see how they've done it if so...
>
> I was hoping to find a way to do this with native django if possible
>
One way that might work is to subclass the Ch
Stating the value of either the id or pk field to None is the recommended way
to rest the primary key when you take a copy of a record, but Xudong wanted to
delete the field entirely: which I don't understand.
--
You received this message because you are subscribed to the Google Groups
"Djang
Why do you want to delete the id field. The idea of a primary key field is
central to relational databases. If you to suppress the automatically generated
primary key then you need to assign another field as the unique primary key: as
far as I know that will prevent the id field being created.
Andreas,
Thanks for your answer. Certainly it looks like running celery might alleviate
the issue with threading stopping the management commands, but the problem with
your suggestion lies with that flag. If My code was able to identify that the
server is running to the point of being able to s
I have a small background task (executed by using threading.Timer) which I
want to start up when the server starts, but doesn't need to start when a
management command runs.
The background task performs operations on the database, so relies on
importing the models etc.
I have tried using the A
6 matches
Mail list logo