ソースを参照

merge from master

David Ray 8 年 前
コミット
745136b5fc

+ 19 - 7
bakerydemo/templates/base/gallery_page.html

@@ -2,14 +2,26 @@
 {% load wagtailimages_tags gallery_tags %}
 
 {% block content-header %}
-    {{ page.title }}
-
-    <div class="image">
-        {% image page.image width-500 as photo %}
-              <img src="{{ photo.url }}" width="{{ photo.width }}" height="{{ photo.height }}" alt="{{ photo.alt }}" />
+{% image self.image fill-1920x600 as hero_img %}
+<div class="container-fluid hero" style="background-image:url('{{ hero_img.url }}')">
+<div class="hero-gradient-mask"></div>
+    <div class="container">
+        <div class="row">
+            <div class="col-md-7 col-md-offset-2">
+                <h1>{{ page.title }}</h1>
+                <p class="stand-first">{{ page.subtitle }}</p>
+            </div>
+        </div>
     </div>
+</div>
 {% endblock content-header %}
 
 {% block content-body %}
-    {% gallery page.choices %}
-{% endblock content %}
+<div class="container">
+    <div class="row">
+        <div class="col-xs-12">
+            {% gallery page.choices %}
+        </div>
+    </div>
+</div>
+{% endblock content-body %}

+ 9 - 2
bakerydemo/templates/tags/gallery.html

@@ -1,7 +1,14 @@
 {% load wagtailimages_tags %}
 
 {% for img in images %}
-{% image img max-285x200 as img_obj %}
-<div class="col-sm-6"><img src="{{img_obj.url}}" class="img-responsive" /></div>
+{% image img fill-285x200-c100 as img_obj %}
+<div class="col-sm-6">
+	<a href="">
+		<figure class="gallery-figure">
+			<img src="{{img_obj.url}}" class="img-responsive" />
+			<figcaption>{{ img.title }}</figcaption>
+		</figure>
+	</a>
+</div>
 {{ image.title }}
 {% endfor %}

+ 9 - 0
readme.md

@@ -93,5 +93,14 @@ Log into the admin with the credentials ``admin / changeme``.
 To learn more about Heroku, read [Deploying Python and Django Apps on Heroku](https://devcenter.heroku.com/articles/deploying-python).
 
 
+### Sending email from the contact form
 
+The following setting in `base.py` and `heroku.py` ensures that live email is not sent by the demo contact form.
 
+`EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`
+
+In production on your own site, you'll need to change this to:
+
+`EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'`
+
+and configure [SMTP settings](https://docs.djangoproject.com/en/1.10/topics/email/#smtp-backend) appropriate for your email provider.

+ 8 - 6
requirements/base.txt

@@ -1,6 +1,8 @@
-Django
-django-dotenv
-elasticsearch
-wagtail
-wagtailfontawesome
-Pillow
+Django==1.10.5
+django-dotenv==1.4.1
+# http://docs.wagtail.io/en/v1.8.1/topics/search/backends.html#elasticsearch-backend
+# Not utilized by default; uncomment and review the above document if you require elasticsearch
+# elasticsearch==5.1.0
+wagtail==1.8.1
+wagtailfontawesome==1.0.6
+Pillow==4.0.0

+ 4 - 4
requirements/heroku.txt

@@ -1,6 +1,6 @@
 -r base.txt
 # Additional dependencies for Heroku deployment
-dj-database-url
-gunicorn
-psycopg2
-whitenoise
+dj-database-url==0.4.1
+gunicorn==19.6.0
+psycopg2==2.6.2
+whitenoise==3.2.2