resolve conflicts

This commit is contained in:
Tomislav R 2016-05-20 14:22:51 +02:00
commit 2a7603778a
60 changed files with 676 additions and 444 deletions

View file

@ -70,7 +70,7 @@ def letscowork(request):
def blog(request): def blog(request):
tags = ["digitalglarus"] tags = ["digitalglarus"]
posts = Post.objects.filter_by_language(get_language()).filter(tags__name__in=tags) posts = Post.objects.filter_by_language(get_language()).filter(tags__name__in=tags, publish=True)
context = { context = {
'post_list': posts, 'post_list': posts,
} }

View file

@ -84,18 +84,18 @@ INSTALLED_APPS = (
'djangocms_file', 'djangocms_file',
'djangocms_picture', 'djangocms_picture',
'djangocms_video', 'djangocms_video',
# 'djangocms_flash', 'djangocms_flash',
# 'djangocms_googlemap', 'djangocms_googlemap',
# 'djangocms_inherit', 'djangocms_inherit',
# 'djangocms_link', 'djangocms_link',
# 'djangocms_teaser', 'djangocms_teaser',
'djangocms_page_meta', 'djangocms_page_meta',
'djangocms_text_ckeditor', 'djangocms_text_ckeditor',
'djangocms_admin_style', 'djangocms_admin_style',
'cmsplugin_filer_file', 'cmsplugin_filer_file',
'cmsplugin_filer_folder', 'cmsplugin_filer_folder',
'cmsplugin_filer_link', 'cmsplugin_filer_link',
# 'cmsplugin_filer_teaser', 'cmsplugin_filer_teaser',
'cmsplugin_filer_video', 'cmsplugin_filer_video',
# #
# blog # blog
@ -103,7 +103,7 @@ INSTALLED_APPS = (
'reversion', 'reversion',
# ungleich # ungleich
'ungleich', 'ungleich',
'ungleich_page', # 'ungleich_page',
'hosting', 'hosting',
'digitalglarus', 'digitalglarus',
@ -176,7 +176,7 @@ CMS_TEMPLATES = (
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'app', 'NAME': 'app_new',
} }
} }
@ -280,12 +280,12 @@ CACHES = {
} }
} }
if LOGIN_URL is None: #if LOGIN_URL is None:
LOGIN_URL = APP_ROOT_ENDPOINT + 'login/' # LOGIN_URL = APP_ROOT_ENDPOINT + 'login/'
if LOGOUT_URL is None: #if LOGOUT_URL is None:
LOGOUT_URL = APP_ROOT_ENDPOINT + 'logout/' # LOGOUT_URL = APP_ROOT_ENDPOINT + 'logout/'
if LOGIN_REDIRECT_URL is None: #if LOGIN_REDIRECT_URL is None:
LOGIN_REDIRECT_URL = APP_ROOT_ENDPOINT # LOGIN_REDIRECT_URL = APP_ROOT_ENDPOINT
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.7/howto/static-files/
@ -337,6 +337,7 @@ STATICFILES_FINDERS = (
THUMBNAIL_PROCESSORS = ( THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace', 'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop', 'easy_thumbnails.processors.autocrop',
#'easy_thumbnails.processors.scale_and_crop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location', 'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters', 'easy_thumbnails.processors.filters',
) )
@ -442,6 +443,12 @@ PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'},)}
AUTH_USER_MODEL = 'membership.CustomUser' AUTH_USER_MODEL = 'membership.CustomUser'
ALLOWED_HOSTS = [
"*"
]
# PAYMENT # PAYMENT
STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services" STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services"

View file

@ -3,10 +3,12 @@ from .base import *
ADMINS = ( ADMINS = (
('Nico Schottelius', 'nico.schottelius@ungleich.ch'), ('Nico Schottelius', 'nico.schottelius@ungleich.ch'),
('Raul Ascencio', 'raul.ascencio@yandex.com'), ('Raul Ascencio', 'raul.ascencio@yandex.com'),
('Tomislav Rupcic','tmslav@gmail.com'),
) )
# ('Sanghee Kim', 'sanghee.kim@ungleich.ch'), # ('Sanghee Kim', 'sanghee.kim@ungleich.ch'),
MANAGERS = ADMINS #MANAGERS = ADMINS
REGISTRATION_MESSAGE['message'] = REGISTRATION_MESSAGE['message'].format(host='digitalglarus.ungleich.ch',slug='{slug}') REGISTRATION_MESSAGE['message'] = REGISTRATION_MESSAGE['message'].format(host='digitalglarus.ungleich.ch',slug='{slug}')

View file

@ -1,6 +1,5 @@
from django.contrib import admin from django.contrib import admin
from .models import RailsBetaUser, VirtualMachineType from .models import VirtualMachineType
admin.site.register(RailsBetaUser)
admin.site.register(VirtualMachineType) admin.site.register(VirtualMachineType)

View file

