Questions tagged as 'django'

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 / 17:18
1
answer

Queryset with 2 fields of a table - Django Rest Framework

I want to make a filter with 2 fields of the user model of django first_name and last_name In this way: queryset = User.objects.annotate(search_name=Concat('first_name', Value(' '), 'last_name')) queryset.filter(search_name__icontains='Pru...
asked by 30.06.2018 / 19:23
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 / 13:43
0
answers

Retrieve record in a DATATABLE to be able to edit it - Django

I have a form in which the following data is recorded: ORIGEN , CANTIDAD , DEFECTO , COMPONENTE , COMENTARIO and% DATATABLE a ITEM is selected. Once the information is captured, the record is saved...
asked by 16.07.2018 / 23:20
2
answers

Image Background project djgango

I'm playing with a quite old project (django 1.5.12) and I do not know how to set a background image for the main screen, I do not have much knowledge in css, in advance thank you very much. I have attached the code of my html: in place...
asked by 09.07.2018 / 19:27
0
answers

Manupular admin forms in Django

I am using inline in an admin admin in django, I create 4 forms def get_min_num(self, request, obj=None, **kwargs): return 4 def get_max_num (self, request, obj = None, ** kwargs):     return 4 However, I have a field that I need to...
asked by 09.07.2018 / 20:41
0
answers

Select Databases + Django

I'm doing a page that works with 2 postgresql database managers and sql server, postgres is on the application server and sql server can be on the same server or on another server my question is how can I connect with the server sql server being...
asked by 19.06.2018 / 15:57
1
answer

Get MAC in Django / python from a Device that accesses a certain URL

I want to get the mac from a device when the device runs or accesses the URL: 127.0.0.1/Response, which is defined in URLs such as: url (r '^ answer $', app.views.resviewViewiew, name = 'Reply'), from uuid import getnode as get_mac def respue...
asked by 15.06.2018 / 21:10
0
answers

CRUD for nested servers django-rest-framework

I have the following model class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) avatar = models.FileField(upload_to='users', default='users/default.png', null=True, blank=True) r...
asked by 14.06.2018 / 23:53
0
answers

I need to pass parameters by HttpResponse or in which case I look for an alternative from a pdf generator

Good afternoon dear stackoverflow friends. I have a code that runs very well is a pdf generator from django. By means of which prints a html document as a common pdf and my current desire is to be able to pass parameters, that is, any diction...
asked by 13.06.2018 / 21:43