Adding store stock models and template tag #8

Merged
merged 4 commits into from Dec 6, 2012

Projects

None yet

2 participants

@a-musing-moose

Mostly about store stock.

Adding a STORES_SRID to globally set this for geometry field types. Mostly so I can set it to some stupid flat projection for tests against spatialite.

Also added a fix to the make file as the geo ip data was downloading to the wrong place for some reason

@elbaschid elbaschid commented on an outdated diff Dec 6, 2012
stores/managers.py
@@ -1,3 +1,4 @@
+from django.db import models
@elbaschid
elbaschid Dec 6, 2012 Contributor

This doesn't seem to be used in the file.

@elbaschid elbaschid commented on an outdated diff Dec 6, 2012
stores/models.py
@@ -127,3 +131,37 @@ class Meta:
ordering = ['weekday']
verbose_name = _("Opening period")
verbose_name_plural = _("Opening periods")
+
+
+class StoreStock(models.Model):
+
+ store = models.ForeignKey('stores.Store',
+ related_name='stock')
+ product = models.ForeignKey('catalogue.Product', related_name="store_stock")
@elbaschid
elbaschid Dec 6, 2012 Contributor

The two foreign keys are missing a translatable verbose_name keyword. Would you mind adding those?

@elbaschid
Contributor

Thanks, it looks good. I added a few comments on minor style issues. Also would you mind checking that the lines are max 79 characters as defined in PEP8? Sorry for being pedantic.

@elbaschid elbaschid merged commit 899a620 into django-oscar:master Dec 6, 2012
@elbaschid
Contributor

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment