You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
409 B
20 lines
409 B
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
from .models import Currency as CurrencyModel
|
|
|
|
MAIN_CURRENCY_ID = '1'
|
|
|
|
|
|
class Currency(object):
|
|
currency_id = ''
|
|
|
|
def __init__(self, request):
|
|
self.cart_id = request.session.get('currency_id', None)
|
|
if not self.currency_id:
|
|
self.currency_id = MAIN_CURRENCY_ID
|
|
request.session['currency_id'] = MAIN_CURRENCY_ID
|
|
|
|
|
|
|
|
|
|
|
|
|