Browse files

Tidy stores fixture

* Add placeholder images
* Load stores during 'make sandbox'
* Add HTML descriptions
  • Loading branch information...
1 parent 4a1553a commit e3ec4d9b38f14ea1fa38d4be62a284c9465371ad @codeinthehole codeinthehole committed Jan 17, 2013
View
3 .gitignore
@@ -11,6 +11,7 @@
dist/
cover/
docs/_build/
-sandbox/public/
+sandbox/public/media/uploads
+sandbox/public/media/cache
settings_local.py
View
8 Makefile
@@ -10,8 +10,10 @@ geoip:
mv GeoLiteCity.dat sandbox/geoip
sandbox: install
- -rm sandbox/sandbox/sandbox.sqlite3
- -spatialite sandbox/sandbox/sandbox.sqlite3 "SELECT InitSpatialMetaData();"
+ -rm -rf sandbox/public/media/cache sandbox/public/media/uploads
+ ./sandbox/manage.py reset_db --router=default --noinput
./sandbox/manage.py syncdb --noinput
./sandbox/manage.py migrate
- ./sandbox/manage.py loaddata sandbox/fixtures/auth.json countries.json
+ ./sandbox/manage.py loaddata sandbox/fixtures/auth.json countries.json \
+ sandbox/fixtures/stores.json
+ ./sandbox/manage.py thumbnail clear
View
0 sandbox/fixtures/sample_stores.json
No changes.
View
34 sandbox/fixtures/dymocks_stores.json → sandbox/fixtures/stores.json
@@ -158,9 +158,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "Dymocks @ Collins Street",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1049",
- "image": "images/stores/dymocks-collins.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (144.9655940000000101 -37.8153039999999976)",
"is_pickup_store": true,
@@ -173,9 +173,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "Dymocks @ Bendigo",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1053",
- "image": "images/stores/dymocks-bendigo.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (144.2788820000000101 -36.7597870000000029)",
"is_pickup_store": true,
@@ -188,9 +188,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1029",
- "image": "images/stores/dymocks-camberwell.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (144.9628399999999999 -37.8268959999999979)",
"is_pickup_store": true,
@@ -203,9 +203,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1058",
- "image": "images/stores/dymocks-collins-place.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (144.9724170000000072 -37.8138310000000004)",
"is_pickup_store": true,
@@ -218,9 +218,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1026",
- "image": "images/stores/dymocks-doncaster.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (145.1255989999999940 -37.7843930000000015)",
"is_pickup_store": true,
@@ -233,9 +233,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1079",
- "image": "images/stores/dymocks-eastland.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (145.2301799999999901 -37.8123780000000025)",
"is_pickup_store": true,
@@ -248,9 +248,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1169",
- "image": "images/stores/dymocks-fountain-gate.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (145.3043189999999925 -38.0173150000000035)",
"is_pickup_store": true,
@@ -263,9 +263,9 @@
"model": "stores.store",
"fields": {
"group": null,
- "description": "",
+ "description": "<h2>Raw denim laborum helvetica</h2>Four loko sint meggings, wolf et ex marfa blog master cleanse \r\nfarm-to-table ugh. Butcher sunt pariatur tumblr, voluptate qui irure \r\n brooklyn bespoke. Nulla 3 wolf moon sartorial raw denim aute. Echo \r\npark ex mcsweeney's, disrupt nulla bespoke proident freegan brooklyn \r\npariatur eiusmod velit. Umami nulla disrupt pickled. Small batch \r\nthundercats kogi salvia, next level qui organic direct trade aesthetic\r\n locavore consequat artisan. Ea squid farm-to-table pitchfork mustache \r\nin, wayfarers truffaut you probably haven't heard of them.<span>Cliche \r\npitchfork four loko, photo booth tofu vice DIY banjo beard vegan umami. \r\n Elit organic farm-to-table, truffaut vice blog forage neutra id veniam\r\n cred swag whatever. <br></span><br><h2>Echo \r\npark ex mcsweeney's</h2><h2></h2>Fixie duis vice hashtag. Yr selfies hashtag \r\ncupidatat, 90's whatever brooklyn kale chips 8-bit banh mi fixie \r\noccaecat consequat biodiesel. Stumptown put a bird on it sint, cred id\r\n typewriter laborum quinoa tattooed kale chips craft beer scenester art\r\n party quis. Id deserunt nulla, master cleanse wayfarers non bicycle\r\n rights ennui keytar gastropub irure twee. Raw denim laborum helvetica\r\n narwhal nisi, church-key fugiat flexitarian exercitation nesciunt 90's\r\n wes anderson est eiusmod.<br><br><br>",
"reference": "1146",
- "image": "images/stores/dymocks-geelong.jpg",
+ "image": "placeholder/350x350.gif",
"is_active": true,
"location": "POINT (144.3618209999999920 -38.1478159999999988)",
"is_pickup_store": true,
@@ -833,4 +833,4 @@
"store": 8
}
}
-]
+]
View
BIN sandbox/public/media/placeholder/350x350.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 sandbox/sandbox/settings.py
@@ -6,6 +6,7 @@
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+THUMBNAIL_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
@@ -172,22 +173,31 @@
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse'
+ '()': 'django.utils.log.RequireDebugFalse',
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
- }
+ },
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
+ },
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
+ 'sorl.thumbnail': {
+ 'handlers': ['console'],
+ 'level': 'DEBUG',
+ 'propagate': True,
+ },
}
}
View
4 stores/models.py
@@ -20,7 +20,7 @@ class StoreAddress(AbstractAddress):
class StoreGroup(models.Model):
name = models.CharField(_('Name'), max_length=100, unique=True)
- slug = models.SlugField(_('Slug'), max_length=100, unique=True, blank=True)
+ slug = models.SlugField(_('Slug'), max_length=100, unique=True, blank=True)
def save(self, *args, **kwargs):
if not self.slug:
self.slug = slugify(self.name)
@@ -63,7 +63,7 @@ class Store(models.Model):
image = models.ImageField(
_("Image"),
- upload_to="images/stores",
+ upload_to="uploads/store-images",
blank=True, null=True
)
description = models.CharField(

0 comments on commit e3ec4d9

Please sign in to comment.