Questions tagged as 'django'

0
answers

Which web service python to use in an application using knockoutjs?

I need to create a web service in python for my Django application. My application was built using django and knockoutjs, however I do not use models or forms, I use the ko.observable knockout. I thought of using django Rest_Framework, but it us...
asked by 10.09.2015 / 15:46
2
answers

Block Django source code

I'm developing some projects where I'll use django , but I'll have to host the server on the client machine. Where it will be installed there is no internet, so I have to make the system work locally. I need to know if I can somehow protect...
asked by 30.10.2015 / 16:49
0
answers

Django session timer countdown

I have this in my login screen: SESSION_COOKIE_AGE = 1200 # 20 minutos and would like to show the remaining time in my template. Does anyone know a good middleware or package for Django that adds a missing timer to logout. I did not fi...
asked by 13.01.2015 / 21:49
1
answer

Sort the Django queryset by priority

I'm creating a search engine on my platform. I do a search for content title, description and tags inside it. Here is the code: questions = Question.objects.filter(reduce(lambda x, y: x | y, [(Q(name__icontains=word) | Q(description__icontains...
asked by 14.08.2017 / 17:57
2
answers

Django + Python, modal display using {% if%} in the template

I'm doing a check if there are active classes, if there is not a modal and not the registration form, but it is not working: views.py: from django.shortcuts import render, redirect from django.core.mail import send_mail from django.temp...
asked by 17.09.2018 / 15:03
3
answers

What's the difference when calling a function with parentheses and without in urls.py with Django 1.7?

In the mapping of my urls.py I use from common functions to views based on classes. I want to know the difference of calling the view with or without parentheses, considering that if I have the url(r'^$', base_views.index_view) input,...
asked by 12.02.2015 / 02:42
2
answers

Problems trying to save to "POST"="no-such-table" database Django / Python

I'm following a course in Python and Django, and the problem starts when the course version is 1.1.2 and mine is 1.8.2 I was able to generate a form to save "Events", but when I click submit, it returns the following error: OperationalE...
asked by 05.06.2015 / 07:01
1
answer

Remove tags generated at the end of the string of a Text Editor

I'm using a text editor and like others I've used, it always generates some useless tags that I'd like to remove. I can remove the last one, but sometimes it generates more than once. My code: def remove_useless_tags(message): message =...
asked by 09.11.2018 / 21:06
2
answers

What is the difference between project (project) and application ("app") in Django?

I had done some testing as a Django framework a while ago, and only now that I've tested it again, I noticed that there are two commands that have confused me: django-admin startproject nome_do_projeto And we also have: django-admin start...
asked by 05.04.2017 / 03:09
1
answer

How to import database into Django models?

I have an application that is almost ready. It was developed in PHP through the Laravel Framework. I already have the database and all some data already entered to perform tests. However, since I'm doing some tests with the Django framewor...
asked by 02.05.2016 / 02:13