@ -10,41 +10,43 @@ class Command(BaseCommand):
hetzner = { hetzner = {
'base_price': 10, 'base_price': 10,
'core_price': 10, 'core_price': 10,
'memory_price': 10, 'memory_price': 5,
'disk_size_price': 10, 'disk_size_price': 1,
'description': 'VM auf einzelner HW, Raid1, kein HA' 'description': 'VM auf einzelner HW, Raid1, kein HA',
'location':'DE'
} }
return { return {
'hetzner_nug': { # 'hetzner_nug': {
'base_price': 5, # 'base_price': 5,
'memory_price': 2, # 'memory_price': 2,
'core_price': 2, # 'core_price': 2,
'disk_size_price': 0.5, # 'disk_size_price': 0.5,
'description': 'VM ohne Uptime Garantie' # 'description': 'VM ohne Uptime Garantie'
}, # },
'hetzner': hetzner, 'hetzner': hetzner,
'hetzner_raid6': { # 'hetzner_raid6': {
'base_price': hetzner['base_price']*1.2, # 'base_price': hetzner['base_price']*1.2,
'core_price': hetzner['core_price']*1.2, # 'core_price': hetzner['core_price']*1.2,
'memory_price': hetzner['memory_price']*1.2, # 'memory_price': hetzner['memory_price']*1.2,
'disk_size_price': hetzner['disk_size_price']*1.2, # 'disk_size_price': hetzner['disk_size_price']*1.2,
'description': 'VM auf einzelner HW, Raid1, kein HA' # 'description': 'VM auf einzelner HW, Raid1, kein HA'
}, # },
'hetzner_glusterfs': { # 'hetzner_glusterfs': {
'base_price': hetzner['base_price']*1.4, # 'base_price': hetzner['base_price']*1.4,
'core_price': hetzner['core_price']*1.4, # 'core_price': hetzner['core_price']*1.4,
'memory_price': hetzner['memory_price']*1.4, # 'memory_price': hetzner['memory_price']*1.4,
'disk_size_price': hetzner['disk_size_price']*1.4, # 'disk_size_price': hetzner['disk_size_price']*1.4,
'description': 'VM auf einzelner HW, Raid1, kein HA' # 'description': 'VM auf einzelner HW, Raid1, kein HA'
}, # },
'bern': { 'bern': {
'base_price': 12, 'base_price': 12,
'core_price': 25, 'core_price': 25,
'memory_price': 7, 'memory_price': 7,
'disk_size_price': 0.70, 'disk_size_price': 0.70,
'description': "VM in Bern, HA Setup ohne HA Garantie", 'description': "VM in Bern, HA Setup ohne HA Garantie",
'location':'CH',
} }
} }

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-12 04:48
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hosting', '0014_auto_20160505_0541'),
]
operations = [
migrations.RenameField(
model_name='hostingorder',
old_name='VMPlan',
new_name='vm_plan',
),
]

View file

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-14 06:50
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hosting', '0015_auto_20160512_0448'),
]
operations = [
migrations.DeleteModel(
name='RailsBetaUser',
),
]

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-19 04:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hosting', '0016_delete_railsbetauser'),
]
operations = [
migrations.AddField(
model_name='virtualmachinetype',
name='location',
field=models.CharField(choices=[('DE', 'Germany'), ('CH', 'Switzerland')], default='DE', max_length=3),
preserve_default=False,
),
]

View file

@ -10,14 +10,6 @@ from utils.models import BillingAddress
from .managers import VMPlansManager from .managers import VMPlansManager
class RailsBetaUser(models.Model):
email = models.EmailField(unique=True)
received_date = models.DateTimeField('date received')
def __str__(self):
return "%s - %s" % (self.email, self.received_date)
class VirtualMachineType(models.Model): class VirtualMachineType(models.Model):
HETZNER_NUG = 'hetzner_nug' HETZNER_NUG = 'hetzner_nug'
@ -25,6 +17,8 @@ class VirtualMachineType(models.Model):
HETZNER_R6 = 'hetzner_raid6' HETZNER_R6 = 'hetzner_raid6'
HETZNER_G = 'hetzner_glusterfs' HETZNER_G = 'hetzner_glusterfs'
BERN = 'bern' BERN = 'bern'
DE_LOCATION = 'DE'
CH_LOCATION = 'CH'
HOSTING_TYPES = ( HOSTING_TYPES = (
(HETZNER_NUG, 'Hetzner No Uptime Guarantee'), (HETZNER_NUG, 'Hetzner No Uptime Guarantee'),
@ -34,12 +28,17 @@ class VirtualMachineType(models.Model):
(BERN, 'Bern'), (BERN, 'Bern'),
) )
LOCATIONS_CHOICES = (
(DE_LOCATION, 'Germany'),
(CH_LOCATION, 'Switzerland'),
)
description = models.TextField() description = models.TextField()
base_price = models.FloatField() base_price = models.FloatField()
memory_price = models.FloatField() memory_price = models.FloatField()
core_price = models.FloatField() core_price = models.FloatField()
disk_size_price = models.FloatField() disk_size_price = models.FloatField()
hosting_company = models.CharField(max_length=30, choices=HOSTING_TYPES) hosting_company = models.CharField(max_length=30, choices=HOSTING_TYPES)
location = models.CharField(max_length=3, choices=LOCATIONS_CHOICES)
def __str__(self): def __str__(self):
return "%s" % (self.get_hosting_company_display()) return "%s" % (self.get_hosting_company_display())
@ -73,6 +72,8 @@ class VirtualMachineType(models.Model):
'hosting_company_name': self.get_hosting_company_display(), 'hosting_company_name': self.get_hosting_company_display(),
'hosting_company': self.hosting_company, 'hosting_company': self.hosting_company,
'default_price': self.defeault_price(), 'default_price': self.defeault_price(),
'location_code': self.location,
'location': self.get_location_display(),
'id': self.id, 'id': self.id,
} }
@ -86,6 +87,9 @@ class VirtualMachinePlan(models.Model):
objects = VMPlansManager() objects = VMPlansManager()
def __str__(self):
return "%s" % (self.id)
@cached_property @cached_property
def hosting_company_name(self): def hosting_company_name(self):
return self.vm_type.get_hosting_company_display() return self.vm_type.get_hosting_company_display()
@ -106,7 +110,7 @@ class HostingOrder(models.Model):
ORDER_APPROVED_STATUS = 'Approved' ORDER_APPROVED_STATUS = 'Approved'
ORDER_DECLINED_STATUS = 'Declined' ORDER_DECLINED_STATUS = 'Declined'
VMPlan = models.ForeignKey(VirtualMachinePlan, related_name='hosting_orders') vm_plan = models.ForeignKey(VirtualMachinePlan, related_name='hosting_orders')
customer = models.ForeignKey(StripeCustomer) customer = models.ForeignKey(StripeCustomer)
billing_address = models.ForeignKey(BillingAddress) billing_address = models.ForeignKey(BillingAddress)
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)
@ -115,13 +119,16 @@ class HostingOrder(models.Model):
cc_brand = models.CharField(max_length=10) cc_brand = models.CharField(max_length=10)
stripe_charge_id = models.CharField(max_length=100, null=True) stripe_charge_id = models.CharField(max_length=100, null=True)
def __str__(self):
return "%s" % (self.id)
@cached_property @cached_property
def status(self): def status(self):
return self.ORDER_APPROVED_STATUS if self.approved else self.ORDER_DECLINED_STATUS return self.ORDER_APPROVED_STATUS if self.approved else self.ORDER_DECLINED_STATUS
@classmethod @classmethod
def create(cls, VMPlan=None, customer=None, billing_address=None): def create(cls, vm_plan=None, customer=None, billing_address=None):
instance = cls.objects.create(VMPlan=VMPlan, customer=customer, instance = cls.objects.create(vm_plan=vm_plan, customer=customer,
billing_address=billing_address) billing_address=billing_address)
return instance return instance

