Exemplo n.º 1
0
 def meta(*args, **kwargs):
     if not args and kwargs:
         return lambda classobj: settingsobj.Settings()._register(
             appname, classobj, **kwargs)
     if len(args) != 1:
         raise TypeError, "register(classobj) takes one argument, %d given" % (
             len(args))
     return settingsobj.Settings()._register(appname, args[0], **kwargs)
Exemplo n.º 2
0
 def setUp(self):
     settingsobj.Settings._reset()
     self.settings = settingsobj.Settings()
     register = appsettings.register('test')
     register(Cheese)
     register(readonly=True)(RDOnly)
     register(Globals, main=True)
Exemplo n.º 3
0
__FILENAME__ = admin
import appsettings
from django.contrib import admin
from appsettings.models import Setting

if appsettings.SHOW_ADMIN:
    admin.site.register(Setting)

# vim: et sw=4 sts=4

########NEW FILE########
__FILENAME__ = app
import settingsobj

settings = settingsobj.Settings()
if not settingsobj.Settings.discovered:
    from appsettings import autodiscover
    autodiscover()

# vim: et sw=4 sts=4

########NEW FILE########
__FILENAME__ = fields
from django.forms import widgets
from django import forms
from django.utils import simplejson
#from django.core import validators


class ListWidget(widgets.Input):
    input_type = 'text'