Giter Site home page Giter Site logo

kunaldeo / django-livesettings3 Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 17.0 801 KB

Python 3 Port of django-livesettings that works with Python 3.5.X and Django 1.9+

License: BSD 3-Clause "New" or "Revised" License

Python 84.20% HTML 10.49% Shell 0.05% Svelte 4.83% JavaScript 0.44%

django-livesettings3's People

Contributors

bkroeze avatar chris1610 avatar daniell avatar edi31 avatar esalazar avatar evgenyfadeev avatar fdemmer avatar hexponent avatar hynekcer avatar jjmontalbo avatar kps avatar kunaldeo avatar nerdfiles avatar pjrobertson avatar rctay avatar sebastian-philipp avatar smacker avatar spookylukey avatar unformatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-livesettings3's Issues

The problem with django 1.10.1

I am getting error after added app.
RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Django (1.10.1)
django-keyedcache3 (1.5.3)
django-livesettings3 (1.4.19)

make a pypi release

Hi Kunal, would you be able to make a new release on pypi?
We need this to release Askbot supporting Python3 so that it's installable by pip.

'Site' object has no attribute 'value' running Python 3.6 and Django 2.1 with uWsgi

The problem occurs when the application is restarted or started the first time. It seems that self.setting strangely assumes a Site object.

Internal Server Error: /

AttributeError at /
'Site' object has no attribute 'value'

Request Method: GET
Request URL: https://lojateste.example.com/
Django Version: 2.1.7
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.6.7
Python Path: ['.', '', '/home/ballke/virtualenvs/store/lib/python36.zip', '/home/ballke/virtualenvs/store/lib/python3.6', '/home/ballke/virtualenvs/store/lib/python3.6/lib-dynload', '/usr/lib/python3.6', '/home/ballke/virtualenvs/store/lib/python3.6/site-packages', '/home/ballke/store/store/apps']
Server time: Qua, 3 Abr 2019 11:18:30 -0300
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.sitemaps',
 'rest_framework',
 'rest_framework.authtoken',
 'compressor',
 'registration',
 'keyedcache',
 'livesettings',
 'django_cron',
 'widget_tweaks',
 'django_comments',
 'ckeditor',
 'tagging',
 'mptt',
 'zinnia_bootstrap',
 'zinnia',
 'zinnia_ckeditor',
 'satchmo_store.shop',
 'satchmo_store.contact',
 'l10n',
 'satchmo_utils.thumbnail',
 'tax',
 'tax.modules.no',
 'tax.modules.percent',
 'shipping',
 'satchmo_ext.newsletter',
 'satchmo_ext.recentlist',
 'product',
 'product.modules.configurable',
 'satchmo_ext.product_feeds',
 'satchmo_ext.brand',
 'satchmo_ext.notify',
 'payment',
 'payment.modules.cielo3',
 'payment.modules.boleto',
 'payment.modules.installment',
 'payment.modules.mktplace',
 'payment.modules.pagseguro',
 'satchmo_ext.wishlist',
 'satchmo_ext.productratings',
 'satchmo_ext.satchmo_toolbar',
 'satchmo_ext.warning_messages',
 'satchmo_utils',
 'marketplace',
 'banner_rotator',
 'testing',
 'bd_erp',
 'marketplace.modules.skyhub',
 'marketplace.modules.magamobi')
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'threaded_multihost.middleware.ThreadLocalMiddleware',
 'satchmo_store.shop.middleware.SSLMiddleware.SSLRedirect',
 'satchmo_ext.recentlist.middleware.RecentProductMiddleware',
 'extra_middlewares.UrlMiddleware')


Traceback:

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in _value
  382.                 val = self.setting.value

