Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Problems with {% extends 'base.html' %} using cookiecutter
I'm trying to create a project template using cookiecutter, my problem is that I am receiving the next error: File "./{{cookiecutter.project_slug}}/templates/{{cookiecutter.project_slug}}/home.html", line 1, in top-level template code File "/Users/osvaldo/.virtualenvs/demo/lib/python3.6/site-packages/jinja2/loaders.py", line 187, in get_source raise TemplateNotFound(template) jinja2.exceptions.TemplateNotFound: base.html The file home.html contains the next piece of code: {% raw %} {% extends "base.html" %} {% endraw %} Can anyone tell me what would be the correct way to escape the extends tag? Thanks. -
Foreign Key Access
--------------------------------------------MODELS.PY-------------------------------------------- class Artist(models.Model): name = models.CharField("artist", max_length=50) #will display "artist" in front of artist-name year_formed = models.PositiveIntegerField() # Initialization Example # newArtist = Artist(name = 'Artist Name', year_formed = 2015); # newArtist.save(); # Album will be a foreign key # Many to 1 relation ie (Single artist -> many albums) class Album(models.Model): name = models.CharField("album", max_length=50) #will display "album" in front of album-name artist = models.ForeignKey(Artist) -----------------------------SHELL-------------------------------- newArtist = Artist(name = 'GBA',year_formed = 1990) newArtist.save() album1 = Album(name = 'a',artist = newArtist) album2 = Album(name = 'b',artist = newArtist) album3 = Album(name = 'c',artist = newArtist) album1.save() album2.save() album3.save() allAlbums = Album.objects.all() for e in allAlbums: print(e.artist.name) #Results in error How can I successfully access the foreign key fields? Have tried print (e__name) as well. -
HighStock Render Label with Performance
I want to create a call-out box that shows the total performance from the beginning and end of the period for a portfolio and its benchmark. Ideally, it would update when the zoom is changed from 1Y to 3Y to YTD to All. I know I have to use renderer.label and after set extremes, but can anyone help me with where that fits into my code? I am new to web development, and Django so still learning about where everything goes. I used some tutorials for the base code, but the organization is different from the highcharts documentation. Is that because highcharts has a separate JS file like here: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/members/renderer-label-on-chart/ But I'm integrating the JS code into the HTML template? Any help would be greatly appreciated! <html> <head> <title> Fund Performance </title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script src="https://code.highcharts.com/stock/highstock.js"></script> <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> </head> <body> <div id="chart_container" style="height: 400px; min-width: 310px"></div> <table class="table"> <thead> <tr> <th>Year</th> <th>Jan</th> <th>Feb</th> <th>Mar</th> <th>Apr</th> <th>May</th> <th>Jun</th> <th>Jul</th> <th>Aug</th> <th>Sep</th> <th>Oct</th> <th>Nov</th> <th>Dec</th> <th>YTD</th> </tr> </thead> <tbody> {% for year in monthly_returns_years %} <tr> <td>{{ year.year }}</td> {% for month_return in year.data %} <td>{% if month_return %}{{ month_return|floatformat:'2' }}%{% else %}-{% endif %}</td> {% endfor %} … -
Django and java script
I've encountered a minor problem with Django, rendering and Javascript. In my Django app, i want to show a message like "Loading, please wait", then after a method (SalesforceConnector) returns a result, use that result (success or fail) to render another message accordingly. I've already understood that the main thing will be to use javascript with ajax or jquery, but how can i wait for the method result exactly ? Thank you very much in advance ! from django.shortcuts import render from api.SalesforceConnector import SalesforceConnector **def api(request, *args, **kwargs):** print("Called") print(request) **### Show "Loading, please wait.." Message here** sessionId = request.GET["sessionId"] routePlanId = request.GET["routePlanId"] apiURL = request.GET["apiURL"] sfAction = request.GET["action"] print(sessionId) salesforceConnector = SalesforceConnector(sessionId, routePlanId, apiURL, sfAction) **### Show message according to the SalesforceConnector result** -
Deploy Django on AWS Elasticbeanstalk
i am trying to upload my Django based application on AwsElasticBeanStalk. My project structure is like this untitled: untitled: settings.py,urls.py,views.py,wsgi.py .ebextensions: django.config app1 templates Whenever i try to upload my zip file(I have tried with compressing only the items inside the outermost untitled folder so that after extracting there are only files not a parent folder) I get a error , Your WSGIPATH refers to a file that does not exist and after the application is deployed when I click on link I get this error: Not Found The requested URL / was not found on this server. My django.config file is this: option_settings: aws:elasticbeanstalk:container:python: WSGIPath:untitled/wsgi.py Can anybody tell me what is the problem? I have tried many hit and trials but this has been a dead end. Please help -
how to pull out the data and the color of the table cell that are exactly the same as Excel by using python , pandas, django
I have successfully pull out the data from excel to html by using xx.to_html(), but the table color cell with are base on the data value not able to pull out, any body have any suggestion? and i found that when i useing style.applymap(), the to_html() cannot run the style attribute. -
NoReverseMatch at
error: Reverse for 'listar_esp' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'solicitar/lista/(?P\d+)/$'] Object filter where you get the iDs def home(request): especialidad = Especialidad.objects.all() template = "index.html" return render_to_response(template,locals()) Listing once obtaining the id def ArticuloListView(request, id_especialidad): especialidad = Especialidad.objects.get(id=id_especialidad) if request.method == 'GET': user = request.user if user.is_superuser: pedido = Pedido.objects.all(instance=id_especialidad) template = 'admindata.html' return render_to_response(template,locals()) else: pedido = Pedido.objects.filter(instance=id_especialidad) template = 'index2.html' return render_to_response(template,locals()) URLS: url.py global: urlpatterns = [ # Examples: url(r'^solicitar/', include(urls, namespace="usuario")), ] urls.py app: urlpatterns = [ url(r'^home/$', login_required(home), name="home"), url(r'^lista/(?P<id_especialidad>\d+)/$', (ArticuloListView), name="listar_esp"), ] and href html with urls namespace and name: <section id="contenido"> {% if especialidad %} {% for esp in especialidad %} <article class="item"> <figure class="imagen_item"> <a href="{% url "usuario:listar_esp" esp.id %}"><img src="/static/img/user.png" width="1000" height="135px" /></a> </figure> <p class="datos_item"> <a class="tag_item" href="#">{{ped.especialidad.nombre}}</a> </p> <a class="titulo_item" href=""><h5>{{ped.especialidad.encargado.nombre}}</a></h5></p> Total Articulos: <a class="titulo_item" href="">{{total_art}}.</a> {% if pend > 0 %} <font color="green"><h4>Solicitado!</h4></font> Articulos Pendientes:<a class="titulo_item" href="">{{pend}}.</a> {% endif %} Articulos Aprobados:<a class="titulo_item" href="">{{entre}}</a> id:<a class="titulo_item" href="{{esp.esp}}"><h5>{{esp.id}}</a></h5></p> <p class="autor_item"> </p> <p class="autor_item"> </p> <a class="guardar_item" href="#"></a> {% if pedido %} <span class="fecha_item">Fecha solicitud:<strong>{{pedido.fecha_pedido}}</strong></span> {% endif %} </article> {% endfor %} {% endif %} Treated of all forms by adding id_especialidad = … -
How to Use Postman to Authenticate to Django REST Framework
Okay, I've now spent most of my day trying to figure out how the hell to authenticate to the Django REST Framework with postman. I have postman interceptor. But no matter what I try, I seem to get a 403 - CSRF verification failed. Request aborted. So in chrome, I go to DRF's default login point. I enter the username and password and click submit. It works in Chrome. With interceptor, I can see the POST. Now if I try that exactly same POST in Postman, I get the 403 with the CSRF error. How is that even possible? Postman is doing exactly the same thing that chrome is doing. How can it be producing a different result? Here's me logging in from Chrome... Here's me doing the exactly same thing with postman... What am I missing? I keep reading about doing a GET request, looking at the set-cookie csrftoken and value and putting that in as header on my POST request. I've tried that and every variation I can think of to no avail. Please, any help is appreciated. I clearly don't know how the hell authentication works, and this is about to drive me insane. -
How to filter objects in admin?
How i can filter objects that are shown in wagtail admin page of each model? In django this problem can be solved by overriding Admin class of model, in wagtail i dont know how it is possibile. -
Trying to implement a launch button in django to store object
I would like to use a launch button to store my environment object into my database with two other object instances. So basically I have three objects lets say A, B, and C, and User. Model A is an object. Model B is an object called environment and my ModelC is an object called an assignment. Lastly, I have a user model. My Object A contains object B. Model B contains both Model C and the user model. First step for me is to create a Launch button in Django either through forms or another method. If I were to use a form, I would have to display hidden fields with only the launch button displaying. On my view, I essentially want to check if an object exists, if it does I want to create Model A object containing object b (Model b) which contains model C and Model D. I am am not familar with Django. def launch_environment(request,pk): env = get_object_or_404(Assignment,pk=pk) test = "Environment has been saved" try: #obj = Environment.objects.get(Assignment.name='test', user.username='testUser') # Environment.objects.filter(assignment__in=) except Environment.DoesNotExist: Environment.save() Does anyone have suggestions as to how I should implement this? -
query is not returning kwargs results django
The kwargs are getting passed into my query but the values are not showing in my drop down box, no values are being displayed in the drop down box. forms.py class ChooseCarMakeModelForm(forms.Form): car_model = forms.ModelChoiceField(queryset=CarModel.objects.none()) def __init__(self, *args, **kwargs): ids = kwargs.pop('ids', None) super(ChooseCarMakeModelForm, self).__init__(*args, **kwargs) if ids: print 'it worked' self.fields['car_model'].queryset = CarModel.objects.filter(make=ids) else: print 'didnt work' view form = ChooseCarMakeModelForm(request.POST,ids=car_model_ids) -
NoReverseMatch at
error: Reverse for 'listar_esp' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'solicitar/ingresar/(?P\d+)/$'] def ArticuloListView(request, id_especialidad): especialidad = Especialidad.objects.get(id=id_especialidad) if request.method == 'GET': user = request.user if user.is_superuser: pedido = Pedido.objects.all(instance=id_especialidad) template = 'admindata.html' return render_to_response(template,locals()) else: pedido = Pedido.objects.filter(instance=id_especialidad) template = 'index2.html' return render_to_response(template,locals()) def home(request): especialidad = Especialidad.objects.all() template = "index.html" return render_to_response(template,locals()) url.py global: urlpatterns = [ # Examples: url(r'^solicitar/', include(urls, namespace="usuario")), ] urls.py app: urlpatterns = [ url(r'^home/$', login_required(home), name="home"), url(r'^lista/(?P<id_especialidad>\d+)/$', (ArticuloListView), name="listar_esp"), ] and href html with urls namespace and name: <a href="{% url 'usuario:listar_esp' esp.id %}"> Treated of all forms by adding id_especialidad = esp.id, But I can not, help me pls! regards! Reverse for 'listar_esp' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'solicitar/ingresar/(?P\d+)/$'] -
How to create new data when exception in Django REST Framework
I'm begginer to develop API in django rest framework. I want to create API for app mobile. The service has the following functionality: Creates a new user if it was not found by mail Show all data of the user, if it was found. Model: class Users(models.Model): sync_id = models.BigIntegerField(primary_key=True) points = models.IntegerField() phone = models.CharField(max_length=50, blank=True, null=True) email = models.CharField(max_length=50, blank=True, null=True) def __unicode__(self): return self.sync_id def save(self, *args, **kwargs): sequence_name = 'SEQ_ID' # Query the database for the next sequence value. from django.db import connection cursor = connection.cursor() cursor.execute("SELECT %s.nextval FROM DUAL;" % (sequence_name)) row = cursor.fetchone() self.sync_id = row[0] return super(Users, self).save(*args, **kwargs) class Meta: managed = False db_table = 'users' unique_together = (('email'),) view: def users_detail_email(request, email): try: users = Users.objects.filter(email=email) except Users.DoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) if request.method == 'GET': serializer = UsersSerializer(users, many=True) return Response(serializer.data) I have already wroten code of API for show all data of user if he was found. But i need help for create it if it was not found I tryed to add the following code in views, but it's saved nothing try: users = Users.objects.filter(email=email) except Users.DoesNotExist: context= {"sync_id": 99999999, "points": 0, "phone": "","email": email} serializer = UsersSerializer(data=context.data) if serializer.is_valid(): … -
How to Find Django ImageField URL
I'm trying to accomplish something I believed would be simple: upload an image (via admin), then use the complete URL in a template to display the image. The problem is I can only print the relative URL: /pics/filename.jpg. I believe the sequence is settings.py (MEDIA_ROOT, MEDIA_URL), urls.py, views.py and then mytemplate.html.I hope someone can find what's missing. Settings: STATIC_URL = '/static/' MEDIA_ROOT = '/Users/ed/code/projects/djcms/pics/' MEDIA_URL = '/pics/' Urls.py: from django.conf import settings from django.conf.urls.static import url, static from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^news/(?P<pk>[0-9]+)/$', views.detail, name='detail'), ] + static(r'^$/pics/', document_root = settings.MEDIA_URL) Views.py def detail(request, pk): story = Article.objects.get(pk=pk) my_pic = Photo.objects.get(pk=pk) print(story.image.url) print(my_pic) print(story.body) print(request) context = {'story': story} return render(request, 'articles/detail.html', context) The Error with story.image.url: AttributeError: 'Photo' object has no attribute 'url' When I remove the .url, I get this partial URL: pics/intro-bg.jpg What am I missing? Thanks. -
Convert wav data to flac data using JS
I have a JS blob of WAV Data which I need to convert to FLAC data which I need to send an AJAX request to my localhost Django server where I want to use the Google Speech API. The important thing here is that I don't want to store any kind of audio data anywhere on the server (So I think I should refrain from using commands which include "input.wav" and "output.flac") I tried using pySoX but didn't know how to use without providing the paths of input and output files. I am open to any other strategies as I don't know how this is done conventionally. -
Cannot save nested object, validated_data removing id attribute
I am trying to write my own create/update serializer methods to save nested objects. My create operation is working perfectly but update is not working. I am kind of out of idea to deal the situation. Can someone point out what I am doing wrong? Here are my models class Tenant(models.Model): id = models.BigAutoField(primary_key=True) isactive = models.BooleanField() tenant_company_name = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'tenant' class TenantContact(models.Model): id = models.BigAutoField(primary_key=True) tenant = models.ForeignKey(Tenant, on_delete=models.CASCADE, related_name='tenant_contacts', blank=True, null=True) title = models.TextField(blank=True, null=True) notes = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'tenant_contact' Here are my Serializers class TenantContactSerializer(serializers.HyperlinkedModelSerializer): id = serializers.ReadOnlyField() class Meta: model = TenantContact fields = ('__all__') class TenantSerializer(serializers.HyperlinkedModelSerializer): id = serializers.ReadOnlyField() tenant_contacts = TenantContactSerializer(many=True) class Meta: model = Tenant fields = ('__all__') def create(self, validated_data): tenant_contacts_data = validated_data.pop('tenant_contacts') tenant = Tenant.objects.create(**validated_data) for tenant_contact_data in tenant_contacts_data: tenant_contact_data.pop('tenant') TenantContact.objects.create(tenant=tenant, **tenant_contact_data) return tenant def update(self, instance, validated_data): instance.tenant_company_name = validated_data['tenant_company_name'] instance.isactive = validated_data['isactive'] instance.save() items = validated_data.get('tenant_contacts') if items: for item in items: item_id = item.get('id', None) if item_id: tenant_contact = TenantContact.objects.filter(pk=item_id) if tenant_contact: tenant_contact.update(id=item.get('id'), tenant=instance , title=item.get('title') , notes=item.get('notes')) else: TenantContact.objects.create(tenant=instance, **item) return instance Here is my sample JSON payload to create/update the record … -
how make inner join whit this models?
class A(models.Model): pass class B(models.Model): c = models.ForeignKey(A) class C(models.Model): c = models.ForeignKey(B) I want all C's, where B's are equal to A = 1 -
Django Foreign Key
Models.py Shell Output Hey, I am pretty new to Django so have been going through the documentation diligently but have an error I for the life of me can't figure out! The problem lies when dealing with the filter property. There are 2 classes in my models file: Artist and Album. Artist is also a foreign key of Album as an Artist can have many albums. Currently I have 3 albums instances created, all saved under the Artist "newArtist" who's name is "GBA". The problems I'm facing are 1)When attempting to filter using the artist name "GBA" an empty query set was returned 2)However when I switched the specifier to "newArtist.id" it populated the query set successfully. Am confused as to why the artist name did not work, was it a syntactical/logic/Django rule error? If anyone needs to see further code snippets/output, please let me know. Thanks for your help! -
Django, angular uploading image. Upload a valid image
I am looking for the easiest way to post image via angular and django rest. I've took some code samples and combined to this, but I am still getting error: Upload a valid image. The file you uploaded was either not an image or a corrupted image. Maybe someone has a good eye and could easily see what I am missing here? P.S. libjpeg-dev is already the newest version javascript.js /* global angular */ var products = angular.module('products',['ngCookies']); products.config(function($interpolateProvider) { //allow django templates and angular to co-exist $interpolateProvider.startSymbol('{[{'); $interpolateProvider.endSymbol('}]}'); }); products.run(function($rootScope, $log, $http, $cookies) { $http.defaults.headers.common['X-CSRFToken'] = $cookies['csrftoken']; }); products.factory('ModelUtils', function($http, $log) { var handleErrors = function(serverResponse, status, errorDestination) { if (angular.isDefined(errorDestination)) { if (status >= 500) { errorDestination.form = 'Server Error: ' + status; } else if (status >= 401) { errorDestination.form = 'Unauthorized Error: ' + status; } else { angular.forEach(serverResponse, function(value, key) { if (key != '__all__') { errorDestination[key] = angular.isArray(value) ? value.join("<br/>") : value; } else { errorDestination.form = errorDestination.form || '' + key + ':' + angular.isArray(value) ? value.join("<br/>") : value; } }); } } }; var ModelUtils = { get: function(url,id) { $http.get(url + id + '/').then(function(response){response.data}); }, create: function(url, obj, errors) { //TODO … -
Why am I receiving a m2m_field / __str__ error in Django?
Is the query below valid, given that the model is a ManyToManyField? I am receiving the error I pasted below and wondering if it is because my query is wrong or if it is related to the unicode? Should I switch Unicode to String? Entry.objects.filter(author__user=username)[:4] models.py class MyProfile(models.Model): user = models.CharField(max_length=16) first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) def __unicode__(self): return u'%s %s %s %s %s %s %s %s' % (self.user, self.firstname, self.lastname) class Entry(models.Model): headline= models.CharField(max_length=200,) body_text = models.TextField() author=models.ManyToManyField(MyProfile, related_name='entryauthors') def __str__(self): return u'%s %s %s' % (self.headline, self.body_text, self.author) error File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 572, in __repr__ u = six.text_type(self) File "/root/cannablr/accounts/models.py", line 63, in __str__ return u'%s %s %s' % (self.headline, self.body_text, self.author) File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related_descriptors.py", line 476, in __get__ return self.related_manager_cls(instance) File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related_descriptors.py", line 757, in __init__ self.source_field_name = rel.field.m2m_field_name() File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 15, in _curried return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs)) RuntimeError: maximum recursion depth exceeded -
Customizing Login Redirect URL in Django
After the user logs in i want to redirect to the view ('profile:profile_view') settings.py LOGIN_REDIRECT_URL = 'profile:profile_view' I tried the above code but was not getting the result that i needed because iam passing slug into the url urls.py url(r'^(?P<slug>[-\w\d]+)/$', ProfileView.as_view(), name='view_profile'), from here i tried the following. settings.py LOGIN_REDIRECT_URL = 'login_redirect' urls.py @login_required def login_redirect(request): return redirect('profile:profile_view', pk=request.user.pk, name=request.user.username) Now i do get the username in the terminal but how do i use the username for the following 'localhost:8000/username' views.py class ProfileView(DetailView): template_name = "profile/profile_view.html" queryset = User.objects.all() context_object_name = 'profile' What am i doing wrong here? is there a better way? -
Django migrations.RunPython unexpected behavior regarding models.ForeignKey
I noticed that when migrating data to my application using migrations.RunPython, the expected behavior from a Model class that uses a field as models.ForeignKey is not as I would expect. As example, consider the following models: class Substatus(models.Model): sub_id = models.IntegerField(primary_key=True, blank=True, null=False, editable=False) name = models.TextField(unique=True) def __str__(self): return self.name class Meta: managed = False db_table = 'substatus' class NextActionOwner(models.Model): nco_id = models.IntegerField(primary_key=True, blank=True, null=False, editable=False) name = models.TextField(unique=True) def __str__(self): return self.name class Meta: db_table = 'next_action_owner' class NextAction(models.Model): nc_id = models.IntegerField(primary_key=True, blank=True, null=False, editable=False) sub = models.ForeignKey(Substatus, models.DO_NOTHING) nco = models.ForeignKey(NextActionOwner, models.DO_NOTHING, help_text='next action owner') def __str__(self): return '%s -> %s' % (self.sub_id.name, self.nco_id.name) class Meta: db_table = 'next_action' unique_together = ('nco','sub') NextAction is basically a model for a inter-table between Substatus and NextActionOwner. When using migration, on the other hand, I couldn't provide the instance of NextActionOwner or Substatus when saving the data. I had to provide the related Id's already stored in the DB. Consider initial_items as a dictionary already populated with the values: NextActionOwner = apps.get_model('backlogApp','NextActionOwner') Substatus = apps.get_model('backlogApp','Substatus') NextAction = apps.get_model('backlogApp','NextAction') nco = {} for row in NextActionOwner.objects.all(): nco[row.name] = row.nco_id sub = {} for row in Substatus.objects.all(): sub[row.name] = row.sub_id for (substatus,owner) … -
How to include list comprehension result in django-filter?
I am using django-filter to display my results in django However I have to filter some results based on the properties in the model I have to also use list comprehension def extra_available_list(request): EXTEND = "rent_base.html" extra_list_gen = ExtraFilter(request.GET, queryset=Extra.objects.all().order_by('is_parking')) extra_list = [obj for obj in extra_list_gen if ((obj.lease)==0)] paginator = Paginator(extra_list, 10) # Show 25 contacts per page page = request.GET.get('page') try: extra_page = paginator.page(page) except PageNotAnInteger: # If page is not an integer, deliver first page. extra_page = paginator.page(1) except EmptyPage: # If page is out of range (e.g. 9999), deliver last page of results. extra_page = paginator.page(paginator.num_pages) return render(request,'unit/extra_list.html', {'extra': extra_list,'page_extra':extra_page}) How can incorporate my output from list comprehension into my django filter? -
Google charts and tweepy - real time data
I've got a google chart set up (geo chart) and a Tweepy live streaming script that fetches coordinates of tweets in North America in real time. Is it easier to visualize this with the raw coordinates or should I be storing the data as JSON and trying to convert to GeoJSON? How can I have this so the chart gets updated fairly quickly?(~3s)? I'm using Django as my back end. I plan to have a user enter a tag which the script searches for and plots the locations of the tag. -
runserver with django crashes until.. it doesnt
I'm on windows 10 with the latest py (3.6 something) and dango. I keep getting a crash on first run, and quite often sometimes thereafter, until finally it works. Here's the most recent example. Each of the lines with no output is a crash with a little window informing me of a crash but no information abot what is going wrong: (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python -xd .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver (personDJV) PS C:\Users\roberto\github\python\personDJV> python .\manage.py runserver Performing system checks... System check identified no issues (0 silenced). March 12, 2017 - 12:55:38 Django version 1.10.6, using settings 'person.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. From there, it functions perfectly.