Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How to ajaxable validate a PasswordChangeForm?
I have some forms that I want to validate with an ajax view. class ProfileEditPasswordForm(PasswordChangeForm): class Meta: model = User class AjaxValidation(generic.edit.FormView): def get(self, request, *args, **kwargs): return HttpResponseRedirect('/') def form_invalid(self, form): data = [] for k, v in form._errors.iteritems(): text = { 'desc': ', '.join(v), } if k == '__all__': text['key'] = '#%s' % self.request.POST.get('form') else: text['key'] = '#id_%s' % k data.append(text) return HttpResponse(json.dumps(data)) def form_valid(self, form): return HttpResponse("ok") def get_form_class(self): form_dict = { 'signup': forms.RegisterForm, 'signin': forms.LoginForm, 'safety': forms.ProfileEditPasswordForm } return form_dict[self.request.POST.get('form')] #=> TypeError As you can see, I have 3 different forms. First two work just fine. But the third one returns me an error. __init__() takes at least 2 arguments (1 given) I believe that it happens because my form requires a user to validate his old password, so I did this: 'safety': forms.ProfileEditPasswordForm(user=self.request.user) And know it throws another error: 'ProfileEditPasswordForm' object is not callable And here I stuck. -
How to avoid typos in django's permission strings
According to the docs custom permissions can be created and used like this: class Task(models.Model): ... class Meta: permissions = ( ("view_task", "Can see available tasks"), ) Using the permission: user.has_perm('app.view_task') Source: https://docs.djangoproject.com/en/1.10/topics/auth/customizing/#custom-permissions If there is a typo in the permission string. For example: I use user.has_perm('app.view_tasks'), then this typo won't be noticed. Goal 1 I would like to get an exception or warning if not existing permissions get used. Goal 2 To avoid typos in the first place, I would like to have constants: user.PERM_APP_VIEW_TASKS or something like this. -
How To Add Arabic Text In Django
all. I have a problem.. how to include the Arabic-language text in the textarea to be added, edited and deleted from model Django ? might look like this: Form Multilanguage I work in Django 1.8.6 and Python 2.7 In Windows 10. Thank you very much... -
Using external variables in Javascript
In my views.py I had things like that: ... if mymodel.name=='Myname1': #do something elif mymodel.name=='Myname2': #do something else ... but I didn't like it because if Myname change I should search all my code to correct it, so I create a file where I keep all this words: hardcoded_words.py: myname1='Myname1' myname1='Myname2' myname1='Myname3' ... and my views.py become: from myapp import hardcoded_words ... if mymodel.name==hardcoded_words.myname1: #do something elif mymodel.name==hardcoded_words.myname2: #do something else ... If Myname1 changes I need to correct just one file: hardcoded_words.py: ... myname1='Myname1_b' ... Maybe there's some better way (fell free to tell) but the problem is with Javascript. There's a way to do something like that? My javascript.js: function myfunction1(myvariable1, myvariable2) { switch (myvariable1) { case 'Myname1': //do something break; case 'Myname2': //do something else break; ... Thank you for your help -
Extending the existing User model: my added field doesn't appear in the admin
Django 1.10.1 I'm trying to extend the existing user model. That is I need to store patronymic name. The documentation: https://docs.djangoproject.com/en/1.10/topics/auth/customizing/#extending-the-existing-user-model The problem is that patronymic name doesn't appear in the admin. Could you help me here? class CustomUser(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) patronymic = models.CharField(max_length=100) admin.py class CustomUserInline(admin.StackedInline): model = CustomUser can_delete = False class UserAdmin(BaseUserAdmin): inlines = (CustomUserInline, ) admin.site.unregister(User) admin.site.register(User, UserAdmin) -
Django error dictionary update sequence element #0
i added text decorator login required but i got this problem(dictionary update sequence element #0 has length 0; 2 is required ). any solutions? @login_required def BoxItems(request): return {'NumberOfItems': CartItem.objects.filter( is_active=True, is_deleted=False, item__seller=request.user.userprofile.company, )} -
How to import particular file __main__?
I have the two files in different location. C:\project\drive\drive.py In this file have the code __import__('__main__') C:\project\test_drive.py In this file also have the main class,when ever am i calling time this class modules are coming. Need Solution:I need to call drive.py file _import__('_main__') in test_drive.py. -
django.utils.timezone.now returns UTC in default TimeField
I try to prepopulate a TimeField in django_admin with the following code : from django.utils import timezone time_start = models.TimeField('Heure de debut',max_length=20, default=timezone.now) I've installed pytz and also correctly set TIME_ZONE = 'Europe/Brussels' USE_TZ = True and the "now" button in admin correctly sets the time if I click on it. However, it initialy shows the time in UTC (two hours before the actual time in my case) Am I missing something and is there a way to solve this ? I don't want to use auto_now_add=False because I want to be able to change this time later... -
What is the Django way of setting Browser side cookies?
I have tried it using render_to_response. What I did was store my HTTPResponse in a variable using render_to_response and then used the set_cookie method on it. But Django documentation says that render_to_response will be deprecated in the future versions. So I need the best way to set Browser side cookies! -
My django project settings not recognized by wsgi
I know this question has been answered many times, but I really can't get this done. Here is my error: Traceback (most recent call last): File "my_project/project/wsgi.py", line 35, in <module> application = get_wsgi_application() File "/var/www/html/accounts.ai-labs.co/local/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup(set_prefix=False) File "/var/www/html/accounts.ai-labs.co/local/lib/python2.7/site-packages/django/__init__.py", line 22, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/var/www/html/accounts.ai-labs.co/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__ self._setup(name) File "/var/www/html/accounts.ai-labs.co/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup self._wrapped = Settings(settings_module) File "/var/www/html/accounts.ai-labs.co/local/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named project.settings Here is my file tree: example.com βββ bin β βββ activate β βββ activate.csh β βββ activate.fish β βββ activate_this.py β βββ django-admin β βββ django-admin.py β βββ django-admin.pyc β βββ easy_install β βββ easy_install-2.7 β βββ pip β βββ pip2 β βββ pip2.7 β βββ python β βββ python2 -> python β βββ python2.7 -> python β βββ python-config β βββ wheel βββ include β βββ python2.7 -> /usr/include/python2.7 βββ __init__.py βββ lib β βββ python2.7 β βββ _abcoll.py -> /usr/lib/python2.7/_abcoll.py β βββ _abcoll.pyc β βββ abc.py -> /usr/lib/python2.7/abc.py β βββ abc.pyc β βββ codecs.py -> /usr/lib/python2.7/codecs.py β βββ codecs.pyc β βββ copy_reg.py -> /usr/lib/python2.7/copy_reg.py β βββ copy_reg.pyc β βββ distutils β β β¦ -
Django admin panel permissions: preventing user group from adding more users
I want to restrict my worker users' admin panel - don't want them to create users or delete certain types of models, for instance. Here's some code in models.py that sets up my custom user, and the post_save signal to add users. Note that I set default_permissions = () so that users don't start with any permissions, but then I grant them the permissions of the group with name=workers which does NOT include myapp.myuser_add, thus they shouldn't be able to add more users when logged into admin console. # models.py from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser, PermissionsMixin, Group ) from django.db.models.signals import post_save from django.dispatch import receiver @receiver(post_save, sender=settings.AUTH_USER_MODEL) def apply_worker_group(sender, instance=None, created=False, **kwargs): if instance.is_worker: try: worker_group = Group.objects.get(name='workers') if instance not in worker_group.user_set.all(): instance.groups.add(worker_group) instance.save() except Group.DoesNotExist: pass class MyUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField( verbose_name='email address', max_length=255, unique=True,) is_active = models.BooleanField(default=True) is_admin = models.BooleanField(default=False) is_worker = models.BooleanField(default=False) # ... skipping a bunch of stuff class Meta: default_permissions = () # (!) ALL USERS HAVE NO PERMS TO START @property def is_staff(self): # so workers can log into the admin panel return self.is_admin or self.is_worker Then in my admin.py: # admin.py from django.contrib.auth.admin import UserAdmin β¦ -
Django Integrity Error in Bulk Import via CSV in Admin
I am trying to implement a CSV Import in Django Admin and save bulk data corresponding to the CSV file's rows. I have a model Employee with a OneToOneField to Django's Auth model. I have written a custom Form that accepts a csv file. However, when I call the super().save() method, I get an Integrity Error. My Model class is: class Employee(models.Model): user = models.OneToOneField(User, primary_key=True) company = models.ForeignKey(Companies) department = models.ForeignKey(Departments) mobile = models.CharField(max_length=16, default="0", blank=True) gender = models.CharField(max_length=1, default="m", choices=GENDERS) image = models.ImageField(upload_to=getImageUploadPath, null=True, blank=True) designation = models.CharField(max_length=64) is_hod = models.BooleanField(default=False) is_director = models.BooleanField(default=False) This is my Admin class: class EmployeeAdmin(admin.ModelAdmin): list_display = ('user', 'company', 'department', 'designation', 'is_hod', 'is_director') search_fields = ['user__email', 'user__first_name', 'user__last_name'] form = EmployeeForm This is my Form class: class EmployeeForm(forms.ModelForm): company = forms.ModelChoiceField(queryset=Companies.objects.all()) file_to_import = forms.FileField() class Meta: model = Employee fields = ("company", "file_to_import") def save(self, commit=True, *args, **kwargs): try: company = self.cleaned_data['company'] records = csv.reader(self.cleaned_data['file_to_import']) for line in records: # Get CSV Data. # Create new employee. employee = CreateEmployee(email, firstName, lastName, gender, '', company.id, dept[0].id, designation, isSuperuser, isHod, isDirector) super(EmployeeForm, self).save(*args, **kwargs) except Exception as e: traceback.print_exc() raise forms.ValidationError('Something went wrong.') The CreateEmployee method is defined as: @transaction.atomic def CreateEmployee(email='', firstName='', β¦ -
django-if template doesnt work properly
i have a list of stations and i have to display stations from 'start'. start contains station id. I am trying in this way but when i run all i get is a blank page. <table> <tr> {% for st in st_list %} {% if st.station_id >= start %} <td> {{ st.station_id }} </td> {% endif %} {% endfor %} </tr> </table> nothing works inside if except conditions like {% if start %}. i know i am missing something trivial. Please help me figure it out. i am using django 1.6. -
How can i import and hook my Middleware to myapp in django
I'm working on a pet project on django1.10 expermenting with channels. I have a Middleware and i want to import and hook it into myapp.I want the 'ip', 'user_agent' ,'session_key' parameters from the middleware to hook to my channel/sessions.py. As i'm still grasping python and django, i appreciate any help on how to hook my middleware class SessionMiddleware to my channels/sessions.py. The relevant code for the middleware is: class SessionMiddleware(MiddlewareMixin): """ Middleware that provides ip and user_agent to the session store. """ def process_request(self, request): engine = import_module(settings.SESSION_ENGINE) session_key = request.COOKIES.get(settings.SESSION_COOKIE_NAME, None) request.session = engine.SessionStore( ip=request.META.get('REMOTE_ADDR', ''), user_agent=request.META.get('HTTP_USER_AGENT', ''), session_key=session_key ) The question may be trivial, needing understanding of basic python class/function import.I was able to import the module and class SessionMiddleware;I tried to define 'ip','user_agent',and 'session_key' as global variables in the channels/sessions.py(probably missing something because i get an error): NameError:name 'user_agent' is not defined. ` when i try to assign in channels/sessions.py: session =session_engine.SessionStore(session_key=session_key,user_agent=user_agent,ip=ip) I am having difficulty in understanding the following: 1. What is the pythonic way to call 'ip','user_agent' and 'session_key' parameters to my channels/sessions.py. 2. How can i make these parameters to have a global scope in channels/sessions.py. -
Django:Is it possible to send one form to other views via two buttons?
I have a template code like below. <form> {{ form.as_p }} <input type="submit" name="add-to-cart" value="Add to Cart" class="btn btn-primary button white" id="add-to-cart-btn"> <input type="submit" name="buy-now" value="Buy Now" class="btn btn-primary button white" id="add-to-cart-btn"> </form> What I want to do is, If I click Add to Cart button, it sends form data to a.py view, and if I click buy-now, it sends form data to b.py view. Is it possible? As I know of, form have only one action option.... -
"ProgrammingError: column users_appuser.id does not exist" extending User model django
I am extending User on django and didn't realize I need to add phone number. When I made the model below, I forgot to makemigrations migrate before creating an AppUser. So I had made an AppUser/User combo as normal, but before the db was ready. It asks me to provide a default and I provided the string '1' because it wouldn't take 1 as integer from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from django.core.validators import RegexValidator class AppUser(models.Model): user = models.OneToOneField(User, primary_key=True, on_delete=models.CASCADE) phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.") phone_number = models.CharField(validators=[phone_regex], max_length=16, blank=True) # validators should be a list def __str__(self): return self.first_name + " " + self.last_name + ": " + self.email Now I can't touch User or AppUser: In [4]: appusers = AppUser.objects.all() In [5]: for user in appusers: ...: user.delete() ...: --------------------------------------------------------------------------- ProgrammingError Traceback (most recent call last) /home/cchilders/.virtualenvs/austin_eats/lib/python3.5/site-packages/django/db/backends/utils.py in execute(self, sql, params) 63 else: ---> 64 return self.cursor.execute(sql, params) 65 ProgrammingError: column users_appuser.id does not exist LINE 1: SELECT "users_appuser"."id", "users_appuser"."user_id", "use... ^ The above exception was the direct cause of the following exception: ProgrammingError Traceback (most recent call β¦ -
Why aren't my forms being called on this form?
Using django atm: Here are my forms: <form name="chrisForm" action=""> <input type="text" name="christext"> <br> <button type='submit' class='btn btn-primary btn-xs' onclick="return chrisFunction()"> Submit</button> </form> <!-- modify the searchwords form --> <form name="articleForm" action="" method="post">{% csrf_token %} <input type="text" placeholder='Modify the keywords' name="searchkeyword"> <br><button type="submit" class="btn btn-success btn-xs" onclick="return validateForm()">Submit</button> </form> Now here is the javascript functions from an external source: function validateForm() { var x = document.forms['articleForm']['searchkeyword'].value; if (x == null || x == "") { alert("Please enter a search keyword(s)"); return false } } function chrisFunction() { var y = (document.forms['chrisForm']['christext'].value); if (y === "1" || y === "2") { alert('You have entered 1 or 2, congrats!'); return false } else if (y === "" || y === null) { window.open('http://forbiddengrounds.net',"", height="200", width="200"); } } When I click on my buttons it doesn't do anything except it procs the "action" part but it should give an alert when I click the button without putting anything in the text box (or entering 1 or 2 for the chrisFunction) -
Ownership decorator for multiple object types
In the Django application I have written, many of the models I have, have an inherent ownership attached. I would like to check this to ensure I am not serving the user anything they should not see. As such, I adapted the following decorator to check if they own a model: def must_be_yours_question(func): def check_and_call(request, *args, **kwargs): #user = request.user #print user.id pk = kwargs["id"] Question = Question.objects.get(pk=pk) if not (scene.user.id == request.user.id): return HttpResponse("It is not yours ! You are not permitted !", content_type="application/json", status=403) return func(request, *args, **kwargs) return check_and_call However, as I have at least 4 different object types where I would like to test ownership, I have had to write 4 different decorators. Is there a simple way to write one decorator? Would the best way be to pass in an argument? -
Can't get on-server but external css to be used bydjango 1.10
Try as I might, and after trying to read through and follow these (and others): How do I serve CSS to Django in development? Django not loading CSS? I still can't get any staticfiles served by django. at this point, I have a project called limbo, with a yet-to-be-dev'd app called limbo (that was a bad idea, I no realize...name confusion), and a separate app called polls, where I followed well-known django tutorial to build out the app, then added a little session variable passing to pass the name to a stupid output on the target of the form. It's all served on EC2 linux AMI, with django v1.10, I'm viewing it with chrome v53. some code excertps are below, but the repos are public (one for the bulk of the django, the other for the html templates) ~/limbo/limbo/settings.py: ROOT_URLCONF = 'limbo.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ '/var/www/html/', '/var/www/html/polls/', ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] ... # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ #STATIC_URL = '/static/' #STATIC_ROOT = os.path.join(BASE_DIR, "/var/www/html/static/") STATIC_ROOT = '' STATIC_URL = '/static/' STATICFILES_DIRS = [ # "/home/ec2-user/limbo/limbo/static/", ] STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', β¦ -
Django adding multiple items to one category CheckboxSelectMultiple() using Django Forms
I need to assign multiple CampaignTypes to a Campaign unsing Django FormsModels. Selecting many CapaignTypes at once, adding the CapaignTypes to only one campaign. Thanks I will appreciate any help class Campaign(models.Model): client_id = models.ForeignKey(Company) name = models.CharField(max_length=45, null=True) campaign_status = models.ForeignKey(CampaignStatus) def __str__(self): return self.name class Campaign_type(models.Model): campaign_type = models.CharField(max_length=45) client_id = models.ForeignKey(Company) campaign_id = models.ManyToManyField(Campaign, verbose_name='Campaign(s)') def __str__(self): return self.campaign_type + ' ' + str(self.client_id) My code in form.py class CampaignCampaignTypeForm(forms.ModelForm): class Meta: model = CampaignType exclude = ['campaign_id', 'client_id'] campaign_type = forms.ModelMultipleChoiceField(queryset=CampaignType.objects.all()) def __init__(self, *args, **kwargs): company = kwargs.pop("company") if kwargs.get('instance'): initial = kwargs.setdefault('initial', {}) initial['campaign_type'] = [t.pk for t in kwargs['instance'].campaing_type_set.all()] forms.ModelForm.__init__(self, *args, **kwargs) My code in view.py def add_campaign_type_to_campaign(request, campaign_id): if not request.user.is_authenticated(): return render(request, 'campaign/login.html') else: client_user = ClientUser.objects.get(client=request.user.pk) form = CampaignCampaignTypeForm(data=request.POST or None, company=client_user.company) if form.is_valid(): campaigntype = form.save(commit=False).clean() #client_user = ClientUser.objects.get(client=request.user.pk) campaign = Campaign.objects.get(id=campaign_id) campaigntype.campaign_id = campaign campaigntype.save() form.save_m2m() # return render(request, 'campaign/detail_campaign.html', {'campaign_type': campaign_type}) context = { "form": form, } -
Rendering html in template from a received variable - Django template rendering
I currently have a variable that contains a string HTML which resembles this myvar = "<p style="-qt-block-indent: 0; text-indent: 0px; margin: 18px 0px 12px 0px;"><span style="font-size: xx-large; font-weight: 600; color: #5e9ca0;"> ..." I am passing this string to my template like so return render(request, "rendered.html", { 'result': myvar, }) In the template I am simply doing {{myvar}} This shows me on the screen the exact html as text but not rendered. When I investigated the source this is what i got &lt;p style=&quot;-qt-block-indent: 0; text-indent: 0px; margin: 18px 0px 12px 0px;&quot;&gt;&lt;span style ... while I was suppose to get <p style="-qt-block-indent: 0; text-indent: 0px; margin: 18px 0px 12px 0px;"><span style="font-size: xx-large; font-weight: 600; color: #5e9ca0;"> Any solution on how I can fix this issue ? -
trouble importing components in react
Hi I'm having trouble importing components from one jsx into another. I'm using a django framework to serve my webfiles and I've downloaded all the necessary tools (npm, webpack, webpack-bundle-tracker, babel loader, django-webpack loader). Webpack does a good job taking all of the seperate javascript files and turning them into a bundle in which my local django server can then render. The issue lies in when I try to import a component from one jsx into another jsx. There aren't any errors that I see but the javascript that I'm trying to import doesn't load on django. Example: File:index.js var React = require('react') var ReactDOM = require('react-dom') var Body = require('./app.js) ReactDOM.render(<Body message="Welcome to my website"/>, document.getElementById('app1')) Import file (which is in the same directory as index.js): File:app.js var React = require('react') var Body = React.createClass({ getInitialState: function() { return { bodymessage: this.props.message } }, render: function() { return ( <h1> {this.state.bodymessage} </h1> ) } }) module.exports = Body; Is there something wrong with my configuration? Here's my webpack.config.js file : var path = require('path') var webpack = require('webpack') var BundleTracker = require('webpack-bundle-tracker') module.exports = { context: __dirname, entry: './assets/js/index', output: { path: path.resolve('./assets/bundles/'), filename: '[name]-[hash].js', }, plugins: [ new β¦ -
keras error on predict, Exception: Error when checking : expected dense_input_1 to have shape (None, 784) but got array with shape (784, 1)
I am trying to use a keras neural network to recognize canvas images of drawn digits and output the digit. I have saved the neural network and use django to run the web interface. But whenever I run it, I get an internal server error and an error on the server side code. The error says Exception: Error when checking : expected dense_input_1 to have shape (None, 784) but got array with shape (784, 1). My only main view is from django.shortcuts import render from django.http import HttpResponse import StringIO from PIL import Image import numpy as np import re from keras.models import model_from_json def home(request): if request.method=="POST": vari=request.POST.get("imgBase64","") imgstr=re.search(r'base64,(.*)', vari).group(1) tempimg = StringIO.StringIO(imgstr.decode('base64')) im=Image.open(tempimg).convert("L") im.thumbnail((28,28), Image.ANTIALIAS) img_np= np.asarray(im) img_np=img_np.flatten() img_np.astype("float32") img_np=img_np/255 json_file = open('model.json', 'r') loaded_model_json = json_file.read() json_file.close() loaded_model = model_from_json(loaded_model_json) # load weights into new model loaded_model.load_weights("model.h5") # evaluate loaded model on test data loaded_model.compile(loss='binary_crossentropy', optimizer='rmsprop', metrics=['accuracy']) output=loaded_model.predict(img_np) score=output.tolist() return HttpResponse(score) else: return render(request, "digit/index.html") Thanks for the help, and leave comments on how I should add to the question. -
Do you think it is right approach? MPTT model in Django -> Tree structure in Redis
I am using Django framework. I wanted to make menu dynamically. I used django-mptt module and made tree structure with it. I store menu structure with tree structure, then template loads its data from database and show menu on template. whenever I change this menu structure, it applies dynamically when it load template again. I think it is more convenient than changing html codes whenever I change menu(add,delete,rename) Now, I want to use cache. Actually, menu wouldn't change very often. So I want to load menu structure from database and then put the data into cache. It will load menu structure data from memory cache once it store in Redis. I found Redis packages to implement free structure in Redis. So here are my questions. Do you think it is right approach to make menu dynamically in Django Framework? Does it seem alright to load data from PostgreSQL with MPTT module and store it in Redis with Redis module for tree structure in Django Framework? Is it worthy to do that? Thank you in advance. -
"PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.5/site-packages'" installing Django
I cannot install basic django packages on ubuntu. I just deleted virtualenv and remade it. pip3install = pip3 install -r requirements.txt [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ pip3install Collecting Django==1.10.1 (from -r requirements.txt (line 1)) Using cached Django-1.10.1-py2.py3-none-any.whl Collecting django-filter (from -r requirements.txt (line 2)) Using cached django_filter-0.15.2-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): djangorestframework in /home/cchilders/.local/lib/python3.5/site-packages (from -r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) Collecting twilio (from -r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): ipdb in /home/cchilders/.local/lib/python3.5/site-packages (from -r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): ipython in /home/cchilders/.local/lib/python3.5/site-packages (from -r requirements.txt (line 7)) Collecting pysocks; python_version == "3.5" (from twilio->-r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): six in /home/cchilders/.local/lib/python3.5/site-packages (from twilio->-r requirements.txt (line 5)) Collecting httplib2>=0.7 (from twilio->-r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): pytz in /usr/lib/python3/dist-packages (from twilio->-r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/cchilders/.local/lib/python3.5/site-packages (from ipdb->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): prompt-toolkit<2.0.0,>=1.0.3 in /home/cchilders/.local/lib/python3.5/site-packages (from ipython->-r β¦