View file

@ -33,7 +33,7 @@
.pricing li.type { .pricing li.type {
list-style: none; list-style: none;
padding: 13px; padding: 13px;
height: 200px; height: 150px;
} }
.pricing big { .pricing big {
@ -72,6 +72,16 @@
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
} }
/* pricing color */ /* pricing color */
.p-black big,
.p-black h3 {
color: black;
}
.p-black button {
background: black;
}
.p-green big, .p-green big,
.p-green h3 { .p-green h3 {
color: #4c7737; color: #4c7737;

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

View file

@ -49,5 +49,9 @@ $( document ).ready(function() {
$('.disk-space-selector').on('change',change_attribute); $('.disk-space-selector').on('change',change_attribute);
//Disable input
$('.disk-space-selector').keypress(function(event){
event.preventDefault();
});
}); });

View file

@ -81,19 +81,19 @@
</li> </li>
{% else %} {% else %}
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#how">How it works</a> <a href="{{ request.session.hosting_url}}#how">How it works</a>
</li> </li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#your">Your infrastructure</a> <a href="{{ request.session.hosting_url }}#your">Your infrastructure</a>
</li> </li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#our">Our inftrastructure</a> <a href="{{ request.session.hosting_url }}#our">Our inftrastructure</a>
</li> </li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#price">Pricing</a> <a href="{{ request.session.hosting_url }}#price">Pricing</a>
</li> </li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#contact">Contact</a> <a href="{{ request.session.hosting_url }}#contact">Contact</a>
</li> </li>
<li> <li>
<a href="{% url 'hosting:login' %}?next={{request.current_path}}">Login</a> <a href="{% url 'hosting:login' %}?next={{request.current_path}}">Login</a>
@ -123,21 +123,22 @@
</li> </li>
<li class="footer-menu-divider">&sdot;</li> <li class="footer-menu-divider">&sdot;</li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#how">How it works</a> <a href="{{ request.session.hosting_url}}#how">How it works</a>
<li class="footer-menu-divider">&sdot;</li> <li class="footer-menu-divider">&sdot;</li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#your">Your infrastructure</a></li> <a href="{{ request.session.hosting_url }}#your">Your infrastructure</a></li>
<li>&sdot;</li> <li>&sdot;</li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#our">Our infrastructure</a></li> <a href="{{ request.session.hosting_url }}#our">Our infrastructure</a></li>
<li class="footer-menu-divider">&sdot;</li> <li class="footer-menu-divider">&sdot;</li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#services">Pricing</a> <a href="{{ request.session.hosting_url }}#services">Pricing</a>
</li> </li>
<li class="footer-menu-divider">&sdot;</li> <li class="footer-menu-divider">&sdot;</li>
<li> <li>
<a href="{{ request.META.HTTP_REFERER }}#contact">Contact</a> <a href="{{ request.session.hosting_url }}#contact">Contact</a>
</li> </li>
</ul> </ul>
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. All Rights Reserved</p> <p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. All Rights Reserved</p>
</div> </div>

View file

@ -1,3 +1,4 @@
{% load staticfiles %}
<a name="price"></a> <a name="price"></a>
<div class="content-section-b"> <div class="content-section-b">
<div class="container-fluid pricing-container"> <div class="container-fluid pricing-container">
@ -6,7 +7,6 @@
<hr class="section-heading-spacer"> <hr class="section-heading-spacer">
<div class="clearfix"></div> <div class="clearfix"></div>
<h2 class="section-heading">Hosting Price</h2> <h2 class="section-heading">Hosting Price</h2>
<p class="lead">Here are samples of our {{ hosting_long }} hosting offers, suited for different projects. Our offer examples come in different size, speed, and storage. </p>
</div> </div>
<!-- Title --> <!-- Title -->
<div class="row"> <div class="row">
@ -17,17 +17,31 @@
<!-- Page Features --> <!-- Page Features -->
<div class="row text-center"> <div class="row text-center">
<div class="block col-md-offset-1"> <div class="block col-md-offset-3">
{% for vm in vm_types %} {% for vm in vm_types %}
<div class="col-xs-12 col-sm-6 col-md-2"> <div class="col-xs-12 col-sm-6 col-md-4">
<form class="form-inline" method="POST" action="{{request.path}}"> <form class="form-inline" method="POST" action="{{request.path}}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="hosting_company" value="{{vm.hosting_company}}"> <input type="hidden" name="hosting_company" value="{{vm.hosting_company}}">
<input type="hidden" name="hosting_company_name" value="{{vm.hosting_company_name}}"> <input type="hidden" name="hosting_company_name" value="{{vm.hosting_company_name}}">
<ul class="pricing {% cycle 'p-green' 'p-yel' 'p-red' 'p-blue' %}">
<ul class="pricing {% cycle 'p-red' 'p-black' 'p-red' 'p-yel' %}">
<li class="type"> <li class="type">
<!-- <img src="http://bread.pp.ua/n/settings_g.svg" alt=""> --> <!-- <img src="http://bread.pp.ua/n/settings_g.svg" alt=""> -->
<h3 >{{vm.hosting_company_name}}</h3> <h3 >{{vm.hosting_company_name}}</h3>
<br/>
<img class="img-responsive" src="{{ STATIC_URL }}hosting/img/{{vm.location_code}}_flag.png" alt="">
</li>
<li>
<!-- Single button -->
<div class="btn-group">
<div class="form-group">
<label for="cores">Location: </label>
{{vm.location}}
</div>
</div>
</li> </li>
<li> <li>
<!-- Single button --> <!-- Single button -->
@ -64,7 +78,7 @@
<div class="form-group row"> <div class="form-group row">
<div class="col-xs-offset-1 col-xs-9 col-sm-12 col-md-12 col-md-offset-0"> <div class="col-xs-offset-1 col-xs-9 col-sm-12 col-md-12 col-md-offset-0">
<label for="Disk Size">Disk Size: </label> <label for="Disk Size">Disk Size: </label>
<input class="form-control short-input text-center disk-space-selector" name="disk_space" type="number" id="{{vm.hosting_company}}-disk_space" min="10" value="10" data-vm-type="{{vm.hosting_company}}"/> <input class="form-control short-input text-center disk-space-selector" name="disk_space" type="number" id="{{vm.hosting_company}}-disk_space" min="10" value="10" step="10" data-vm-type="{{vm.hosting_company}}"/>
<span>GiB</span> <span>GiB</span>
</div> </div>
</div> </div>
@ -75,7 +89,7 @@
<span>per month</span> <span>per month</span>
</li> </li>
<li> <li>
<button>Buy it</button> <button>Book it</button>
</li> </li>
</ul> </ul>
</form> </form>

