I\'m trying to do something that I thought would be simple, but it has proven a bit challenging for me right now.
I am trying to build a simple ATM system for Banknotes
Everything looks fine in your model. You will have just a single row which will get be updated after it gets created first.
Firstly create the object of Cedula
from app.models import Cedula
cedula = Cedula()
cdeula.save() # This will instantiate the row with all entries 0.
For updating you have to perform this
from app.models import Cedula
from django.db.models import F
cedula = Cedula.objects.all()[0]
cedula.dios = F('dios')+ 2 # Here adding 2 or any number which you want to update with
cedula.vinte = F('vinte') -5 # Here subtracting with 5 or again number which you want to update with
cedula.save()
Usually for the models which don't have much relational things to do or single entries in them it is best to create their object in a seprate start script and run them before running your server. So that database can populate the content before.