panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Use `code` field as the primary key #40

Closed sgtsquiggs closed 7 years ago

sgtsquiggs commented 7 years ago

Since the code field is now unique, why not use it as the primary key? This allows us to easily assign a default value for a ForeignKey field in 1.7+:

currency = models.ForeignKey('currencies.Currency', default='USD')

panosl commented 7 years ago

I don't have a solid opinion on this one. If the rest of the contributors want to give their input, I'm fine with merging this. @bashu @einarf etc.

einarf commented 7 years ago

Should be fine. It makes sense.