View file

@ -5,6 +5,17 @@
<div class="intro-auth intro-login"> <div class="intro-auth intro-login">
<div class="container"> <div class="container">
<div class="col-md-4 col-md-offset-4"> <div class="col-md-4 col-md-offset-4">
{% block messages %}
{% if request.GET.logged_out %}
<div class="alert alert-warning"> <!-- singular -->
<a class="close" data-dismiss="alert">×</a>
You haven been logged out
</div>
{% endif %}
{% endblock %}
<div class="intro-message"> <div class="intro-message">
<h2 class="section-heading">Login</h2> <h2 class="section-heading">Login</h2>
<form action="{% url 'hosting:login' %}" method="post" class="form" novalidate> <form action="{% url 'hosting:login' %}" method="post" class="form" novalidate>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col-xs-8 col-xs-offset-2"> <div class="col-xs-8 col-xs-offset-2">
<div class="invoice-title"> <div class="invoice-title">
<h2>Invoice</h2><h3 class="pull-right">Order # {{object.id}}</h3> <h2>Invoice</h2><h3 class="pull-right">Order # {{order.id}}</h3>
</div> </div>
<hr> <hr>
<div class="row"> <div class="row">
@ -14,18 +14,18 @@
<address> <address>
<h3><b>Billed To:</b></h3> <h3><b>Billed To:</b></h3>
{{user.name}}<br> {{user.name}}<br>
{{object.billing_address.street_address}},{{order.billing_address.postal_code}}<br> {{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br>
{{object.billing_address.city}}, {{object.billing_address.country}}. {{order.billing_address.city}}, {{order.billing_address.country}}.
</address> </address>
</div> </div>
<div class="col-xs-6 text-right"> <div class="col-xs-6 text-right">
<address> <address>
<strong>Order Date:</strong><br> <strong>Order Date:</strong><br>
{{object.created_at}}<br><br> {{order.created_at}}<br><br>
<strong>Status:</strong><br> <strong>Status:</strong><br>
<strong class="{% if object.status == 'Approved' %}text-success <strong class="{% if order.status == 'Approved' %}text-success
{%else%} text-danger {%else%} text-danger
{% endif %}">{{object.status}}</strong> {% endif %}">{{order.status}}</strong>
<br><br> <br><br>
</address> </address>
@ -35,7 +35,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<address> <address>
<strong>Payment Method:</strong><br> <strong>Payment Method:</strong><br>
{{object.cc_brand}} ending **** {{object.last4}}<br> {{order.cc_brand}} ending **** {{order.last4}}<br>
{{user.email}} {{user.email}}
</address> </address>
</div> </div>
@ -48,15 +48,15 @@
<h3><b>Order summary</b></h3> <h3><b>Order summary</b></h3>
<hr> <hr>
<div class="content"> <div class="content">
<p><b>Type</b> <span class="pull-right">{{object.VMPlan.hosting_company_name}}</span></p> <p><b>Type</b> <span class="pull-right">{{order.vm_plan.hosting_company_name}}</span></p>
<hr> <hr>
<p><b>Cores</b> <span class="pull-right">{{object.VMPlan.cores}}</span></p> <p><b>Cores</b> <span class="pull-right">{{order.vm_plan.cores}}</span></p>
<hr> <hr>
<p><b>Memory</b> <span class="pull-right">{{object.VMPlan.memory}} GiB</span></p> <p><b>Memory</b> <span class="pull-right">{{order.vm_plan.memory}} GiB</span></p>
<hr> <hr>
<p><b>Disk space</b> <span class="pull-right">{{object.VMPlan.disk_size}} GiB</span></p> <p><b>Disk space</b> <span class="pull-right">{{order.vm_plan.disk_size}} GiB</span></p>
<hr> <hr>
<h4>Total<p class="pull-right"><b>{{object.VMPlan.price}} CHF</b></p></h4> <h4>Total<p class="pull-right"><b>{{order.vm_plan.price}} CHF</b></p></h4>
</div> </div>
</div> </div>
</div> </div>

View file

@ -23,7 +23,7 @@
<tr> <tr>
<td scope="row">{{ order.id }}</td> <td scope="row">{{ order.id }}</td>
<td>{{ order.created_at }}</td> <td>{{ order.created_at }}</td>
<td>{{ order.VMPlan.price }} CHF</td> <td>{{ order.vm_plan.price }} CHF</td>
<td>{% if order.approved %} <td>{% if order.approved %}
<span class="text-success strong">Approved</span> <span class="text-success strong">Approved</span>
{% else %} {% else %}
@ -55,7 +55,8 @@
Your Your
order?</h4> order?</h4>
<form method="post" action="{% url 'hosting:delete_order' order.id %}"> <form method="post"
action="{% url 'hosting:delete_order' order.id %}">
{% csrf_token %} {% csrf_token %}
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"

View file

@ -104,7 +104,7 @@
<tr> <tr>
<td scope="row">{{order.id}}</td> <td scope="row">{{order.id}}</td>
<td>{{order.created_at}}</td> <td>{{order.created_at}}</td>
<td>{{order.VMPlan.price}} CHF</td> <td>{{order.vm_plan.price}} CHF</td>
<td>{% if order.approved %} <td>{% if order.approved %}
<span class="text-success strong">Approved</span> <span class="text-success strong">Approved</span>
{% else%} {% else%}

75
hosting/test_models.py Normal file
View file

@ -0,0 +1,75 @@
from django.test import TestCase
from django.core.management import call_command
from .models import VirtualMachineType
class VirtualMachineTypeModelTest(TestCase):
def setUp(self):
self.HETZNER_NUG_NAME = 'hetzner_nug'
self.HETZNER_NAME = 'hetzner'
self.HETZNER_RAID6_NAME = 'hetzner_raid6'
self.HETZNER_GLUSTERFS_NAME = 'hetzner_glusterfs'
self.BERN_NAME = 'bern'
self.HETZNER_NUG_EXPECTED_PRICE = 79
self.HETZNER_EXPECTED_PRICE = 180
self.HETZNER_RAID6_EXPECTED_PRICE = 216
self.HETZNER_GLUSTERFS_EXPECTED_PRICE = 252
self.BERN_EXPECTED_PRICE = 202
call_command('create_vm_types')
def test_calculate_price(self):
# hetzner_nug
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NUG_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.HETZNER_NUG_EXPECTED_PRICE)
# hetzner
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.HETZNER_EXPECTED_PRICE)
# hetzner_raid6
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_RAID6_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.HETZNER_RAID6_EXPECTED_PRICE)
# hetzner_glusterfs
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.HETZNER_GLUSTERFS_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.HETZNER_GLUSTERFS_EXPECTED_PRICE)
# bern
specifications = {
'cores': 2,
'memory': 10,
'disk_size': 100
}
vm_type = VirtualMachineType.objects.get(hosting_company=self.BERN_NAME)
calculated_price = vm_type.calculate_price(specifications)
self.assertEqual(calculated_price, self.BERN_EXPECTED_PRICE)

