Questions tagged as 'django'

0
answers

Login Django for api Twitter

I'm trying to make a login button in Django to authenticate with a twitter api. The process I want to do manually and get information from the user. I'm trying to do the following to get aouth_access bearer_token_credentials = base64.ur...
asked by 25.11.2018 / 21:53
0
answers

Show image loaded with the administrator

I have Pillow installed, Django 2.1 and a model with an ImageField field that places the loaded images in the "images" directory. In the form from the administrator I can load the image and it is stored in that directory (/ media / images), b...
asked by 16.11.2018 / 22:06
0
answers

MultiValueDictKeyError

hi I'm trying to make a sales system where to make a sale I need to open cash but I get the errors in my code of views amount = Decimal (request.POST ["amount"]), total = Decimal (request.POST ["total"]), difference = Decimal (request.POST ["di...
asked by 14.11.2018 / 01:19
2
answers

I need to solve a Django problem - manage.py createsuperuser | UnicodeEncodeError

When executing: (env) luis@ux-pc:~/projects/administrador-webapp-django$ python3 manage.py createsuperuser Nombre de usuario (leave blank to use 'luis'): superusername I get a Unicode error: Traceback (most recent call last): File "mana...
asked by 15.11.2018 / 04:01
0
answers

ImportError: can not import name 'safe_join'

I get this error when I run a Django project with docker with AWS S3     
asked by 12.11.2018 / 22:39
0
answers

Error connecting pyodbc to external server

Hi, I'm connecting my application to an external database server sql server 2008 R2 and I can not connect, it gives me the following error    pyodbc.OperationalError: ('HYT00', '[HYT00] [unixODBC] [Microsoft] [ODBC Driver 13 for SQL Server] L...
asked by 10.11.2018 / 17:36
1
answer

Change a field of the parent class in the Django models

I have a parent class where I have an attribute that I want to modify according to the child class: class Service(models.Model): # otros atributos SERVICE_TYPE = { 'None': 'Unknown service type', 'visa': 'Visa', } ser...
asked by 09.11.2018 / 20:53
1
answer

Error too many values to unpack

When I fill out the form, the data stores it correctly in the database, but the form does not work again and the error "too many values to unpack" appears. What can I do? Here is my template: <div class="col-md-20 animate-box">...
asked by 07.11.2018 / 20:43
1
answer

django-python order json

django and I do not know how to sort this list by title order. I'm using: nuevo_json_array = sorted(json_array, key=itemgetter('oportunidad_json')) [ { 'pk': 1 'oportunidad_json':OrderedDict([ ('id',38441),...
asked by 07.11.2018 / 17:41
1
answer

How to write a dynamic file in django?

I want to write a dynamic file that generated me a report in txt format, for this I created a function that returns the file and downloads it, but it is returning empty. Here part of the code: file_content = "Este es el contenido de los report...
asked by 05.11.2018 / 17:55