Questions tagged as 'django'

1
answer

Calculate Commissions

I need to calculate the commission a doctor must have for the laboratory tests he sends his patients. In other words, the laboratory pays you for each order sent. Here I have the commission parameterization table: class Comisiones(models.Mo...
asked by 08.08.2018 / 18:48
0
answers

Save in multiple tables in a single post - Django rest frameweok

I have 4 models: class User(AbstractEmailUser): first_name = models.CharField(max_length=100, blank=True) last_name = models.CharField(max_length=100, blank=True) class Event(models.Model): name = models.CharField(max_length=200)...
asked by 04.08.2018 / 19:17
2
answers

Python does not add or modify data.

Friends of Stackoverflow I need help with this code, because it is not saving me or adding data to the database from the html form but from the / admin I hope you can help me please, thank you MODELS.PY class Cuenta(models.Model): ''' EN...
asked by 10.08.2018 / 15:55
1
answer

Encryption and decryption of words

I'm doing a program in Python and I need to encrypt a password for a form. My problem is that the most popular cryptographic default method in Python is Crypt, but this is for UNIX. How could I encrypt and decode words in Windows?     
asked by 10.08.2018 / 15:43
1
answer

Doubts in Python - User parameters in query - Mapper in python

Friends of Stackoverflow I am an empirical developer in python and I am doing an application where there is an Administrator and several users, the Administrator assigns a certain amount of records to the operator, he sees them in a list and sel...
asked by 09.08.2018 / 21:46
0
answers

Django project deployment

Hi, I'm deploying my project on a Linux server 16.04 but when I do the following   python3 manage.py collectstatic all right the problem is later when I start running the app that can not find me the static files I get like this in cons...
asked by 31.07.2018 / 20:30
1
answer

Problem when uploading image - Django rest framework

I have 2 models User and EcoUser with a relation of 1 to 1 (I have reduced the fields of the tables for this example): class User(AbstractUser): picture_url = models.ImageField(upload_to='logos/', blank=True) class EcoUser(models.Model)...
asked by 28.07.2018 / 19:18
1
answer

Display django on linux server

I'm trying to deploy a django project on a linux server. From what I see on the web there are many ways to deploy it:  - Apache + wsgi  - Nginx + uwsgi  - Nginx + gunicorn and surely many others that I have not seen. What is the recommended o...
asked by 07.08.2018 / 11:24
0
answers

in Python / Django I can not reassign a variable, the script is ignored

I'm doing a Login with Python / Django / MongoDB this is my function from django.shortcuts import render from pymongo import MongoClient import bcrypt def login( req ): #hashed = bcrypt.hashpw( p.encode('utf8'), bcrypt.gensalt() ) re...
asked by 06.08.2018 / 22:45
0
answers

UpdateView problems updating a field

I am trying to make an inventory of tools, with which I can monitor the amount of tools I have, who has them (in which tool carts they are) and a record of the damaged tools. I created a view where I display a list of existing carts or a butt...
asked by 26.07.2018 / 02:36