View file

@ -1,8 +1,18 @@
from django.test import TestCase from unittest import mock
from django.conf import settings
from django.test import TestCase, RequestFactory
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.core.urlresolvers import resolve from django.core.urlresolvers import resolve
from .models import VirtualMachineType
from .views import DjangoHostingView, RailsHostingView, NodeJSHostingView from model_mommy import mommy
from membership.models import CustomUser, StripeCustomer
from .models import VirtualMachineType, HostingOrder, VirtualMachinePlan
from .views import DjangoHostingView, RailsHostingView, NodeJSHostingView, LoginView, SignupView, \
PaymentVMView, OrdersHostingDetailView, OrdersHostingListView, VirtualMachineDetailView, \
VirtualMachinesPlanListView
from utils.tests import BaseTestCase
class ProcessVMSelectionTestMixin(object): class ProcessVMSelectionTestMixin(object):
@ -70,3 +80,280 @@ class NodeJSHostingViewTest(TestCase, ProcessVMSelectionTestMixin):
'email': "info@node-hosting.ch", 'email': "info@node-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(), 'vm_types': VirtualMachineType.get_serialized_vm_types(),
} }
class PaymentVMViewTest(BaseTestCase):
def setUp(self):
super(PaymentVMViewTest, self).setUp()
self.view = PaymentVMView
# VM
self.vm = mommy.make(VirtualMachineType, base_price=10000,
memory_price=100,
core_price=1000,
disk_size_price=1)
# post data
self.billing_address = {
'street_address': 'street name',
'city': 'MyCity',
'postal_code': '32123123123123',
'country': 'VE',
'token': 'a23kfmslwxhkwis'
}
# urls
self.url = reverse('hosting:payment')
# Session data
self.session_data = {
'vm_specs': {
'hosting_company': self.vm.hosting_company,
'cores': 1,
'memory': 10,
'disk_size': 10000,
'price': 22000,
}
}
session = self.customer_client.session
session.update(self.session_data)
session.save()
def test_url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
@mock.patch('utils.stripe_utils.StripeUtils.create_customer')
def test_post(self, stripe_mocked_call):
# Anonymous user should get redirect to login
response = self.client.post(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'), reverse('hosting:payment'))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer user should be able to pay
stripe_mocked_call.return_value = {
'paid': True,
'response_object': self.stripe_mocked_customer,
'error': None
}
response = self.customer_client.post(self.url, self.billing_address)
self.assertEqual(response.status_code, 200)
self.assertTrue(StripeCustomer.objects.filter(user__email=self.customer.email).exists())
stripe_customer = StripeCustomer.objects.get(user__email=self.customer.email)
self.assertEqual(stripe_customer.user, self.customer)
self.assertTrue(HostingOrder.objects.filter(customer=stripe_customer).exists())
hosting_order = HostingOrder.objects.filter(customer=stripe_customer)[0]
vm_plan = {
'cores': hosting_order.vm_plan.cores,
'memory': hosting_order.vm_plan.memory,
'disk_size': hosting_order.vm_plan.disk_size,
'price': hosting_order.vm_plan.price,
'hosting_company': hosting_order.vm_plan.vm_type.hosting_company
}
self.assertEqual(vm_plan, self.session_data.get('vm_specs'))
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'), reverse('hosting:payment'))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Logged user should get the page
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['stripe_key'],
settings.STRIPE_API_PUBLIC_KEY)
class VirtualMachineDetailViewTest(BaseTestCase):
def setUp(self):
super(VirtualMachineDetailViewTest, self).setUp()
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
self.vm = mommy.make(VirtualMachinePlan)
self.order = mommy.make(HostingOrder, customer=self.stripe_customer, vm_plan=self.vm)
self.url = reverse('hosting:virtual_machines', kwargs={'pk': self.vm.id})
self.view = VirtualMachineDetailView()
self.expected_template = 'hosting/virtual_machine_detail.html'
def url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'),
reverse('hosting:virtual_machines',
kwargs={'pk': self.vm.id}))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer should be able to get data
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['virtual_machine'], self.vm)
self.assertTemplateUsed(response, self.expected_template)
class VirtualMachinesPlanListViewTest(BaseTestCase):
def setUp(self):
super(VirtualMachinesPlanListViewTest, self).setUp()
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
mommy.make(HostingOrder, customer=self.stripe_customer, approved=True, _quantity=20)
_vms = VirtualMachinePlan.objects.all()
self.vms = sorted(_vms, key=lambda vm: vm.id, reverse=True)
self.url = reverse('hosting:virtual_machines')
self.view = VirtualMachinesPlanListView()
self.expected_template = 'hosting/virtual_machines.html'
def url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'),
reverse('hosting:virtual_machines'))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer should be able to get his orders
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(list(response.context['vms']), self.vms[:10])
self.assertTemplateUsed(response, self.expected_template)
class OrderHostingDetailViewTest(BaseTestCase):
def setUp(self):
super(OrderHostingDetailViewTest, self).setUp()
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
self.order = mommy.make(HostingOrder, customer=self.stripe_customer)
self.url = reverse('hosting:orders', kwargs={'pk': self.order.id})
self.view = OrdersHostingDetailView()
self.expected_template = 'hosting/order_detail.html'
def url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'),
reverse('hosting:orders', kwargs={'pk': self.order.id}))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer should be able to get data
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['order'], self.order)
self.assertTemplateUsed(response, self.expected_template)
class OrdersHostingListViewTest(BaseTestCase):
def setUp(self):
super(OrdersHostingListViewTest, self).setUp()
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
_orders = mommy.make(HostingOrder, customer=self.stripe_customer, _quantity=20)
self.orders = sorted(_orders, key=lambda order: order.id, reverse=True)
self.url = reverse('hosting:orders')
self.view = OrdersHostingListView()
self.expected_template = 'hosting/orders.html'
def url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
# Anonymous user should get redirect to login
response = self.client.get(self.url)
expected_url = "%s?next=%s" % (reverse('hosting:login'), reverse('hosting:orders'))
self.assertRedirects(response, expected_url=expected_url,
status_code=302, target_status_code=200)
# Customer should be able to get his orders
response = self.customer_client.get(self.url, follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(list(response.context['orders']), self.orders[:10])
self.assertTemplateUsed(response, self.expected_template)
class LoginViewTest(TestCase):
def setUp(self):
self.url = reverse('hosting:login')
self.view = LoginView
self.expected_template = 'hosting/login.html'
self.user = mommy.make('membership.CustomUser')
self.password = 'fake_password'
self.user.set_password(self.password)
self.user.save()
def test_url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, self.expected_template)
def test_anonymous_user_can_login(self):
data = {
'email': self.user.email,
'password': self.password
}
response = self.client.post(self.url, data=data, follow=True)
self.assertEqual(response.context['user'], self.user)
self.assertEqual(response.status_code, 200)
class SignupViewTest(TestCase):
def setUp(self):
self.url = reverse('hosting:signup')
self.expected_template = 'hosting/signup.html'
self.view = SignupView
self.signup_data = {
'name': 'ungleich',
'email': 'test@ungleich.com',
'password': 'fake_password',
'confirm_password': 'fake_password',
}
def test_url_resolve_to_view_correctly(self):
found = resolve(self.url)
self.assertEqual(found.func.__name__, self.view.__name__)
def test_get(self):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, self.expected_template)
def test_anonymous_user_can_signup(self):
response = self.client.post(self.url, data=self.signup_data, follow=True)
self.user = CustomUser.objects.get(email=self.signup_data.get('email'))
self.assertEqual(response.context['user'], self.user)
self.assertEqual(response.status_code, 200)

