Create README.rst

pull/13/head
Alex 2017-02-07 18:10:12 +10:00 zatwierdzone przez GitHub
rodzic 3c57f35cb1
commit 081c566aef
1 zmienionych plików z 18 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,18 @@
Demo project template
----------
1. Template Product_index.html
Add it to your `Products\models.py`:
.. code-block:: python
class ProductIndex(Page):
pass
def get_context(self, request):
# Update context to include only published products, ordered by reverse-chron
context = super(ProductIndex, self).get_context(request)
product = self.get_children().live().order_by('-first_published_at')
context['product'] = product
return context