views.py 266 B

123456789101112
  1. from django.shortcuts import render
  2. from .models import *
  3. def getConfig(indice=None):
  4. if not indice:
  5. return ""
  6. c = Config.objects.get(indice=indice)
  7. if c: #qualcosa ha trovato
  8. print('getConfig',c.indice,': ',c.valore)
  9. return c.valore
  10. return ""