Questions tagged as 'django'

1
answer

Return message from else

I'm doing a very simple example using Django. In my view I have the following: def index(request,idade): string = ''' {% if idoso >= 65 %} Você já é idoso {% else %} Você não é idoso {...
asked by 29.05.2018 / 15:30
1
answer

Returning more than one Django data list

I made a homepage using django, I'm loading my slides and menus dynamically and it was perfect. I put both the menu and the footer through include and it worked 100%. Now I came across a problem, the product menu loaded on the main page when...
asked by 11.06.2018 / 04:40
1
answer

Accumulating URLs in DJANGO

My urls are piling up. When I pass via tag a[href="exemplo"] it sends to url http://localhost:8000/index/ , but if I click again on some other link on the same menu, it will redirect to http://localhost:8000/index/outroloca...
asked by 18.05.2018 / 17:05
1
answer

Error deploy Heroku app Django

After deploying on Heroku, I opened the link in my application ( link ), and it displayed the following error: ProgrammingError at / relation "Produto" does not exist LINE 1: ..., "Produto"."criado", "Produto"."modificado" FROM "Produto" ....
asked by 23.05.2018 / 15:28
1
answer

Django tests are not recognized

When running Django test commands, no tests are recognized. My file structure is as follows: Eagle/ eagle/ __init__.py settings.py urls.py wsgi.py dashboard/ __init__.py admin.py apps.py forms.py mod...
asked by 30.03.2018 / 02:16
0
answers

Roadmap for deploy Pipenv (Python)

Hello, in the company where I work the firewall rules do not allow intranet-enabled servers to have access to the web. This way, working with venvs , where dependencies are installed with pipenv install , is not possible. Is there...
asked by 23.04.2018 / 01:00
2
answers

Color background of row (row) in django admin

I have a code that is working, but not totally with what I want, it is coloring only the selected cell, I want to color the entire line depending on the column's status. <script type="text/javascript"> (function($) { $(document).ready(fu...
asked by 19.02.2018 / 14:46
1
answer

Passing a GET parameter through the view in Django

I'm trying to pass a parameter via GET on the URL through the Django backend, but I'm not getting it. My url for the page I want to pass the parameter to is url(r'^(?P<short_name>\w+)/schedule/$', schedule_views.schedule, name='schedu...
asked by 01.03.2018 / 14:04
1
answer

Grouping values in Django

I'm having a bit of trouble putting together some information, from separate models. For example: I have 3 models, one call Category , another call Group and another call Tools . These tables will get the name and slug o...
asked by 16.01.2018 / 19:26
0
answers

Django-rest-framework update user from another user

I need to change users from another user. But when I call serializer.save () it is not saved in the database and does not display an error. My user model: class User(AbstractBaseUser, PermissionsMixin): class Meta: db_table='emp...
asked by 06.01.2018 / 04:49