During handling of the above exception ('Site' object has no attribute 'value'), another exception occurred:

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = self.process_exception_by_middleware(e, request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  124.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/ballke/store/store/apps/satchmo_store/shop/views/home.py" in home
  52.     return render(request, template, ctx)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/shortcuts.py" in render
  36.     content = loader.render_to_string(template_name, context, request, using=using)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader.py" in render_to_string
  62.     return template.render(context, request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  171.                     return self._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  309.                 return nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  209.                     nodelist.append(node.render_annotated(context))

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  188.             return template.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  173.                 return self._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/templatetags/cache.py" in render
  47.             value = self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  512.             return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  512.             return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  512.             return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  510.         values = {key: val.resolve(context) for key, val in self.extra_context.items()}

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in <dictcomp>
  510.         values = {key: val.resolve(context) for key, val in self.extra_context.items()}

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in resolve
  698.                 new_obj = func(obj, *arg_vals)

File "/home/ballke/store/store/apps/product/templatetags/satchmo_discounts.py" in discount_price
  148.     if config_value('TAX', 'DEFAULT_VIEW_TAX'):

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/functions.py" in config_value
  212.         return config_get(group, key).value

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in value
  466.         val = self._value()

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in _value
  399.                 log.error("%s: Could not get _value of %s", self.key, self.setting)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in _setting
  363.         return find_setting(self.group.key, self.key)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/models.py" in find_setting
  91.         raise SettingNotSet(key, cachekey=ck)

During handling of the above exception (('DEFAULT_VIEW_TAX', 'Setting::2::TAX::DEFAULT_VIEW_TAX')), another exception occurred:

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/home/ballke/store/store/apps/extra_middlewares.py" in __call__
  42.         response = self.get_response(request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  36.             response = response_for_exception(request, exc)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in response_for_exception
  90.         response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in handle_uncaught_exception
  129.     return callback(request, **param_dict)

File "./store/handler500.py" in handler500
  5.     return render(request, '500.html', status=500)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/shortcuts.py" in render
  36.     content = loader.render_to_string(template_name, context, request, using=using)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader.py" in render_to_string
  62.     return template.render(context, request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  169.                 with context.bind_template(self):

File "/usr/lib/python3.6/contextlib.py" in __enter__
  81.             return next(self.gen)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/context.py" in bind_template
  246.             updates.update(processor(self.request))

File "/home/ballke/store/store/apps/satchmo_ext/recentlist/context_processors.py" in recent_products
  10.     products = Product.objects.active_by_site().filter(

File "/home/ballke/store/store/apps/product/models.py" in active_by_site
  1097.         return self.by_site(active=True, variations=variations, **kwargs)

File "/home/ballke/store/store/apps/product/models.py" in by_site
  1103.         site = site.id

During handling of the above exception ('NoneType' object has no attribute 'id'), another exception occurred:

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _resolve_lookup
  829.                     current = current[bit]

During handling of the above exception ('BooleanValue' object is not subscriptable), another exception occurred:

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/home/ballke/store/store/apps/satchmo_ext/recentlist/middleware.py" in __call__
  44.         response = self.get_response(request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  36.             response = response_for_exception(request, exc)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in response_for_exception
  90.         response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/core/handlers/exception.py" in handle_uncaught_exception
  129.     return callback(request, **param_dict)

File "./store/handler500.py" in handler500
  5.     return render(request, '500.html', status=500)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/shortcuts.py" in render
  36.     content = loader.render_to_string(template_name, context, request, using=using)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader.py" in render_to_string
  62.     return template.render(context, request)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  171.                     return self._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  302.                     match = condition.eval(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/defaulttags.py" in eval
  875.         return self.value.resolve(context, ignore_failures=True)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in resolve
  671.                 obj = self.var.resolve(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in resolve
  796.             value = self._resolve_lookup(context)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/django/template/base.py" in _resolve_lookup
  837.                         current = getattr(current, bit)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in value
  466.         val = self._value()

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in _value
  400.                 raise (ae)

File "/home/ballke/virtualenvs/store/lib/python3.6/site-packages/livesettings/values.py" in _value
  382.                 val = self.setting.value

Exception Type: AttributeError at /
Exception Value: 'Site' object has no attribute 'value'
Request information:
USER: AnonymousUser

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
CONTENT_LENGTH = ''
CONTENT_TYPE = ''
CSRF_COOKIE = 'WUEdgil1lNfyHclxD0rW2Q8dk27BqvRoJVn2y83EUMQA4l09gh8X31OeUHIeZZW9'
CSRF_COOKIE_USED = True
DOCUMENT_ROOT = '/usr/share/nginx/html'
HTTPS = 'on'
HTTP_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING = 'gzip,deflate,br'
HTTP_CONNECTION = 'keep-alive'
HTTP_HOST = 'lojateste.example.com'
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon'
HTTP_X_FORWARDED_FOR = '177.132.85.113'
PATH_INFO = '/'
QUERY_STRING = ''
REMOTE_ADDR = '66.249.83.11'
REMOTE_PORT = '38242'
REQUEST_METHOD = 'GET'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/'
SCRIPT_NAME = ''
SERVER_NAME = 'lojateste.example.com'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.1'
uwsgi.node = b'webserver'
uwsgi.version = b'2.0.15-debian'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7f5bb03a5df8>
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'

Settings:
Using settings module store.settings.prod
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_ACTIVATION_DAYS = 7
ADMINS = "(('TI', '[email protected]'),)"
AKISMET_SECRET_API_KEY = '********************'
ALLOWED_HOSTS = ['example.com', 'www.example.com', 'lojateste.example.com', 'www.lojateste.example.com']
ALL_FLAGSHIP_STORE = [5, 2]
API_BASE = '********************'
API_HOST = '********************'
API_TIMEOUT = '********************'
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = "('satchmo_store.accounts.email-auth.EmailBackend', 'django.contrib.auth.backends.ModelBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'TIMEOUT': 86400000}, 'cache_file': {'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': '/home/ballke/store/store/cache_store', 'TIMEOUT': 86400000, 'OPTIONS': {'MAX_ENTRIES': 50000}}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CKEDITOR_UPLOAD_PATH = 'uploads/'
COMMENTS_APP = 'django_comments'
COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_COMPRESSOR = 'compressor.css.CssCompressor'
COMPRESS_CSS_FILTERS = ['compressor.filters.cssmin.CSSMinFilter']
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_JINJA2_GET_ENVIRONMENT = <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7f5bb4d95620>
COMPRESS_JS_COMPRESSOR = 'compressor.js.JsCompressor'
COMPRESS_JS_FILTERS = ['compressor.filters.yui.YUIJSFilter']
COMPRESS_MINT_DELAY = 30
COMPRESS_MTIME_DELAY = 10
COMPRESS_OFFLINE = True
COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_OFFLINE_MANIFEST = '/home/ballke/store/store/static/jars/manifest/manifest.json'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = '()'
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/home/ballke/store/store/static'
COMPRESS_STORAGE = 'compressor.storage.GzipCompressorFileStorage'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_URL = '/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar /home/ballke/store/store/static/jars/yuicompressor-2.4.8.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CONNECTION_TIMEOUT = 5
CRON_CLASSES = ['bd_erp.cron.TopSystemAPI', 'bd_erp.cron.SyncNFS', 'bd_erp.cron.SyncDadosERP', 'bd_erp.cron.DetalheProduto', 'bd_erp.cron.ImagemProduto', 'bd_erp.cron.ArquivoProduto', 'bd_erp.cron.VideoProduto', 'bd_erp.cron.SyncCategoriasMarcas', 'bd_erp.cron.DesativaConfiguraveisBallke', 'bd_erp.cron.DesativaConfiguraveisMagazine', 'bd_erp.cron.ExcluiImagensConfig', 'bd_erp.cron.AtualizaFeed', 'bd_erp.cron.AtualizaSiteClientes', 'bd_erp.cron.OldCronJobs', 'bd_erp.cron.CancelarPedidosInativos', 'bd_erp.cron.EnviaEmailsClientes', 'shipping.cron.ApplyAdjustments', 'shipping.modules.azul.cron.SendInvoices', 'shipping.modules.total.cron.SendInvoices', 'shipping.modules.total.cron.Abrangencia2Python', 'shipping.modules.jadlog.cron.SendInvoices', 'shipping.modules.jadlog.cron.Cidaten2Python', 'payment.modules.boleto.cron.ProcessaArquivos', 'payment.modules.boleto.cron.EnviaBoletos', 'product.cron.UpdateFeatured', 'product.cron.UpdateItems', 'product.cron.TaxClassEmail', 'marketplace.modules.skyhub.cron.SyncProducts', 'marketplace.modules.skyhub.cron.SyncOrders', 'marketplace.modules.magamobi.cron.AddRemoveProducts', 'marketplace.modules.magamobi.cron.UpdateProducts', 'marketplace.modules.magamobi.cron.SyncOrders']
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'ballke', 'USER': 'ballke', 'PASSWORD': '********************', 'HOST': '127.0.0.1', 'PORT': '5432', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DEBUG = False
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FLAGSHIP_STORE = 5
DEFAULT_FROM_EMAIL = 'Ballke Produtos para a Saúde <[email protected]>'
DEFAULT_GOOGLE_CATEGORY = 491
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
DJANGO_APPS = "('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.sitemaps')"
DJANGO_ROOT = '/home/ballke/store/store'
DJANGO_SETTINGS_MODULE = '/home/ballke/store/store.settings'
EMAIL_BACKEND = 'satchmo_store.smtp.EmailBackend'
EMAIL_HOST = 'smtpi.kinghost.net'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = '[email protected]'
EMAIL_PORT = 587
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[store] '
EMAIL_TIMEOUT = 10
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = "('/home/ballke/store/store/fixtures',)"
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HELPDESK_TOKEN = '********************'
HELPDESK_URL = 'http://web.example.com/helpdesk/tarefas/api/'
IGNORABLE_404_URLS = []
INSTALLED_APPS = "('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.sitemaps', 'rest_framework', 'rest_framework.authtoken', 'compressor', 'registration', 'keyedcache', 'livesettings', 'django_cron', 'widget_tweaks', 'django_comments', 'ckeditor', 'tagging', 'mptt', 'zinnia_bootstrap', 'zinnia', 'zinnia_ckeditor', 'satchmo_store.shop', 'satchmo_store.contact', 'l10n', 'satchmo_utils.thumbnail', 'tax', 'tax.modules.no', 'tax.modules.percent', 'shipping', 'satchmo_ext.newsletter', 'satchmo_ext.recentlist', 'product', 'product.modules.configurable', 'satchmo_ext.product_feeds', 'satchmo_ext.brand', 'satchmo_ext.notify', 'payment', 'payment.modules.cielo3', 'payment.modules.boleto', 'payment.modules.installment', 'payment.modules.mktplace', 'payment.modules.pagseguro', 'satchmo_ext.wishlist', 'satchmo_ext.productratings', 'satchmo_ext.satchmo_toolbar', 'satchmo_ext.warning_messages', 'satchmo_utils', 'marketplace', 'banner_rotator', 'testing', 'bd_erp', 'marketplace.modules.skyhub', 'marketplace.modules.magamobi')"
INTERNAL_IPS = []
L10N_SETTINGS = {'default_currency': 'BRL', 'show_admin_translations': True, 'allow_translation_choice': False}
LANGUAGES = "(('pt-br', 'Português'), ('en', 'English'))"
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'pt-br'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = "('/home/ballke/store/store/locale',)"
LOCAL_APPS = "('satchmo_store.shop', 'satchmo_store.contact', 'l10n', 'satchmo_utils.thumbnail', 'tax', 'tax.modules.no', 'tax.modules.percent', 'shipping', 'satchmo_ext.newsletter', 'satchmo_ext.recentlist', 'product', 'product.modules.configurable', 'satchmo_ext.product_feeds', 'satchmo_ext.brand', 'satchmo_ext.notify', 'payment', 'payment.modules.cielo3', 'payment.modules.boleto', 'payment.modules.installment', 'payment.modules.mktplace', 'payment.modules.pagseguro', 'satchmo_ext.wishlist', 'satchmo_ext.productratings', 'satchmo_ext.satchmo_toolbar', 'satchmo_ext.warning_messages', 'satchmo_utils', 'marketplace', 'banner_rotator', 'testing', 'bd_erp')"
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'formatters': {'standard': {'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'}}, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'default': {'level': 'WARNING', 'class': 'logging.handlers.RotatingFileHandler', 'filename': '/home/ballke/store/store/logs/store.log', 'maxBytes': 2097152, 'backupCount': 5, 'formatter': 'standard'}, 'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler', 'include_html': True}}, 'loggers': {'': {'handlers': ['default'], 'level': 'WARNING', 'propagate': True}, 'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/accounts/profile/'
LOGIN_URL = '/accounts/registro/login/'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = '/accounts/logout/'
MANAGERS = "(('TI', '[email protected]'), ('ADM', '[email protected]'), ('MKT', '[email protected]'), ('CD', '[email protected]'), ('CAD', '[email protected]'))"
MARKETPLACE_MODULES = "('marketplace.modules.skyhub', 'marketplace.modules.magamobi')"
MEDIA_ROOT = '/home/ballke/store/store/media'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = "('django.middleware.gzip.GZipMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'threaded_multihost.middleware.ThreadLocalMiddleware', 'satchmo_store.shop.middleware.SSLMiddleware.SSLRedirect', 'satchmo_ext.recentlist.middleware.RecentProductMiddleware', 'extra_middlewares.UrlMiddleware')"
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
ONLY_MANAGERS = "(('ADM', '[email protected]'), ('MKT', '[email protected]'), ('CD', '[email protected]'), ('CAD', '[email protected]'))"
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
REMOVE_WWW = True
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication',), 'DEFAULT_PARSER_CLASSES': ('rest_framework.parsers.JSONParser',)}
ROOT_URLCONF = 'store.urls'
SATCHMO_DIRNAME = '/home/ballke/store/store'
SATCHMO_SETTINGS = {'SHOP_BASE': '', 'MULTISHOP': True, 'SHOP_URLS': [<URLResolver <module 'l10n.urls' from '/home/ballke/store/store/apps/l10n/urls.py'> (None:None) 'i18n/'>, <URLPattern '' [name='satchmo_shop_home']>, <URLPattern 'favicon\.ico' [name='get_favicon']>, <URLPattern 'admin/clear_cache/' [name='satchmo_clear_cache']>, <URLPattern 'menu/category/format=json' [name='satchmo_shop_menu']>, <URLPattern 'add/' [name='satchmo_smart_add']>, <URLPattern 'carrinho/' [name='satchmo_cart']>, <URLPattern 'carrinho/accept/' [name='satchmo_cart_accept_terms']>, <URLPattern 'carrinho/add/' [name='satchmo_cart_add']>, <URLPattern 'carrinho/add/ajax/' [name='satchmo_cart_add_ajax']>, <URLPattern 'carrinho/qtd/' [name='satchmo_cart_set_qty']>, <URLPattern 'carrinho/qtd/ajax/' [name='satchmo_cart_set_qty_ajax']>, <URLPattern 'carrinho/remove/' [name='satchmo_cart_remove']>, <URLPattern 'carrinho/remove/ajax/' [name='satchmo_cart_remove_ajax']>, <URLResolver <module 'payment.urls' from '/home/ballke/store/store/apps/payment/urls.py'> (None:None) 'checkout/'>, <URLPattern 'contato/' [name='satchmo_contact']>, <URLPattern 'historico/' [name='satchmo_order_history']>, <URLPattern '^acompanhamento/(?P<order_id>\d+)/$' [name='satchmo_order_tracking']>, <URLPattern 'busca/' [name='satchmo_search']>, <URLPattern 'busca-ajax/' [name='satchmo_autocomplete_search']>, <URLPattern 'busca-ajax-segura/' [name='satchmo_autocomplete_search_secure']>, <URLPattern 'add-to-cart/' [name='add_to_cart']>, <URLPattern '^admin/print_voucher/(?P<payment_id>\d+)/$' [name='print_voucher']>, <URLPattern 'nossas-lojas/' [name='subs_list']>, <URLPattern 'ajuda/' [name='help']>, <URLPattern '^ajuda/(?P<slug>[-\w]+)/$' [name='help_topic']>, <URLPattern 'institucional/' [name='institutional']>, <URLPattern '^institucional/(?P<slug>[-\w]+)/$' [name='institutional_topic']>, <URLPattern 'downloads/' [name='downloads']>, <URLResolver <module 'satchmo_ext.brand.urls' from '/home/ballke/store/store/apps/satchmo_ext/brand/urls.py'> (None:None) 'marcas/'>, <URLResolver <module 'satchmo_ext.notify.urls' from '/home/ballke/store/store/apps/satchmo_ext/notify/urls.py'> (None:None) 'notification/'>, <URLPattern 'pedidos/api/' [name='api_get_order']>, <URLResolver <module 'product.urls.products' from '/home/ballke/store/store/apps/product/urls/products.py'> (None:None) 'produtos/'>, <URLResolver <module 'product.urls.category' from '/home/ballke/store/store/apps/product/urls/category.py'> (None:None) 'categorias/'>, <URLPattern 'contato/obrigado/' [name='satchmo_contact_thanks']>, <URLPattern 'sitemap.xml'>, <URLPattern 'sitemap-products.xml'>, <URLPattern 'sitemap-<section>.xml' [name='django.contrib.sitemaps.views.sitemap']>, <URLPattern 'produtos/api/busca/' [name='api_product_search']>, <URLResolver <module 'satchmo_ext.product_feeds.urls' from '/home/ballke/store/store/apps/satchmo_ext/product_feeds/urls.py'> (None:None) 'feed/'>, <URLResolver <module 'satchmo_ext.newsletter.urls' from '/home/ballke/store/store/apps/satchmo_ext/newsletter/urls.py'> (None:None) 'newsletter/'>, <URLResolver <module 'satchmo_ext.wishlist.urls' from '/home/ballke/store/store/apps/satchmo_ext/wishlist/urls.py'> (None:None) 'lista-de-desejos/'>], 'BRAND_SLUG': 'marcas', 'CATEGORY_SLUG': 'categorias', 'PRODUCT_SLUG': 'produtos', 'SSL': True}
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = '[email protected]'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'store.settings.prod'
SHOP_BASE_URL = ''
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SIMILARITY_RATIO = 0.85
SITE_ID = 1
SITE_NAME = 'store'
SITE_ROOT = '/home/ballke/store'
SKIP_SOUTH_TESTS = True
SSL = True
SSL_FULL = True
STATICFILES_DIRS = "('/home/ballke/store/store/assets',)"
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/home/ballke/store/store/static'
STATIC_URL = '/static/'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/ballke/store/store/templates'], 'OPTIONS': {'loaders': ['app_namespace.Loader', ('django.template.loaders.cached.Loader', ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader'))], 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'zinnia.context_processors.version', 'satchmo_store.shop.context_processors.settings', 'satchmo_store.contact.context_processors.context', 'product.context_processors.storewide_objects', 'shipping.context_processors.settings', 'satchmo_ext.brand.context_processors.storewide_objects', 'satchmo_ext.recentlist.context_processors.recent_products', 'satchmo_ext.warning_messages.context_processors.settings', 'payment.modules.boleto.context_processors.settings', 'payment.modules.pagseguro.context_processors.settings']}}]
TEMPLATE_DEBUG = False
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THIRD_PARTY_APPS = "('rest_framework', 'rest_framework.authtoken', 'compressor', 'registration', 'keyedcache', 'livesettings', 'django_cron', 'widget_tweaks', 'django_comments', 'ckeditor', 'tagging', 'mptt', 'zinnia_bootstrap', 'zinnia', 'zinnia_ckeditor')"
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'America/Sao_Paulo'
TOP_BRANCH = 5
TOP_ENCODING = 'iso-8859-1'
TOP_HOST = 'web.example.com'
TOP_MAX_REGISTERS = 10000
TOP_PASSWORD = '********************'
TOP_PATH = '/datasnap/rest/'
TOP_PORT = 8074
TOP_TERMINAL = 2
TOP_URL = 'http://web.example.com:8074/datasnap/rest/'
TOP_USER = 13
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = False
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'
ZINNIA_SPAM_CHECKER_BACKENDS = "('zinnia.spam_checker.backends.automattic',)"

