first attempt at python3 compat
This commit is contained in:
1 parent
c986720f0b
commit
f24c071512
3 files changed
+10
-28
No files matched your search
+3
-4
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
import datetime
|
||||
import json
|
||||
import phonenumbers
|
||||
import requests
|
||||
|
||||
@@ -18,7 +17,7 @@ def tekstmelding_new_membership_card(card_number, phone_number):
|
||||
url = '{}kassa/new-membership-card'.format(settings.TEKSTMELDING_API_URL)
|
||||
response = requests.post(
|
||||
url,
|
||||
data=json.dumps(payload),
|
||||
json=payload,
|
||||
params={'api_key': settings.TEKSTMELDING_API_KEY},
|
||||
headers={'Content-Type': 'application/json'}
|
||||
)
|
||||
@@ -50,7 +49,7 @@ def inside_update_card(card_number, user_id, phone_number, action, membership_tr
|
||||
|
||||
return requests.post(
|
||||
url,
|
||||
data=json.dumps(payload),
|
||||
json=payload,
|
||||
params={'apikey': settings.INSIDE_API_KEY},
|
||||
headers=dict(content_type='application/json')
|
||||
)
|
||||
@@ -67,7 +66,7 @@ def inside_update_membership(user_id, purchased=None, membership_trial=None):
|
||||
if membership_trial is not None:
|
||||
payload.update({'membership_trial': membership_trial})
|
||||
|
||||
return requests.post(url, data=json.dumps(payload), headers=dict(content_type='application/json'))
|
||||
return requests.post(url, json=payload, headers=dict(content_type='application/json'))
|
||||
|
||||
|
||||
def format_phone_number(number):
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
"""neuf_kassa URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/1.8/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Add an import: from blog import urls as blog_urls
|
||||
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
|
||||
"""
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
from apps.kassa import urls as kassa_urls
|
||||
|
||||
+7
-9
@@ -1,12 +1,10 @@
|
||||
Django>=1.8,<1.9
|
||||
django-auth-ldap==1.2.6
|
||||
django-bootstrap-form==3.2
|
||||
django-cors-headers==1.1.0
|
||||
django-extensions==1.5.5
|
||||
django-phonenumber-field==0.7.2
|
||||
gunicorn==17.5
|
||||
mysqlclient==1.3.6
|
||||
ndg-httpsclient==0.4.0
|
||||
pyasn1==0.1.8
|
||||
pyOpenSSL==0.15.1
|
||||
requests==2.7.0
|
||||
django-extensions==1.6.1
|
||||
django-phonenumber-field==1.0.0
|
||||
gunicorn==19.4.5
|
||||
mysqlclient==1.3.7
|
||||
pyldap==2.4.25.1
|
||||
requests==2.9.1
|
||||
django-auth-ldap==1.2.7
|
||||
Reference in new issue
Block a user