Questions tagged as 'python'

0
answers

to_json and read_json in Python Pandas

I'm trying to pass a DtaFrame or Series in Python to json format with to_json() and re-read it with read_json() , but it saves or retrieves it in the wrong format. The series that I try to convert is: pmes['ADS']['Junio']['Rentabi...
asked by 28.06.2018 / 12:52
0
answers

How to make a redirect by passing request.POST

I am doing a purchase process in which I want the user to follow the following steps: Fill card data Validate that the data is correct Check result For them, the first function they enter is this: def proceso_compra(request, slug, t...
asked by 28.06.2018 / 11:41
1
answer

How to copy field in Odoo 10

I'm using Odoo 10 and I'm trying to copy a field. I want to copy a field called Address up to the street field Pos_custom.xml code located in the src folder <templates id="template" xml:space="preserve"> <t t-extend="C...
asked by 27.06.2018 / 20:32
0
answers

how do I restrict login to logged in users - Django (python)

urlpatterns = [ path('accounts/', include('django.contrib.auth.urls')), ] I have something like that, I do not handle something personalized. Is there a way to restrict the login view, so that it is only shown to non-logged in users?     
asked by 27.06.2018 / 03:30
0
answers

Anaconda spyder "There is no IPython interpreter to execute ..."

When I try to run my program .py in Anaconda-spyder I get a pop-up with the following error:    "There is no IPython interpreter to run program_name.py Please favor a new one and try again" I lack administrator permissions on the curr...
asked by 27.06.2018 / 15:08
0
answers

Error with Django Cache

I'm trying to generate a cache with Django cache. According to the configuration, I need to program something like that. CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION':...
asked by 27.06.2018 / 15:18
0
answers

graph = Graph (g) NameError: name 'Graph' is not defined. HOW DO I RESOLVE IT?

introducir el código#TAD DE DIJKSTRA, algoritmo de caminos mínimos. #es un algoritmo para la determinación del camino más corto. #dado un vértice origen. #hacia el resto de los vértices en un grafo que tiene pesos en cada arista. ############...
asked by 28.06.2018 / 15:11
0
answers

python - 'QPushButton' object is not callable

Good evening I am starting a new project in python, but I have the following screen: I have worked with other projects and did not throw any error at this idea? NOTE:  the self.boton is in the .ui file and from there I call it     
asked by 26.06.2018 / 03:21
1
answer

py2exe does not compile the executable

I'm trying to make an executable of a program made in python3.6 but when I run python setup.py py2exe it gives me the following error: running py2exe Traceback (most recent call last): File "setup.py", line 5, in <module> co...
asked by 25.06.2018 / 18:35
1
answer

Error in django urls

My file urls.py : #home/urls.py from django.urls import path, re_path from home.views import homePageView urlpatterns = [ path('',homePageView.as_view(),name='home'), re_path('activate/(?P<code_>[a-zA-Z0-9]{15})/(?P<email_&g...
asked by 30.06.2018 / 11:43