Incorrect jQuery reference in settings view

Getting the following error in settings view

Failed to load resource: the server responded with a status of 404 (OK)
jquery.init.js:8 Uncaught ReferenceError: jQuery is not defined

Livesettings doesn't cache for values not stored in the db

Steps to reproduce:

  1. Set up some livesettings with config_register
  2. Make sure to set 'default' values in config_register. E.g.:
...
MYAPP_GROUP = ConfigurationGroup('MyApp', _('My App Settings'), ordering=0)
config_register(
        DecimalValue(
                MYAPP_GROUP,
                'ELECTRICITY_COST',
                description="Electricity cost ($)",
                default=1
                help_text="The cost of electricity per kwh"
                )
        )
  1. Run django and confirm that the setting does not exist in the db:
select * from livesettings_setting;
# should be empty
  1. Now, run a method that access the setting multiple times in your view:
for i in range(0,1000):
    config_value('MyApp' 'ELECTRICITY_COST')
  1. Note how livesettings hits the DB every time to try and access the setting, however since the setting doesn't exist in the DB, find_setting() raises a SettingNotSet and then _value() here falls back to getting the default value.

Expected Behaviour

Default values that don't yet exist in the database should still be cached.

Two possible solutions:

  1. Load default values into the database on every startup of the app - to make sure the values exist in the DB
  2. Cache the default values as well, so we don't have to hit the db

missing app_label in models.Setting

Hello, I made a PR fixing this issue

#18

Could you please merge and release an update if the above PR is acceptable?

I've been getting this exception:

RuntimeError: Model class livesettings.models.Setting doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

release 1.4.21?

Hi, is the latest version stable? If so - could you please publish on pypi? Thanks!

add support for Django 4

Hi @kunaldeo could you merge my PR please and release a version please?

Also - in case you don't have the time to maintain this - perhaps you could give me a right to commit and publish on pypi? I'm using it in my project and plan to add some functionalities, such as new types of values, improve the UX.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.