View file

@ -3,7 +3,7 @@ from django.conf.urls import url
from .views import DjangoHostingView, RailsHostingView, PaymentVMView, \ from .views import DjangoHostingView, RailsHostingView, PaymentVMView, \
NodeJSHostingView, LoginView, SignupView, IndexView, \ NodeJSHostingView, LoginView, SignupView, IndexView, \
OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\ OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\
VirtualMachineDetailListView,OrdersHostingDeleteView OrdersHostingDeleteView,VirtualMachineDetailView
urlpatterns = [ urlpatterns = [
# url(r'pricing/?$', VMPricingView.as_view(), name='pricing'), # url(r'pricing/?$', VMPricingView.as_view(), name='pricing'),
@ -16,10 +16,10 @@ urlpatterns = [
url(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'), url(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'),
url(r'cancel_order/(?P<pk>\d+)/?$',OrdersHostingDeleteView.as_view(),name='delete_order'), url(r'cancel_order/(?P<pk>\d+)/?$',OrdersHostingDeleteView.as_view(),name='delete_order'),
url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'), url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'),
url(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineDetailListView.as_view(), url(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineDetailView.as_view(),
name='virtual_machines'), name='virtual_machines'),
url(r'login/?$', LoginView.as_view(), name='login'), url(r'login/?$', LoginView.as_view(), name='login'),
url(r'signup/?$', SignupView.as_view(), name='signup'), url(r'signup/?$', SignupView.as_view(), name='signup'),
url(r'^logout/?$', 'django.contrib.auth.views.logout', url(r'^logout/?$', 'django.contrib.auth.views.logout',
{'next_page': '/ungleich_page'}, name='logout') {'next_page': '/hosting/login?logged_out=true'}, name='logout')
] ]

View file

