Browse Source

merge from master

David Ray 8 năm trước cách đây
mục cha
commit
745136b5fc

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

@@ -2,14 +2,26 @@
 {% load wagtailimages_tags gallery_tags %}
 {% load wagtailimages_tags gallery_tags %}
 
 
 {% block content-header %}
 {% block content-header %}
-    {{ page.title }}
+{% image self.image fill-1920x600 as hero_img %}
-
+<div class="container-fluid hero" style="background-image:url('{{ hero_img.url }}')">
-    <div class="image">
+<div class="hero-gradient-mask"></div>
-        {% image page.image width-500 as photo %}
+    <div class="container">
-              <img src="{{ photo.url }}" width="{{ photo.width }}" height="{{ photo.height }}" alt="{{ photo.alt }}" />
+        <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>
+</div>
 {% endblock content-header %}
 {% endblock content-header %}
 
 
 {% block content-body %}
 {% block content-body %}
-    {% gallery page.choices %}
+<div class="container">
-{% endblock content %}
+    <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 %}
 {% load wagtailimages_tags %}
 
 
 {% for img in images %}
 {% for img in images %}
-{% image img max-285x200 as img_obj %}
+{% image img fill-285x200-c100 as img_obj %}
-<div class="col-sm-6"><img src="{{img_obj.url}}" class="img-responsive" /></div>
+<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 }}
 {{ image.title }}
 {% endfor %}
 {% 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).
 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==1.10.5
-django-dotenv
+django-dotenv==1.4.1
-elasticsearch
+# http://docs.wagtail.io/en/v1.8.1/topics/search/backends.html#elasticsearch-backend
-wagtail
+# Not utilized by default; uncomment and review the above document if you require elasticsearch
-wagtailfontawesome
+# elasticsearch==5.1.0
-Pillow
+wagtail==1.8.1
+wagtailfontawesome==1.0.6
+Pillow==4.0.0

+ 4 - 4
requirements/heroku.txt

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