models.py 763 Bytes
Newer Older
1
"""
vkaracic committed
2
Commerce-related models.
3
"""
vkaracic committed
4 5 6 7 8 9 10 11 12
from django.db import models
from django.utils.translation import ugettext_lazy as _

from config_models.models import ConfigurationModel


class CommerceConfiguration(ConfigurationModel):
    """ Commerce configuration """

13 14 15
    class Meta(object):
        app_label = "commerce"

vkaracic committed
16 17 18 19 20 21 22 23 24 25 26 27 28
    checkout_on_ecommerce_service = models.BooleanField(
        default=False,
        help_text=_('Use the checkout page hosted by the E-Commerce service.')
    )

    single_course_checkout_page = models.CharField(
        max_length=255,
        default='/basket/single-item/',
        help_text=_('Path to single course checkout page hosted by the E-Commerce service.')
    )

    def __unicode__(self):
        return "Commerce configuration"