Questions tagged as 'django'

1
answer

How to change is_staff when I click on href?

I have a table with users in HTML with id and name, by default when registering a person it comes with is_staff = False. I want when I click the Authorize link change to is_staff = True, how do I do this in the view? {% block content %}...
asked by 14.09.2017 / 19:16
1
answer

Django - CPF Mask, DDD and phone number

I need to put a mask on entering the CPF, DDD and phone number. I'm a beginner in Python and Django and would like to know how I can display this mask at the time of typing: For the CPF: 999.999.999-99. For the Telephone: (99) 99999-9999....
asked by 26.08.2017 / 04:58
1
answer

Makefile does not work on MINGW64. Can someone help me?

I'm programming in python in Django with Sublime Text 3, using Git Bash MINGW64. I created the makefile but when I run I get "bash: make: command not found"     
asked by 31.05.2017 / 05:10
1
answer

Is there a Tag in Django to show part of the text?

I would like to know if there is any tag to show part of a description {{ post.description | tag-aqui }}     
asked by 07.07.2017 / 20:29
1
answer

How to redirect url with argument to another page in Django? (UpdateView, GenericView)

Well, I have a very pertinent question. I have a django editing class, and when I edit the user, I need it to call the detail class of it (DetailView), the two classes are working, but when I call the url that sends the DetailView, it gives an e...
asked by 05.06.2017 / 16:08
1
answer

How do I integrate my Django project with Scrapy? [closed]

I want to develop a simple project using Django where I will create a web page and this page will capture data from other pages. The problem is that I can not integrate Scrapy with Django .     
asked by 26.04.2017 / 14:28
1
answer

Django formset, calculate total with JQuery

I have my order items being displayed with formset, the quantity and price columns are editable. I can not calculate the total after changing the price or quantity. I can identify the value typed by pressing enter, but how could I get the price...
asked by 07.04.2017 / 05:04
1
answer

Django does not create admin.py file in new app

I'm following some video lessons about Django to make some changes in a project started some time by someone else. However, starting a new app in this project with the django-admin start app mad files are created: __init__.py ,...
asked by 08.02.2017 / 03:00
1
answer

QuerySet model Category, Product and ProductImage

Hello, help me build this queryset. Briefly, the model model.py class Category(models.Model): name = models.CharField('Nome', max_length=100) slug = models.SlugField(max_length=100, unique=True) created = models.DateFiel...
asked by 08.02.2017 / 00:09
1
answer

Reportlab in Heroku - Error of words with accent

I am generating reports with reportlab But when you have words with an accent, I'm taking 500 Internal Server Error no Heroku . Localhost works perfectly. I tried the following did not work reports.py # -*-...
asked by 17.03.2017 / 01:14