There is actually, via a third party app that makes it all dead
simple, it's called django-model-utils and is available here:
https://github.com/carljm/django-model-utils
Credit where it's due, I discovered this wonderful module via PyDanny
and Audrey's Two Scoops book.
Cheers
L.
On 19 April 20
On 18 huhti, 20:34, deepankar bajpeyi wrote:
> I have my models.py :
>
> class Hotel(models.Model):
> name = models.CharField(max_length=20)
> currency = models.ForeignKey(Currency)
>
> class Currency(models.Mode):
> code = models.CharField(max_length=3)
> name = models.CharField(m
>
> I have my models.py :
>
> class Hotel(models.Model):
> name = models.CharField(max_length=20)
> currency = models.ForeignKey(Currency)
>
> class Currency(models.Mode):
> code = models.CharField(max_length=3)
> name = models.CharField(max_length=10)
>
>
> Whenever the currency field in hotel
I have my models.py :
class Hotel(models.Model):
name = models.CharField(max_length=20)
currency = models.ForeignKey(Currency)
class Currency(models.Mode):
code = models.CharField(max_length=3)
name = models.CharField(max_length=10)
Whenever the currency field in hotel is chang
4 matches
Mail list logo