On 12-7-2012 15:51, Jaroslav Dobrek wrote:
> Users may create Test objects in order to run their own tests. A test
> always starts at some date time and it always ends at some date time. Each
> test has a time which is increased until it equals the end time. When a
> user creates a new test (an
you could only assign a Field variable in the Model, "time" absolutely not a
Field, the error appears.
--
luthur
On Thursday, July 12, 2012 at 9:51 PM, Jaroslav Dobrek wrote:
> Hello,
>
> how can I design a model such that two fields are set to the same value when
> a new object of the ty
You could override .save...
-Mensaje original-
De: Jaroslav Dobrek
Enviados: 12/07/2012 10:51:08
Asunto: Set two fields to the same value
Hello,
how can I design a model such that two fields are set to the same value
when a new object of the type defined by the model is created
Hello,
how can I design a model such that two fields are set to the same value
when a new object of the type defined by the model is created?
Example:
class Test(models.Model):
start_time = models.DateTimeField()
end_time = models.DateTimeField()
time = start_time
Users may create
4 matches
Mail list logo