Good morning,
The problem I have is that I want to concatenate an int with a string in a Django template, but when I try it, I return an empty value. This is my code:
{% with "object_"|add:obj.id as check_id %}
El objeto es {{check_id}}
{%...
I have a regular expression defined to capture optional parameters in a view.
url(r'^lista/((?P<tematica>[0-9]+)/(?P<pageIndex>[0-9]+)/(?P<pageSize>[0-9]+))|/$', views.PinturasListView.as_view(), name='lista')
in theory,...
Good afternoon,
I'm trying to create my project in Django but when I run the command "django-admin createproyect project_name" it gives me the following error:
No Django settings specified.
Unknown command: 'createproyect'
Type 'djang...
I have a model like this:
class EdicionPrograma(models.Model):
nombre_programa = models.ForeignKey(Programa)
edicion = models.CharField(
verbose_name="Edicion",
blank=False,
max_length=100
)
curso = models.Char...
Good evening
I'm trying to create a view in Django and doing the runserver gives me the following error:
Performing system checks ...
Unhandled exception in thread started by Traceback (most recent call last): File
"C: \ Python27...
I am testing the creation of an object and would like to know how to do the test to make an assert in case the object could not be created.
For example:
def test_expediente_sin_nombre(self):
try:
Expediente.objects.create(...
Hi, I have a model that inherits from AbstractUser:
Models.py
class Usuario(AbstractUser,models.Model):
dni=models.CharField(
verbose_name="DNI",
max_length=9,
blank=False,
)
clave = models.CharField(...
I have a code which should allow me to update the field = status, by 'delivered' this is the index.html where the button is:
<form action="/some/url/mapped/to/pedido_sub/view/">
<input type="submit" name="Aprobar" class="btn btn...
The point is to make an accounting entry. I'm using the admin of django and when I create a seat I must use two accounts (which already exist in the table account) and those add or subtract the value that entered the seat (total), the thing is t...
I have a Django project related to energy consumption, through which I visualize the consumption of a household during a month. To obtain that information, I use the following code:
consumos = Measurement.objects.filter(idhogar=hogar)
filtrado...