How to use simpleui - 8 common examples

To help you get started, we’ve selected a few simpleui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newpanjing / simpleui / simpleui / templatetags / simpletags.py View on Github external
if get_analysis_config() == False:
            return ''

        # 理论上值一天只上报一次
        key = 'simpleui_' + time.strftime('%Y%m%d', time.localtime())

        if key in context.request.session:
            return ''

        b64 = ""
        j = {
            "n": platform.node(),
            "o": platform.platform(),
            "p": platform.python_version(),
            "d": django.get_version(),
            "s": simpleui.get_version(),
        }
        if 'theme_name' in context.request.COOKIES:
            j['t'] = context.request.COOKIES['theme_name']
        else:
            j['t'] = 'Default'

        b64 = base64.b64encode(str(j).encode('utf-8'))

        url = '//simpleui.88cto.com/analysis'
        b64 = b64.decode('utf-8')
        html = ''.format(url, b64);
        context.request.session[key] = True

        return mark_safe(html)
    except:
        return ''
github newpanjing / simpleui / setup.py View on Github external
from setuptools import setup
import simpleui

if sys.version_info < (3, 0):

    long_description = "\n".join([
        open('README.rst', 'r').read(),
    ])
else:
    long_description = "\n".join([
        open('README.rst', 'r', encoding='utf-8').read(),
    ])

setup(
    name='django-simpleui',
    version=simpleui.get_version(),
    packages=['simpleui'],
    zip_safe=False,
    include_package_data=True,
    url='https://github.com/newpanjing/simpleui',
    license='Apache License 2.0',
    author='panjing',
    long_description=long_description,
    author_email='newpanjing@icloud.com',
    description='django admin theme 后台模板',
    install_requires=['django'],
    classifiers=[
        "Programming Language :: Python :: 3",
        "Operating System :: OS Independent",
    ],
github newpanjing / simpleui / simpleui / templatetags / simpletags.py View on Github external
def get_app_info():
    dict = {
        'version': simpleui.get_version()
    }

    return format_table(dict)
github matcom / autoexam / autoexam.py View on Github external
def simpleui(args):
    import simpleui.app as sui
    sui.run(args)
github newpanjing / simpleui / simpleui / templatetags / simpletags.py View on Github external
def date_to_json(obj):
    return json.dumps(obj.date_params, cls=LazyEncoder)
github newpanjing / simpleui / simpleui / templatetags / simpletags.py View on Github external
def default(self, obj):
        if isinstance(obj, Promise):
            return force_text(obj)
        return super(LazyEncoder, self).default(obj)

simpleui

django admin theme 后台模板

MIT
Latest version published 29 days ago

Package Health Score

77 / 100
Full package analysis

Similar packages