Questions tagged as 'django'

2
answers

queryset to bring records less than one specific one

I have a view based on classes in which I have a function that performs a query in one of the models: def get_sympatizers_to_reference(self): if self.request.GET.get('q'): self.q = self.request.GET.get('q')...
asked by 12.08.2017 / 02:09
0
answers

Load data from the database with AJAX in a table in my UpdateView template

I want to load the saved data that are in the database of question options, I have in my model class Pregunta(models.Model): contenido = models.TextField(max_length=1000, blank=False, help_text="Entre la pregunta que quiere que se muestre:...
asked by 24.07.2017 / 23:52
1
answer

represent in Json a filter (). values ()

Friends, I've been trying to represent this in json but I could not miguel <QuerySet [<Libro: hunger games>, <Libro: sherlock holmes jose <QuerySet [<Libro: divergente>, <Libro: sherlock holmes>]> this is the c...
asked by 08.09.2017 / 17:42
1
answer

The ManytoMany relationship is not performed

I have the following models : class Persona(models.Model): cedula = models.CharField(max_length=12, unique=True, null=False, blank=False) rol = models.ManyToManyField('Rol') cuenta = models.OneToOneField(settings.AUTH_USER_MODEL,...
asked by 08.09.2017 / 19:34
1
answer

Format the scrapy spider response.css result

When I execute my spider the value I want to get I save them in a dictionary, but I also want to create a folder with the name of one of the results def parse(self, response): ml_item = ScrapyItem() mt_item = ScrapyItem()...
asked by 23.06.2017 / 08:37
0
answers

How to use word truncatewords in django?

I have the following code that cuts out the words but, I can not show the content that was already clipped Code where I use the truncateword <td class=" "><h5>{{ correspondencia.referencia| truncatewords:"4" }}</h5><a...
asked by 28.07.2018 / 01:12
0
answers

Safety traces in Django [closed]

I would like to know how Django manages the security traces, that is, the record of what each user did to have a better control of what is done in the application ...     
asked by 22.05.2017 / 15:06
0
answers

Django and Oracle

I have a django project that I need to connect to an Oracle database When I use sqlite3, which comes by default with the following string: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.pat...
asked by 12.05.2017 / 16:57
0
answers

Migration Django 1.10 a 1.11 Error environment can only contain strings

Recently I actulize django from its version 1.10 to 1.11 and the console sends me the following error Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "C:\User...
asked by 12.05.2017 / 15:38
0
answers

Problems uploading images using django formsets

Good day the reason why I make this entry is because I am struggling to load images using django forms, when creating a new product two forms appear to load two more images, the problem is that when loading all the forms if they create these rec...
asked by 30.03.2017 / 22:54