Questions tagged as 'python'

1
answer

How to add words from a DataFrame

I have a csv file with several columns of data, but I'm only interested in two, the nationality and the commune (region) where they live, obviously the two columns are not numerical data, something like this: 'index', 'comuna_name', 'country_n...
asked by 31.07.2018 / 03:11
0
answers

Problem with user registration and login in flask

hello I need an opinion I'm developing a api rest with python flask but I have a small problem with a class my code is modularized in parts for more flexibility of functions in the api but when registering and loging users this class works cor...
asked by 31.07.2018 / 01:14
0
answers

send the value of one variable in python to another function in another file

I would like to know what is failing me with the following code, since I try to send the value of the variable (result) to a function within another file. this is the code: from ticket import * def vender_data(self): acount1 = 0 #cantid...
asked by 29.07.2018 / 06:26
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 / 09: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 / 20:45
0
answers

Download files with chrome dirver-Selenium in python?

What do I need to do? I need to download an excel in a specific route through my python code which I use selenium and chrome driver. What happens? Downloading the file well without hiding or putting it in the background does not work and does...
asked by 01.08.2018 / 17:12
0
answers

Error in Python 2.7 html5lib

I am in windows 7, I get the following error when running a program in Python. What could be the problem? I already installed the Six module Thank you     
asked by 01.08.2018 / 17:12
0
answers

Time zone django

The dates I keep return the month in English, as a change or reformat that date so that it remains in Spanish TIME_ZONE = 'America/Bogota' # https://docs.djangoproject.com/en/dev/ref/settings/#language-code LANGUAGE_CODE = 'es-co' # https://do...
asked by 26.07.2018 / 16:41
1
answer

How to use exclude to use in a form with django?

My doubt is to be able to make fields that are with exclude can be filled through a form but I still do not know how to show these same data models.py code class Producto(models.Model): nombre = models.CharField(max_length=100)...
asked by 27.07.2018 / 03:20
1
answer

Odoo 10 Query sql does not return value

I have a simple sql query but it does not return any value to me. Where can the error be? Thanks @api.model_cr def _compute_impuestos(self): """ Event Question main report """ tools.drop_view_if_exists(self._cr, 'product.template')...
asked by 23.07.2018 / 16:33