Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How to fetch matched pattern from a file and insert into a Database in django?
I have a scenario for which I need to develop a Web API through Django RESTFrameWork. 1) We have a multiple linux machines on which a log file is generated as soon as there is some change in hash value of a license file . The log file generation and the license file monitoring has been automated through Python script on the servers itself. So far so good. 2) Now, I need develop an API that will read the matching pattern from the log file, and push it to the DB. 3) I also need to develop a dashboard where we can pull data on Daily, Weekly, monthly, and Yearly basis and show graph. So far, I could do some testing with the Python RegEx to catch the matching pattern and its fine. But the problem is how to use DRF to pull those matching pattern directly from the log file and insert into the DB each time the patter is generated in real time? I have been brainstorming for 3 days now, but reached nowhere. Note: There is a log rotation happening I believe every 24 hours, and the log files are kept only for seven days. Prior to β¦ -
How to implement a SplitDateTImeWidget for a DateTimeField
I am subclassing a ModelForm and changing the default widget for the DateTimeField: class CustomModelForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(CustomModelForm, self).__init__(*args, **kwargs) for field_name in self.fields: field = self.fields[field_name] if isinstance(field, formfields.DateTimeField): field.widget = SplitDateTimeWidget() class Meta: model = MyModel fields = fields = '__all__' The View is very simle: class CustomCreateView(LoginRequiredMixin, CreateView): template_name = 'mytemplate.html' def get_form_class(self): form_class = CustomModelForm return form_class However, this results in the following error when the form is processed: AttributeError at /lists/event/create 'list' object has no attribute 'strip' I know it's related to the SplitDateTimeWidget() but can't figure out why. If I apply the widget the standard way on a 1-1 basis with named fields via Meta, I still get this error. Where should I start looking to debug? -
How to work with JWT with Django and Redux
So I've recently learned about JWT authentication using Django Rest Framework and now, I would like to use it. Setting things up with DRF was easy, but now I'm facing a problem : I have no idea how to consume the given tokens ( access and refresh ) with redux. I also have no idea how to retrieve a user based on the given tokens. Here is what I have for the moment. My actions : import axios from 'axios'; import { LOGIN_STARTED, LOGIN_SUCCESS, LOGIN_FAILURE, } from './types.js'; const loginStarted = () => ({ type: LOGIN_STARTED, }) const loginFailure = error => ({ type: LOGIN_FAILURE, payload: { error: error } }) const loginSuccess = (access_token, refresh_token) => ({ type: LOGIN_SUCCESS, payload: { access_token: access_token, refresh_token : refresh_token } }) export const authLogin = (username, password) => dispatch => { dispatch(loginStarted); axios.post("http://127.0.0.1:8000/api/token/", { username: username, password: password }) .then( res => { console.log(res.data); dispatch(loginSuccess(res.data)) }) .catch( err => { console.log(err); dispatch(loginFailure(err.data)); }) } And my reducer looks like this : import { LOGIN_STARTED, LOGIN_SUCCESS, LOGIN_FAILURE, } from '../actions/types.js'; const initialstate = { access: undefined, refresh: undefined, error: {} } export default function(state=initialstate, action){ switch (action.type) { case LOGIN_SUCCESS: return { ...state, β¦ -
Import json within mongodb collection?
I'd like to import a .json file in a MongoDB collection as a field, where the imported data can essentially work as a subdocument with the field label. Is this possible? I'm using Django for my web framework and file uploads. Right now the data model looks like this in Django: class Trip(models.Model): name = models.CharField(max_length = 120) file = models.FileField(upload_to = 'trips/files/', null = True, blank = True) I would like the "file" field to be a .json import that reads subfields into the document; in Mongo the data model would look like this for example: { "_id": { "$oid": "5e18e9b0593b827d141e9c6d" }, "name": "f" "file": { "field1": "asdf" "field2": 1234 "field3": { "fieldA": "3" "fieldB": "876" } } } where the fields under "file" are in the .json file that is imported. Obviously the real json would be more sophisticated but this is just a simple example. If this is possible please let me know, being able to import these .jsons and have them handled correctly within Mongo is all I need to be able to get what I need running to work. Thanks! -
Hit Count/Page View Functionality Django App
The question has been asked, and most suggest using django-hitcount. https://pypi.org/project/django-hitcount/ I tried that solution. But that solution is for python 2 use. Not python 3 use. Trying that solution I ran into the error described in this post: Django Hit Count ImportError So I am trying to create this functionality. I have an auction item model. I am persisting viewCount among other fields: models.py from django.db import models from django.contrib.auth.models import User from PIL import Image from django.utils import timezone class AuctionItem(models.Model): seller = models.ForeignKey(User, on_delete=models.CASCADE) image = models.ImageField(default='default.jpg', upload_to='auction_items') title = models.CharField(max_length=100) description = models.TextField() startBid = models.FloatField() buyNowPrice = models.FloatField() buyNowEnabled = models.BooleanField() deliveryCost = models.FloatField() startDate = models.DateTimeField(default=timezone.now) endDate = models.DateTimeField(default=timezone.now) viewCount=models.IntegerField(default=0) def __str__(self): return self.title def save(self): super().save() img = Image.open(self.image.path) if img.height > 300 or img.width > 300: output_size = (300, 300) img.thumbnail(output_size) img.save(self.image.path) def getCurrentTopBid(): return startBid def incrementViewCount(self): self.viewCount += 1 self.save() I have a class based view class AuctionItemDetailView(DetailView) for the auction item detail view, and in it I am trying to increment the viewCount in the model by calling incrementViewCount() views.py from django.shortcuts import render, get_object_or_404 from django.contrib.auth.mixins import ( LoginRequiredMixin, UserPassesTestMixin ) from django.contrib.auth.models import User from django.views.generic import β¦ -
How to use django services in Docker?
They should be online all the time. My jango app has 5 external services working with it. The all are a part of the django app and put them in 5 different containers doesn't seem reasonable for me. How can I activate them after the startup? They all wait for SIGTERM to exit, so basically each one of them need a terminal or smth. Thank you. gunicorn -D --config ./gunicorn.conf.py core.wsgi:application python manage.py run_telegram python -u socketshark.py python -u manage.py run_binance python-u advisor.py and so on... -
Application error after deploying Django successfully
I'm trying to deloy my django website to Heroku but after deploying successfully via Gilab CI/CD I get an Application error Source for my django website: source My website URL webping-server My webpage image: -
facebook graph api post request error: Response 403 is printed in python
I am trying to make a facebook graph api post request for creating a post on my page with python but unfortunately the api is always generating an error and on the command line the Response 403 is printed fb_graph_url="https://graph.facebook.com/v5.0/"+page_id+"/feed/?message=Hello&access_token="+access_token api_request = requests.post(fb_graph_url) print(api_request) -
visiting 'localhost:8080/signin' gives me Error code: SSL_ERROR_RX_RECORD_TOO_LONG
have a google appengine project running in localhost. Everything works fine until i go to the 'login' page. When i go there i get the following error: Secure Connection Failed An error occurred during a connection to localhost:8080. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem. the appengine command i use to run the project is dev_appserver.py" --host 127.0.0.1 . This is run pycharm. This only occurs in the 'login' endpoint and no other endpoint. The console error i get is: default: "GET /signin HTTP/1.1" 301 - -
Bootstrap 4 Navbar Scrollsy ERRORs
I have a Django Landing page + few extra description pages. I store the navbar with bootstrap 4 scrollspy in the base.html file what points on IDs on the home.html. When I am on the home page it works like in the official bootstarp example. 1.ERROR But when I go to other pages it just puts this URL out "http://127.0.0.1:8000/home/services/#pricing" and stay under the "http://127.0.0.1:8000/home/services/" URL. I get a terminal ERROR message as well: Not Found: /docs/4.3/dist/js/bootstrap.bundle.min.js [13/Jan/2020 16:16:35] "GET /docs/4.3/dist/js/bootstrap.bundle.min.js HTTP/1.1" 404 2509 I have seen: Bootstrap scrollspy when accessing from another page but this is bootstrap 3 and Twitter Bootstrap Scrollspy not working at all and this one is some very old version of bootstrap (+6 years ago) 2.ERROR In the original example the navbar area where it send the user is highlighted. Mine not highlighted at all. 3. ERROR The navbar not stay on the top when I scroll or go to any of the navbar elements by clicking on them. If I implement any of the following than it covers the first few lines of the page. To keep the navbar above these lines I use <div class="godown-60" id="godown"></div> lien of code. I have tried class=" β¦ -
Generate CloudFront Signed URL in Django
I have linked a custom domain to my CloudFront distribution and restricted access to the bucket to allow only access to objects from the bucket through CloudFront only. I have set the custom domain in django-storages but the URL that is generated isn't signed and keep getting access denied every time I try accessing the uploaded objects. How do I create signed URL for my CloudFront distribution given that I have mapped it to a custom domain? I have added snippets of relevant code for context. settings.py if 'AWS_ACCESS_KEY_ID' in os.environ: STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'property233/static'), ] AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME'] AWS_S3_CUSTOM_DOMAIN = os.environ['AWS_S3_CUSTOM_DOMAIN'] # AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME AWS_S3_OBJECT_PARAMETERS = { 'CacheControl': 'max-age=86400', } AWS_STATIC_LOCATION = 'static' STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' STATIC_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, AWS_STATIC_LOCATION) DEFAULT_FILE_STORAGE = 'property.storage_backends.MediaStorage' PRIVATE_FILE_STORAGE = 'property.storage_backends.PrivateDocumentStorage' storage.py from storages.backends.s3boto3 import S3Boto3Storage class MediaStorage(S3Boto3Storage): location = 'media' file_overwrite = False class PrivateDocumentStorage(S3Boto3Storage): location = 'documents' default_acl = 'private' file_overwrite = False models.py class Landlord(models.Model): active = models.BooleanField(default=True) property_management_proposal = models.FileField(storage=PrivateDocumentStorage()) signed_agreement = models.FileField(storage=PrivateDocumentStorage(), ) owner_id = models.FileField(storage=PrivateDocumentStorage(), verbose_name='ID Card of property owner') property_deed = models.FileField(storage=PrivateDocumentStorage(), default='document.pdf') land_title_verification = models.FileField(storage=PrivateDocumentStorage()) facilities_checklist = models.FileField(storage=PrivateDocumentStorage()) video = models.URLField(default='https://youtube.com') class Meta: app_label β¦ -
Unpickle in Django-Tests: Same module for views and tests?
For testing and re-usage purposes I pickled some data-structures created during user-interaction within my views.py. Now, as I'm writing the tests for these objects I'm constantly encountering ModuleNotFoundErrors (No module named 'Network') and did a little research. According to Python pickling after changing a module's directory I'm pretty sure I've been theviolating any of the constraints: pickle can save and restore class instances transparently, however the class definition must be importable and live in the same module as when the object was stored I'm unable to figure out if my tests.py and the views.py are actually executed in the same module. I assume they are. Folder Structure: βββ PickleDjango β βββ admin.py β βββ apps.py β βββ forms.py β βββ functions.py β βββ __init__.py β βββ models.py β βββ tests.py β βββ urls.py β βββ views.py βββ unittests.py unittests.py from the root directory executes the tests.py by simply loading it with: suite.addTest(loader.loadTestsFromModule(PickleDjango.tests)) inside tests.py the error occurs in the following line: orig_obj = pickle.load(infile) I assume here might be the critical point as the tests.py is in a sub-module. But it should work when the tests are started from the same module as views.py. Just from where is the views.py β¦ -
Online Web-based Multiplayer Game in Python
I, as the title suggests, would like to develop an online multiplayer web-based game in python. It would be a turn based game where several players can join and play in real time. Then on each turn they would submit their decisions (for instance: "Do you invest in this asset?" Answers: "Yes" or "No"). After some time answers from all players would be processed and a summary statistics would be shown to all of them. At this point, how hard would it be to show unique results to each player - based on their individual decisions? I have some experience with python scripting but I have never looked into web-based applications. Could you estimate how difficult would be to set something like this up? What would be the best way to approach this? Flask, Django, Tornado? Thanks for all suggestions! -
Could not convert string to float: C
Recently I have been working on a code and got stuck for days on this error. Basically the program takes a students HTML Transcript and converts it into a table created using DJANGO. The program used to work with no problems but after recent school changes in the HTML Transcript file for students it keeps shooting out a error Exception Value: "Could not convert string to float:C ExceptionLocation C:\Users\CMPS\Desktop\AdvisementSystem\program\src\myproject\myproject\myapp\extractData.py in splitTR, line 14 The course numbers for all Courses switched for example CMPS190 has changed to CMPS190B and ENG201 is now ENG201B how can I tweak the code to read that "B" in with the course number ? Code is below from bs4 import BeautifulSoup from CourseGrade import * def splitTr(tr, grade): grade.department = tr.find_all('td')[0].text.lstrip() grade.course_num = tr.find_all('td')[1].text if tr.find_all('td')[2].text == "UG" or tr.find_all('td')[2].text == "GR": grade.course_title = tr.find_all('td')[3].text grade.grade = tr.find_all('td')[4].text.lstrip() grade.creditHour = int(float(tr.find_all('td')[5].text.lstrip())) else : grade.course_title = tr.find_all('td')[2].text grade.grade = tr.find_all('td')[3].text.lstrip() grade.creditHour = int(float(tr.find_all('td')[4].text.lstrip())) def getDataList(student, fileName="Academic Transcript.html"): file = open(fileName,'r') soup = BeautifulSoup(file,"html.parser") studentName = soup.find("a", {"name":"Student Address"}) if studentName != None: student.name = studentName.contents[0] else: studentName = soup.find("div","staticheaders").contents[0] student.name = studentName.split()[1]+ " " + studentName.split()[2] print(soup.find('td',attrs={'class':'dddefault','colspan':6}).contents[0]) table = soup.find('table',attrs={'class':'datadisplaytable'}) # print(table) # table_body = table.findAll('tbody') # β¦ -
Django urls and filtering , the right way to achieve this
I have a web app to search for cars. On the landing page, I can either enter a keyword and search or go to a link that displays all the data with filters. So my URLs, url(r'^cars/$', search, name='search'), ==> does an elastic search url(r'^select/', select, name='select'),==> has links to filter results and pass query set When I enter a keyword (say Audi) and search, the URL becomes localhost:8000/cars/?search=Audi and if I click on the link it simply says localhost:8000/select/ Both of these views(search and select) render the same template. Now, I want to filter the results or add more criteria. What should be the right approach to do this? One of the websites where I got inspired for doing this project simply redirects to /cars?search=Audi and on clicking any link to filter redirects to /cars/Audi/BMW/Sedan Is this possible in Django? Here is the select view code. I am still learning Django and python, so, please bear with me. def select(request): q1 = request.GET.get('brand') q2 = request.GET.get('model') q3 = request.GET.get('bodyStyle') q4 = request.GET.get('budget[]') q5 = request.GET.get('transmission') page = request.GET.get('page', 1) print(q1) s1 = request.POST.get('sortBy') budarray = request.GET.getlist('budget') brandarray = request.GET.getlist('brand') modelarray = request.GET.getlist('model') bodyarray = request.GET.getlist('bodyStyle') transmissionarray = request.GET.getlist('transmission') cars β¦ -
TypeError: memoryview: a bytes-like object is required, not 'bool' in django for migrate
enter code here#in model in models app in django i after add is_favorite after makemigrate and after migrate i see this exception TypeError: memoryview: a bytes-like object is required, not 'bool' code here` album = models.ForeignKey(Album, on_delete=models.CASCADE) file_type = models.CharField(max_length=10) song_title = models.CharField(max_length=250) is_favorite = models.BooleanField(default=False) class in models app and me add is_favorite variable but after makemigration I wana migrate i'm see this exception`enter code here -
active state display only in django template ForeignKey
I have country state city model and here is my view class Country(models.Model): name = models.CharField(max_length = 100) def __str__(self): return "%s" %(self.name) class State(models.Model): name = models.CharField(max_length = 100) country = models.ForeignKey(Country, on_delete = models.CASCADE) is_active = models.BooleanField(default = True) def __str__(self): return "%s" %(self.name) class City(models.Model): name = models.CharField(max_length = 100) state = models.ForeignKey(State, on_delete = models.CASCADE) is_active = models.BooleanField(default = True) def __str__(self): return "%s" %(self.name) here is my view class CountryList(ListView): def get_template_names(self, *args, **kwargs): return ['albums/list.html'] def get_queryset(self, *args, **kwargs): return Country.objects.all() now i want to show country with active state and active cities only how can do this in my template ? -
unable to import django
the error that is happening I have installed the django version 3.0.2 all running but idk what could be the problem -
How to associate model with current user while saving in django
I'm new to django so sorry for this simple question. I'm building web app using django. and i want to save current logged in user while he/she create any new object automatically. I want to implement this features in custom admin panel. class Post(models.Model): user = models.ForeginKey(...) ............. So here i want to fill user field automatically. -
Django Hit Count ImportError
I am trying to use the django hitcount, and I am following the only tutorial out there for it https://django-hitcount.readthedocs.io/en/latest/installation.html, and I am getting stuck on step 2--adding hitcount to the list of installed apps. When I do that, and try and run the server, I get the following error: ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' settings.py INSTALLED_APPS = [ 'hitcount', 'auctionitem.apps.AuctionitemConfig', 'blog.apps.BlogConfig', 'users.apps.UsersConfig', 'crispy_forms', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] Why! -
Should I handle order number using the model's ID?
I've an personal ecommerce site. I'm using the ID of the model as the Order Number. Just because it seemed logic, and I was expecting ID would increment just by 1 everytime. However, I'm noticing that the ID of my Orders (of my Order model) had jumped twice: a) From 54 to 86 (32 of difference). b) From 99 to 132 (33 of difference). Don't know why, don't know if I should use a custom field instead of the models ID. I'm using Django 3.0 and hosting my project on Heroku. models.py: class Order(models.Model): ORDER_STATUS = ( ('recibido_pagado', 'Recibido y pagado'), ('recibido_no_pagado', 'Recibido pero no pagado'), ('en_proceso', 'En proceso'), ('en_camino', 'En camino'), ('entregado', 'Entregado'), ('cancelado', 'Cancelado por no pagar' ) ) token = models.CharField(max_length=100, blank=True, null=True) first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) phone_number = models.CharField(max_length=30, blank=True) total = models.DecimalField(max_digits=10, decimal_places=2) stickers_price = models.DecimalField(max_digits=10, decimal_places=2) discount = models.DecimalField(max_digits=10, decimal_places=2, default=Decimal('0.00')) shipping_cost = models.DecimalField(max_digits=10, decimal_places=2) email = models.EmailField(max_length=250, blank = True, verbose_name= 'Correo electrΓ³nico') last_four = models.CharField(max_length=100, blank=True, null=True) created = models.DateTimeField(auto_now_add=True) shipping_address = models.CharField(max_length=100, blank=True, null=True) shipping_address1 = models.CharField(max_length=100, blank=True, null=True) reference = models.CharField(max_length=100, blank=True, null=True) shipping_department = models.CharField(max_length=100, blank=True, null=True) shipping_province = models.CharField(max_length=100, blank=True, null=True) shipping_district β¦ -
How to write correctly inline django-tag in hamlpy?
How can I write inline tag in hamlpy? For example this case: <link rel="stylesheet" href="{% static 'profile_list_2.css' %}"> I know I can make it in Django style, and its will work: %link(src="{% static 'ajax.js %}'") But it seems to me as no hamlpy-style. I suppose there is way to make it more laconically by haml style code. I tried: %link(src="-static 'ajax.js'") %link(src="|% static 'ajax.js'") But its not works. How can I do it more succinctly? -
Inner join on Django with where clause?
I'm trying to filter out a ModelForm to only display dropdown values tied to a specific user. I've got three tabled tied together: User, Project, ProjectUser. One user can have many projects, and one projects can have many users, and the table ProjectUser is just a joined table between User and Project, e.g id | project_id | user_id 1 5 1 2 6 2 3 6 1 How would I write the following inner join query in Django ORM? SELECT name FROM projectuser INNER JOIN project ON projectuser.project_id = project.id WHERE user_id = <request.user here> -
NoReverseMatch with arguments not found
I am trying to put an email id into my django url but I am getting no reverse match. The email ids are unique. Below are some of my code. Any help is appreciated. Thank you. models.py class IncomingMail(models.Model): incomingmailid = models.CharField(primary_key=True, max_length=255) conversationid = models.CharField(max_length=255) sender = models.EmailField(null=True) subject = models.TextField(null=True) datetime = models.DateTimeField(null=True) def get_absolute_url(self): return reverse('mailwithid', kwargs={'id': self.incomingmailid}) urls.py urlpatterns = [ path('', views.mail, name='mail'), path('id/<id>/', views.mail, name='mailwithid') ] views.py def mail(request, id=None): if id: allincomingmail = IncomingMail.objects.get(incomingmailid=id) else: allincomingmail = IncomingMail.objects.all() context = { 'allincomingmail': allincomingmail } return render(request, 'mail/mail.html', context) mail.html {% for message in allincomingmail %} <a href="{% url 'mailwithid' message.incomingmailid %}" class="list-group-item list-group-item-action email-list" aria-control="email-info" name="incominglist"> <div class="d-flex justify-content-between"> <small id="show-address">{{ message.sender }}</small> </div> <p class="mb-1" id="show-subject">{{ message.subject }}</p> <small id = "show-datetime">{{ message.datetime }}</small> </a> {% endfor %} This is how I saved my model if it helps for mail in self.inbox: saveinbox = IncomingMail( conversationid=mail.conversation_id.id, sender=mail.sender.email_address, subject=mail.subject, datetime=mail.datetime_received + timedelta(hours=8), incomingmailid=mail.id ) saveinbox.save() -
How to fix the error that occurs when upgrading django 1.10 to 1.11?
After upgrading django from 1.10 to 1.11, I can't use the manage.py command. There are so many errors that I do not even know where to start and where to look for the cause of errors. I will be grateful for any help. I paste all errors below. File "SAGI-B/manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute django.setup() File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models() File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/filer/models/__init__.py", line 3, in <module> from .clipboardmodels import * # flake8: noqa File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/filer/models/clipboardmodels.py", line 9, in <module> from . import filemodels File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/filer/models/filemodels.py", line 18, in <module> from ..fields.multistorage_file import MultiStorageFileField File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/filer/fields/multistorage_file.py", line 12, in <module> from easy_thumbnails import fields as easy_thumbnails_fields File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/fields.py", line 2, in <module> from easy_thumbnails import files File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/files.py", line 14, in <module> from easy_thumbnails import engine, exceptions, models, utils, signals, storage File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/engine.py", line 12, in <module> from easy_thumbnails import utils File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/utils.py", line 15, in <module> from easy_thumbnails.conf import settings File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/conf.py", line 334, in <module> settings = Settings() File "/home/marcin/.vens/sagi/local/lib/python2.7/site-packages/easy_thumbnails/conf.py", β¦