from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from satchmo.configuration import *
from satchmo.shop.utils import load_module

PRODUCT_GROUP = ConfigurationGroup('PRODUCT', _('Product Settings'))

PRODUCT_TYPES = config_register(MultipleStringValue(PRODUCT_GROUP,
    'PRODUCT_TYPES',
    description=_("Product Model Options"),
    default=['product::ConfigurableProduct', 'product::ProductVariation'],
    choices=[('product::ConfigurableProduct', _('Configurable Product')),
             ('product::ProductVariation', _('Product Variation')),
             ('product::CustomProduct', _('Custom Order')),
             ('product::SubscriptionProduct', _('Subscription Product')),
             ('product::DownloadableProduct', _('Downloable Product'))]
    ))
    
config_register([

StringValue(PRODUCT_GROUP,
    'IMAGE_DIR',
    description=_("Upload Image Dir"),
    help_text=_("""Directory name for storing uploaded images.  
This value will be appended to MEDIA_ROOT.  Do not worry about slashes.  
We can handle it any which way."""),
    default="images"),
    
BooleanValue(PRODUCT_GROUP,
    'RENAME_IMAGES',
    description=_("Rename product images?"),
    help_text=_("Automatically rename product images on upload?"),
    default=True),
    
StringValue(PRODUCT_GROUP,
    'PROTECTED_DIR',
    description=_("Protected dir"),
    help_text=_("""This is only used if you use Downloadable Products.  
This value will be appended to MEDIA_ROOT.  Do not worry about slashes.  
We can handle it any which way."""),
    default="protected",
    requires=PRODUCT_TYPES,
    requiresvalue='product::DownloadableProduct'),
    
])
    
# --- Load any extra payment modules. ---
extra_product = getattr(settings, 'CUSTOM_PRODUCT_MODULES', ())

for extra in extra_product:
    try:
        load_module("%s.config" % extra)
    except ImportError:
        log.warn('Could not load product module configuration: %s' % extra)

@@ -771,16 +771,18 @@
 'Downloa
+da
 ble Prod
@@ -796,20 +796,16 @@
 %0A    ))%0A
-    
 %0Aconfig_
@@ -961,18 +961,16 @@
  images.
-  
 %0AThis va
@@ -1025,34 +1025,32 @@
 y about slashes.
-  
 %0AWe can handle i
@@ -1094,20 +1094,16 @@
 ages%22),%0A
-    
 %0ABoolean
@@ -1275,20 +1275,16 @@
 =True),%0A
-    
 %0AStringV
@@ -1430,18 +1430,16 @@
 roducts.
-  
 %0AThis va
@@ -1502,18 +1502,16 @@
 slashes.
-  
 %0AWe can 
@@ -1648,20 +1648,12 @@
 '),%0A
-    %0A%5D)%0A    
+%0A%5D)%0A
 %0A# -
@@ -1675,13 +1675,13 @@
 ra p
-aymen
+roduc
 t mo

Fix typos in product/config.py.