That should work. Thanks for the suggestion.
robbie
On Sunday, May 25, 2014 1:31:20 AM UTC-4, WongoBongo wrote:
>
> Might try removing the default from x_pos then try setting it by
> overriding the save method
>
>
> https://docs.djangoproject.com/en/1.4/topics/db/models/#overriding-predefined-m
Might try removing the default from x_pos then try setting it by overriding
the save method
https://docs.djangoproject.com/en/1.4/topics/db/models/#overriding-predefined-model-methods
K
On Saturday, May 24, 2014 8:28:17 PM UTC-7, Robbie Edwards wrote:
>
> Hi, I have some code like such...
>
>
>
Hi, I have some code like such...
def gen_planet_pos( max_dim ):
return random.randint( 0, max_dim )
class Universe( models.Model ):
width = models.IntegerField( default=100 )
...
class Planet( models.Model ):
universe = models.ForeignKey( Universe )
...
x_pos = models
3 matches
Mail list logo