@ -29,10 +29,11 @@ class DjangoHostingView(ProcessVMSelectionMixin, View):
'email': "info@django-hosting.ch", 'email': "info@django-hosting.ch",
'vm_types': VirtualMachineType.get_serialized_vm_types(), 'vm_types': VirtualMachineType.get_serialized_vm_types(),
} }
return context return context
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
request.session['hosting_url'] = reverse('hosting:djangohosting')
context = self.get_context_data() context = self.get_context_data()
return render(request, self.template_name, context) return render(request, self.template_name, context)
@ -53,6 +54,7 @@ class RailsHostingView(ProcessVMSelectionMixin, View):
return context return context
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
request.session['hosting_url'] = reverse('hosting:railshosting')
context = self.get_context_data() context = self.get_context_data()
return render(request, self.template_name, context) return render(request, self.template_name, context)
@ -72,7 +74,7 @@ class NodeJSHostingView(ProcessVMSelectionMixin, View):
return context return context
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
request.session['hosting_url'] = reverse('hosting:nodejshosting')
context = self.get_context_data() context = self.get_context_data()
return render(request, self.template_name, context) return render(request, self.template_name, context)
@ -143,8 +145,9 @@ class SignupView(CreateView):
return HttpResponseRedirect(self.get_success_url()) return HttpResponseRedirect(self.get_success_url())
class PaymentVMView(FormView): class PaymentVMView(LoginRequiredMixin, FormView):
template_name = 'hosting/payment.html' template_name = 'hosting/payment.html'
login_url = reverse_lazy('hosting:login')
form_class = BillingAddressForm form_class = BillingAddressForm
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
@ -183,7 +186,7 @@ class PaymentVMView(FormView):
billing_address = form.save() billing_address = form.save()
# Create a Hosting Order # Create a Hosting Order
order = HostingOrder.create(VMPlan=plan, customer=customer, order = HostingOrder.create(vm_plan=plan, customer=customer,
billing_address=billing_address) billing_address=billing_address)
# Make stripe charge to a customer # Make stripe charge to a customer
@ -219,6 +222,7 @@ class PaymentVMView(FormView):
class OrdersHostingDetailView(LoginRequiredMixin, DetailView): class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
template_name = "hosting/order_detail.html" template_name = "hosting/order_detail.html"
context_object_name = "order"
login_url = reverse_lazy('hosting:login') login_url = reverse_lazy('hosting:login')
model = HostingOrder model = HostingOrder
@ -229,6 +233,7 @@ class OrdersHostingListView(LoginRequiredMixin, ListView):
context_object_name = "orders" context_object_name = "orders"
model = HostingOrder model = HostingOrder
paginate_by = 10 paginate_by = 10
ordering = '-id'
def get_queryset(self): def get_queryset(self):
user = self.request.user user = self.request.user
@ -250,6 +255,7 @@ class VirtualMachinesPlanListView(LoginRequiredMixin, ListView):
context_object_name = "vms" context_object_name = "vms"
model = VirtualMachinePlan model = VirtualMachinePlan
paginate_by = 10 paginate_by = 10
ordering = '-id'
def get_queryset(self): def get_queryset(self):
user = self.request.user user = self.request.user
@ -257,7 +263,7 @@ class VirtualMachinesPlanListView(LoginRequiredMixin, ListView):
return super(VirtualMachinesPlanListView, self).get_queryset() return super(VirtualMachinesPlanListView, self).get_queryset()
class VirtualMachineDetailListView(LoginRequiredMixin, DetailView): class VirtualMachineDetailView(LoginRequiredMixin, DetailView):
template_name = "hosting/virtual_machine_detail.html" template_name = "hosting/virtual_machine_detail.html"
login_url = reverse_lazy('hosting:login') login_url = reverse_lazy('hosting:login')
model = VirtualMachinePlan model = VirtualMachinePlan

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

View file

@ -1,3 +1,4 @@
from django.contrib import admin from django.contrib import admin
from .models import CustomUser
# Register your models here. admin.site.register(CustomUser)

View file

Before

Width:  |  Height:  |  Size: 473 KiB

After

Width:  |  Height:  |  Size: 473 KiB

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

342
opens
View file

