refactor according to PEP8
This commit is contained in:
parent
1000d773f0
commit
dbb6fe9acb
|
@ -25,6 +25,7 @@ from webshop.utils import (get_categories,
|
||||||
from currencies.models import ExchangeRate, ExchangeRate_name
|
from currencies.models import ExchangeRate, ExchangeRate_name
|
||||||
from currencies.forms import CurrenciesForm
|
from currencies.forms import CurrenciesForm
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
category_list = get_categories()
|
category_list = get_categories()
|
||||||
currencies_form = CurrenciesForm
|
currencies_form = CurrenciesForm
|
||||||
|
@ -74,7 +75,7 @@ def article_details(request, article_id):
|
||||||
article_view = True
|
article_view = True
|
||||||
currency_name = "CHF"
|
currency_name = "CHF"
|
||||||
|
|
||||||
if not 'currency' in request.session:
|
if 'currency' not in request.session:
|
||||||
request.session['currency'] = None
|
request.session['currency'] = None
|
||||||
|
|
||||||
article = get_object_or_404(Article, pk=article_id)
|
article = get_object_or_404(Article, pk=article_id)
|
||||||
|
@ -176,7 +177,7 @@ def registration(request):
|
||||||
person = Person.objects.create(
|
person = Person.objects.create(
|
||||||
salutation=pf['salutation'],
|
salutation=pf['salutation'],
|
||||||
city=City.objects.get(zip_code=pf['zip_code'],
|
city=City.objects.get(zip_code=pf['zip_code'],
|
||||||
name=pf['city']),
|
name=pf['city']),
|
||||||
street_name=pf['street_name'],
|
street_name=pf['street_name'],
|
||||||
street_number=pf['street_number'],
|
street_number=pf['street_number'],
|
||||||
user=user)
|
user=user)
|
||||||
|
@ -204,7 +205,7 @@ def cart(request):
|
||||||
total = 0
|
total = 0
|
||||||
|
|
||||||
# here we configure the users Currency:
|
# here we configure the users Currency:
|
||||||
if not 'currency' in request.session:
|
if 'currency' not in request.session:
|
||||||
request.session['currency'] = None
|
request.session['currency'] = None
|
||||||
else:
|
else:
|
||||||
currency = request.session['currency']
|
currency = request.session['currency']
|
||||||
|
|
Loading…
Reference in New Issue