I am receiving the following error on my page made with django.
Reverse for 'subscribed' with keyword arguments' {'name': u'ImHarvol '}' not found. 1 pattern (s) tried: ['edoras / newsletter / subscribed $']
The page consists of a form...
I have a CreateView view to which I am sending a parameter by url, my question is how can I take that parameter to save it in one of the fields of the model?
View:
class ReferenciarSimpatizanteCreateView(CreateView):
model = Referencia...
You see, I have the following view:
class contenido_adicional(View):
def get(self,request):
form=bonus()
return render(request,'privilegio.html',{'forma':form})
def post(self,request):
form=bonus(request.POST)...
Good afternoon friends, I am creating an app in Django 1.10 and I have a model where the basic data of the people will be stored, this model includes a dateNaciento field, in this model create a method which calculates the age of the people ....
I have a problem that I do not know how to solve it. I have three models in my app:
class Hecho(models.Model):
codigo = models.CharField(max_length=1)
hecho = models.CharField(max_length=100)
class Beneficiario(models.Model):
tipo...
This code throws me the error:
matching query does not exist
Apparently the filter I have designed does not capture the id of the Orders.
Code:
models.py:
class Pedido(models.Model):
especialidad = models.ForeignKey('Especi...
I tried to render 3 forms with Class-based views in a single template but I did not succeed, so I decided to do something like this with a method: def formTortas(request): ....
where I call my 3 forms defended in Forms.py in this way,...
I have a problem where I want to subtract two fields and then update a record, which would be cantidad - stock , and the latter would be the modified one, here the model:
models.py:
class Pedido(models.Model):
especialidad = m...
I have these models:
class TablaA(models.Model):
estado = models.BooleanField()
# mas campos...
class TablaB(models.Model):
tabla_a = models.ForeignKey(TablaA)
estado = models.BooleanField()
# mas campos...
class TablaC(m...
I am trying to return the elements of the table professionals and the next page, both data in a JSON. The problem arises when I see the JSON that is returned: my professionals model is a string, not an array of objects. Here I leave my co...