Commits

powersurge360 committed 886cb3a

Rough draft of the store page.

Comments (0)

Files changed (4)

share_search/reviews/templates/reviews/store_detail.html

+{% extends "_layouts/base.html" %}
+
+{% block title %}{{ block.super }} - {{ object.name }}{% endblock %}
+
+{% block content %}
+    <div class="row">
+        <hgroup class="span12">
+            <h1>{{ object.name }}</h1>
+            {% if user.is_authenticated %}
+                <p>
+                    Details not quite right?
+                    <a href="#" class="btn btn-primary">Edit Store</a>
+                </p>
+            {% endif %}
+        </hgroup>
+    </div>
+    <div class="row">
+        <div class="span4">
+            <div class="row-fluid">
+                <div class="span12">
+                    <img src="{{ object.image.url }}">
+                </div>
+            </div>
+            <div class="row-fluid">
+                <div class="span12">
+                    <a href="#" class="btn btn-block">Promote</a>
+                </div>
+            </div>
+        </div>
+        <div class="span8">
+            {{ object.description }}
+        </div>
+    </div>
+    <div class="row">
+        <div class="span12">
+            Hello, I am a thing
+        </div>
+    </div>
+{% endblock %}

share_search/reviews/templates/reviews/store_list.html

 {% block title %} {{ block.super }} - Stores{% endblock %}
 
 {% block content %}
-    <div class="row">
-        <div class="span9 offset2">
-            <h1>{{ object_list.count }} stores found</h1>
-            {% if user.is_authenticated %}
-                <p>
-                    Not seeing the store you're looking for? Add a store now!
-                    <a href="{% url "reviews:store_create" %}" class="btn btn-success">Add a store</a>
-                </p>
-            {% else %}
-                <p>
-                    Register now to get started adding stores
-                    <a href="{% url "site:register" %}" class="btn btn-success">Register</a>
-                </p>
-            {% endif %}
+    {% if object_list %}
+        <div class="row">
+            <div class="span9 offset2">
+                <h1>{{ object_list.count }} stores found</h1>
+                {% if user.is_authenticated %}
+                    <p>
+                        Not seeing the store you're looking for? Add a store now!
+                        <a href="{% url "reviews:store_create" %}" class="btn btn-success">Add a store</a>
+                    </p>
+                {% else %}
+                    <p>
+                        Register now to get started adding stores
+                        <a href="{% url "site:register" %}" class="btn btn-success">Register</a>
+                    </p>
+                {% endif %}
+            </div>
         </div>
-    </div>
+    {% endif %}
     <div class="row">
         {% if object_list %}
             {% gridify object_list 3 as grid %}
         {% else %}
             <div class="offset1 span12">
                 <h1>No results found</h1>
+                {% if user.is_authenticated %}
+                    <p>
+                        Not seeing the store you're looking for? Add a store now!
+                        <a href="{% url "reviews:store_create" %}" class="btn btn-success">Add a store</a>
+                    </p>
+                {% else %}
+                    <p>
+                        Register now to get started adding stores
+                        <a href="{% url "site:register" %}" class="btn btn-success">Register</a>
+                    </p>
+                {% endif %}
             </div>
         {% endif %}
     </div>

share_search/share_search/settings/default.py

 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash.
 # Examples: "http://example.com/media/", "http://media.example.com/"
-MEDIA_URL = ''
+MEDIA_URL = '/media/'
 
 # Absolute path to the directory static files should be collected to.
 # Don't put anything in this directory yourself; store your static files

share_search/share_search/urls.py

+from django.conf import settings
 from django.conf.urls import patterns, include, url
+from django.conf.urls.static import static
 from django.views.generic import TemplateView
 
 # Uncomment the next two lines to enable the admin:
     url(r'', include('share_site.urls', namespace="site")),
     url(r'', include('reviews.urls', namespace="reviews")),
 )
+
+if settings.DEBUG:
+    urlpatterns += static(
+        settings.MEDIA_URL,
+        document_root=settings.MEDIA_ROOT
+    )