@ -1,342 +0,0 @@
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 3
open("/usr/bin/pyvenv.cfg", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/pyvenv.cfg", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/codecs.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/encodings/__pycache__/aliases.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/encodings/__pycache__/ascii.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/encodings/__pycache__/utf_8.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/encodings/__pycache__/latin_1.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/io.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/abc.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/_weakrefset.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/site.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/os.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/stat.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/posixpath.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/genericpath.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/_collections_abc.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/_sitebuiltins.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/re.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/sre_compile.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/sre_parse.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/sre_constants.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/copyreg.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/pyvenv.cfg", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/_bootlocale.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/easy-install.pth", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/sysconfig.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/_sysconfigdata.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/__pycache__/_sysconfigdata_m.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/easy-install.pth", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/sitecustomize.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("manage.py", O_RDONLY) = 3
open("manage.py", O_RDONLY) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/collections/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/operator.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/keyword.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/heapq.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/reprlib.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/importlib/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/types.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/warnings.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/optparse.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/textwrap.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/gettext.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/locale.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/functools.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/weakref.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/copy.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/struct.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/apps/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/apps/__pycache__/config.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/__pycache__/exceptions.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/six.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/__future__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/encoding.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/datetime.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/decimal.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/numbers.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/threading.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/traceback.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/linecache.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/tokenize.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/token.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/lib-dynload/_decimal.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/x86_64-linux-gnu/libmpdec.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/functional.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/deprecation.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/inspect.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/ast.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/importlib/__pycache__/machinery.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/dis.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/opcode.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/urllib/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/urllib/__pycache__/parse.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/module_loading.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/imp.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/importlib/__pycache__/util.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/contextlib.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/_os.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/tempfile.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/shutil.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/fnmatch.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/tarfile.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/bz2.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/lib-dynload/_bz2.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libbz2.so.1.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/random.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/__pycache__/hashlib.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/lib-dynload/_hashlib.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 3
open("/home/app/pyvenv/lib/python3.4/site-packages/django/apps/__pycache__/registry.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/lru_cache.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/conf/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/conf/__pycache__/global_settings.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__pycache__/base.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/__pycache__/messages.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/__pycache__/registry.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/itercompat.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/compatibility/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/compatibility/__pycache__/django_1_6_0.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/compatibility/__pycache__/django_1_7_0.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/checks/__pycache__/model_checks.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__pycache__/color.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/termcolors.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/version.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/subprocess.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/selectors.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/app/dynamicweb/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/app/dynamicweb/settings/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/commands/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/commands/__pycache__/migrate.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__pycache__/sql.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/__pycache__/signals.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/dispatch/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/dispatch/__pycache__/dispatcher.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/__pycache__/utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/pkgutil.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/query.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/__pycache__/transaction.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/decorators.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/constants.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/base64.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/lookups.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/timezone.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/pytz/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/__pycache__/pkg_resources.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/zipfile.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/lzma.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/lib-dynload/_lzma.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 4
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
open("/lib/x86_64-linux-gnu/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/symbol.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/platform.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/plistlib.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/enum.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/xml/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/xml/parsers/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/xml/parsers/__pycache__/expat.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/parser.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/feedparser.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/errors.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/message.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/uu.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/quopri.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/socket.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/_parseaddr.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/calendar.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/charset.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/base64mime.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/quoprimime.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/string.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/encoders.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/_policybase.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/header.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/_encoded_words.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/email/__pycache__/iterators.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/lib-dynload/parser.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/pytz/__pycache__/exceptions.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/pytz/__pycache__/lazy.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/pytz/__pycache__/tzinfo.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/bisect.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/pytz/__pycache__/tzfile.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/query_utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/backends/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/backends/__pycache__/signals.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/backends/__pycache__/utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/logging/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/tree.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/fields.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/__pycache__/validators.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/deconstruct.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/translation/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/ipv6.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/json/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/json/__pycache__/decoder.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/json/__pycache__/scanner.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/lib-dynload/_json.cpython-34m-x86_64-linux-gnu.so", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/json/__pycache__/encoder.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/html.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/safestring.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/text.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/gzip.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/html/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/html/__pycache__/entities.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/html_parser.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/html/__pycache__/parser.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/_markupbase.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/widgets.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/datastructures.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/formats.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/dateformat.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/dates.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/numberformat.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/datetime_safe.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/forms.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/formsets.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/forms/__pycache__/models.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/dateparse.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/deletion.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/signals.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/datastructures.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/subqueries.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/constants.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/query.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/aggregates.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/expressions.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/related.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/aggregates.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/expressions.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/sql/__pycache__/where.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/manager.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/base.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__pycache__/related.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/__pycache__/options.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__pycache__/proxy.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__pycache__/subclassing.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__pycache__/files.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/base.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/utils.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/storage.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/locks.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/move.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/utils/__pycache__/crypto.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/__pycache__/hmac.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/files/__pycache__/images.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/migration.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/operations/__pycache__/__init__.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/operations/__pycache__/models.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/state.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/operations/__pycache__/base.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/operations/__pycache__/fields.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/operations/__pycache__/special.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/executor.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/loader.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/__pycache__/recorder.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4
open("manage.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/python3.4/importlib/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/app/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/django-select2/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/src/circus-master/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/plat-x86_64-linux-gnu/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/python3.4/lib-dynload/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/<frozen importlib._bootstrap>", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/app/pyvenv/lib/python3.4/site-packages/django/core/management/commands/migrate.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/executor.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/loader.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/recorder.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/recorder.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/migrations/recorder.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/db/models/fields/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/conf/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/conf/__init__.py", O_RDONLY|O_CLOEXEC) = 4
open("/home/app/pyvenv/lib/python3.4/site-packages/django/conf/__init__.py", O_RDONLY|O_CLOEXEC) = 4
+++ exited with 1 +++

View file

@ -16,6 +16,7 @@ psycopg2
django-mptt django-mptt
easy_thumbnails easy_thumbnails
django-polymorphic django-polymorphic
model-mommy
#PLUGINS #PLUGINS
djangocms_flash djangocms_flash

View file

@ -33,7 +33,7 @@ class PostListViewUngleich(PostListView):
def get_queryset(self): def get_queryset(self):
language = get_language() language = get_language()
queryset = self.model.objects.translated(language) queryset = self.model.objects.filter(publish=True).translated(language)
setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config) setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config)
return queryset return queryset

View file

@ -1,5 +1,5 @@
from django.test import TestCase from django.test import TestCase
from .forms import ContactUsForm from .forms import ContactUsForm, BillingAddressForm
class ContactUsFormTest(TestCase): class ContactUsFormTest(TestCase):
@ -23,3 +23,27 @@ class ContactUsFormTest(TestCase):
def test_invalid_form(self): def test_invalid_form(self):
form = ContactUsForm(data=self.incompleted_data) form = ContactUsForm(data=self.incompleted_data)
self.assertFalse(form.is_valid()) self.assertFalse(form.is_valid())
class BillingAddressFormTest(TestCase):
def setUp(self):
self.completed_data = {
'street_address': 'street name',
'city': 'MyCity',
'postal_code': '32123123123123',
'country': 'VE',
'token': 'a23kfmslwxhkwis'
}
self.incompleted_data = {
'street_address': 'test',
}
def test_valid_form(self):
form = BillingAddressForm(data=self.completed_data)
self.assertTrue(form.is_valid())
def test_invalid_form(self):
form = BillingAddressForm(data=self.incompleted_data)
self.assertFalse(form.is_valid())

View file

@ -1,3 +1,66 @@
from django.test import TestCase from django.test import TestCase
from django.test import Client
from model_mommy import mommy
# Create your tests here.
class BaseTestCase(TestCase):
"""
Base class to initialize the test cases
"""
def setUp(self):
# Password
self.dummy_password = 'test_password'
# Users
self.customer, self.another_customer = mommy.make('membership.CustomUser',
_quantity=2)
self.customer.set_password(self.dummy_password)
self.customer.save()
self.another_customer.set_password(self.dummy_password)
self.another_customer.save()
# Stripe mocked data
self.stripe_mocked_customer = self.customer_stripe_mocked_data()
# Clients
self.customer_client = self.get_client(self.customer)
self.another_customer_client = self.get_client(self.another_customer)
def get_client(self, user):
"""
Authenticate a user and return the client
"""
client = Client()
client.login(email=user.email, password=self.dummy_password)
return client
def customer_stripe_mocked_data(self):
return {
"id": "cus_8R1y9UWaIIjZqr",
"object": "customer",
"currency": "usd",
"default_source": "card_18A9up2eZvKYlo2Cq2RJMGeF",
"email": "vmedixtodd+1@gmail.com",
"livemode": False,
"metadata": {
},
"shipping": None,
"sources": {
"object": "list",
"data": [{
"id": "card_18A9up2eZvKYlo2Cq2RJMGeF",
"object": "card",
"brand": "Visa",
"country": "US",
"customer": "cus_8R1y9UWaIIjZqr",
"cvc_check": "pass",
"dynamic_last4": None,
"exp_month": 12,
"exp_year": 2018,
"funding": "credit",
"last4": "4242",
}]
}
}