Commits

Hynek Cernoch committed 45a0452

Fixed staticfiles support, part C) documentation

Comments (0)

Files changed (4)

docs/configuration.txt

     - Make sure that your ``DATABASES['default']['ENGINE']`` variable is also set correctly.
     - You should ensure that all of your paths are setup correctly.  Key ones to look at are:
 
-        + ``MEDIA_ROOT`` (this is where images will be stored)
-        + ``MEDIA_URL``
-        + ``ADMIN_MEDIA_PREFIX``
+        + ``MEDIA_ROOT`` this is where product images and other uploadable will be stored
+        + ``MEDIA_URL``   '/media/'
+        + ``STATIC_ROOT`` directory for css, js and template images, where they are collected
+        + ``STATIC_URL``  '/static/'
+        + ``STATICFILES_DIRS`` additional directories where search the source static files
+        + ``ADMIN_MEDIA_PREFIX``  (obsoleted with Django 1.4)
         + ``TEMPLATE_DIRS``
 
+    Satchmo uses for media files and destination static files different
+    directories, as it is required by Django, but the source directories are
+    for backward compatibility the same: project...directory/static/
+    However directories can be easy set different now and it is better for the future.
+
 .. index::
    single: settings; L10N
 
 Here are the variables provided in the context by Satchmo's context processor,
 satchmo_store.shop.context_processor.settings.
 
-  :shop_base: the value SHOP_BASE of in SATCHMO_SETTINGS in your
-              local_settings.py
-  :shop: the current satchmo_store.shop.models.Config in use
+  :shop_base: The base URL from SHOP_BASE in SATCHMO_SETTINGS
+  :shop: an object satchmo_store.shop.models.Config representing the
+    current store configuration
   :shop_name: the *store_name* value from the config
-  :media_url: .. TODO
+  :media_url: The current media url, taking into account SSL
+  :STATIC_URL: The current static url, taking into account SSL
   :cart_count: number of items in the cart
   :cart: user's current cart; an instance of satchmo_store.shop.models.Cart
   :categories: all categories in the site
-  :is_secure: .. TODO
-  :request: .. TODO
+  :is_secure: A boolean representing weather or not SSL is enabled
+  :request: The HttpRequest object passed into the context processor
   :login_url: the LOGIN_URL setting in your settings.py
   :logout_url: the LOGOUT_URL setting in your settings.py
-  :sale: .. TODO
+  :storewide_sale: An instance of product.models.Discount if there is a
+    global sale, or None
 
 Common variables
 ----------------

satchmo/apps/satchmo_store/shop/context_processors.py

         'storewide_sale': sale
     }
 
+    # the signal can by used to dynamically customize context variables
     satchmo_context.send(shop_config, context=ctx)
 
     return ctx

satchmo/apps/satchmo_store/shop/signals.py

 #:     current store configuration
 #:   :shop_name: The shop name
 #:   :media_url: The current media url, taking into account SSL
+#:   :STATIC_URL: The current static url, taking into account SSL
 #:   :cart_count: The number of items in the cart
 #:   :cart: An instance of ``satchmo_store.shop.models.Cart`` representing the
 #:     current cart
 #:   :request: The ``HttpRequest`` object passed into the context processor
 #:   :login_url: The login url defined in ``settings.LOGIN_URL``
 #:   :logout_url: The logout url defined in ``settings.LOGOUT_URL``
-#:   :sale: An instance of ``product.models.Discount`` if there is a current
-#:     sale, or ``None``
+#:   :storewide_sale: An instance of ``product.models.Discount`` if there is a
+#:     current sale, or ``None``
 satchmo_context = django.dispatch.Signal()
 
 #: Sent after each item from the cart is copied into an order.