Uliweb

Latest version: v0.6

Safety actively analyzes 630026 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.2.5

-----------------

* Fix config template and add `uwsgi` shell support
* Add environment variables support in `settings.ini`. For example, there is a
`MYSQL_PORT` defined in environment, so you can defined something in settings.ini:


[DEFAULT]
port = $MYSQL_PORT
port_str = '${MYSQL_PORT}'


`$MYSQL_PORT` is the same as `${MYSQL_PORT}`. Just when the variable follows
identifier, so `${}` can easily separate between them.
* Add `STATIC_COMBINE_CONFIG` configuration, you can toggle static combination with it.
Default is False. The configuration is:


[STATIC_COMBINE_CONFIG]
enabled = False

* Fix objcache app bug, if not fields defined in settings, it'll use all columns of table
* Add `get_table` function to `functions`, you can use it to get table object. Used
in `uliweb.contrib.tables` app.
* Add `local_cache` to local in SimpleFrame, and it can be used to store require relative
cache values, and it'll be empty after each require process.
* Improve `get_object()` function in ORM, add `use_local` parameter, so the cached
value will be checked in `local_cache` first, and also save it in local_cache when
get a value from cache or database.
* Improve objcache config format, you can also define table like this:


user = {'fields':['username'], 'expire':expire_time, 'key':callable(instance)|key_field}
or
user = ['username', 'nickname']
or
user =


If no fields defined, it'll use all fields of Model. And if expire is 0 or
not defined, it'll not expired at all.

`key` will be used to replace `id`, if you want another key value, and it
can be also a callable object, it'll receive an instance of Model parameter,
so you can create any key value as you want.
* Add Optimistic Concurrency Control support for ORM, so you should defined `version`
Field first in Model, then when you save the object, you should use:


obj.save(occ=True)


If there is already other operation saved the record, it'll raise an `SaveError`
Exception by default, because the version has been changed. You can also pass:

* `occ_fieldname` used to defined the version fieldname, default is `version`
* `occ_exception` used to enabled Exception raised, default is `True`, if you
set it `False` it'll return False, but not raise an Exception.

0.2.4

-----------------

* Fix ORM is not compatible with SQLAlchemy 0.9.1. Old style:


cond = None
cond = (Blog.c.id==5) & None


will not right in 0.9.1, because None will not be skipped, so you can change
above code `cond = None` to :


from sqlalchemy.sql import true
cond = true()


or


from uliweb.orm import true
cond = true()


* add `__contains__` to functions, so you can test if an API is already defined, just
use:


'flash' in functions

* Refact generic.py, remove `functions.flash` and `functions.get_fileserving` dependencies by default.

* Fix `yield` support in view function, you can also used in gevent environment, for example:


expose('/test')
def test():
yield "<ul>"
for i in range(10):
yield "<li>%d</li>" % (i + 1)
sleep(1)
yield "</ul>"


* Fix `rawsql()` bug for different database engine
* Fix `jsonp()` dumps Chinese characters bug
* Add `trim_path()` function to `utils/common.py`, it can trim a file path to
limited length, for example:


>>> a = '/project/apps/default/settings.ini'
>>> trim_path(a, 30)
'.../apps/default/settings.ini'


Default limited length is 30.
* Add ORM connection information output when given `-v` option in command line. And
the password will be replace with `'*'`. For example:


$>uliweb syncdb -v
Connection : mysql://blog:***localhost/blog?charset=utf8

[default] Creating [1/1, blog] blog...EXISTED

* Add multiple apps support for `makeapp` command, so you can use :


uliweb makeapp a b c


to create `a`, `b`, `c` apps at once time.
* Refactor `save_file()` process, add `headers` and `convertors` parameter.

`headers` used to create csv header instead of using column name, but you can
create alias name like this:


User.c.username.label(u"Name")


and `convertors` used to convert column value, for example:


def name(value, data):
"""
value is the column value
data is the current record object
"""
return value + 'test'
save_file(do_(select([User.c.name])), 'test.csv', convertors={'name':name})

* Fix `call_view()` invoke `wrap_result` bug. Missing pass `handler` parameter to wrap_result.

0.2.3

-----------------

* Update nginx support output, add proxy_set_header
* Add `save_file()` function to orm, so you can save select result to a csv file
* Add `save_file()` method to Result.
* Fix missing `clear()` function of SortedDict.
* Fix i18n process, for project and apps extraction, it'll create application first, so that
user defined tag will be registered correctly. But user defined tag will be limited later.
* Add `walk_dirs()` to utils/common.py. This function can ignore some files and file ext,
and supports fnmatch pattern.

0.2.2

-----------------

* Add `clear()` to SortedDict
* Add protect for form to generic AddView and EditView, default is enabled, so
user can't submit a form multiple times.
* Add `--blocks` parameter to `uliweb find -t templatefile --blocks`, it'll display
all blocks defined in template. With `--with-filename` will display template filename
also.
* ini replace variable will be moved to the end of section
* Add content-range support for filedown thanks to zhangchunlin
* Improve `import_attr()`, support pkg_resource entry point string format, 'module:object.attr'
* Add requirements.txt to uliweb.contrib.orm, install: SQLAlchemy, MySQL-python, alembic first
* Add logo files
* Fix find -t --blocks bug
* Add `DEBUG_TEMPLATE` option to settings/GLOBAL, if it's `True`, then all blocks in a template
will be surrounded by comment code just like:


<!-- BLOCK title (apps/theme/templates/theme/skeleton.html) -->
<!-- END title -->


But this output may breaks template output, so make sure you just use it in debug mode.
* Add `--color` option to runserver, default is False. The log output will be colored by default.
And you can change it in `[LOG.COLORS]`. Color supported is: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE.
* Add `config` command support. It'll create config file to console. You can also
define your own config file structure to support this command in apps. Just set `template_files/config`,
and write `xxxxx.conf` and even `xxxxx.ini`, in `xxxxx.ini` you can set variables
and default values which used in `xxxxx.conf`. So `xxxxx.conf` can have template
variables.
* Improve `support` command, also support file structure defined under apps.
* Fix template normcase bug, changed to normpath.
* Refactor ORM Reference, OneToOne, ManyToMany init process, it'll be lazy initialized, and
you should use get_model to get the Model. Because of lazy process, when two
Models are in same models.py, and they have relationship with them, the reversed
properties will not assigned to reference class like before, you should use
get_model to get those models.
* Make get_model() set_model() don't distinquish case
* Fix expose for two different view functions but with the same URL does not keep the last one bug
* Fix rabc init not using functions.has_role and functions.has_permission.
* Fix rules.py bug
* Fix rule process, add expose(replace, template) support
* Revert ORM.NULLABLE = True

0.2.1

-----------------

* Add `uliweb.utils.timeit` module, use can use timeit(prompt) to calcalate the
time used about a code block
* change default file_serving action parameter value to `None`
* Fix Reference validate bug

0.2

-----------------

* Fix auth.models `get_href` bug
* Change ORM `save()` process, it'll keep the manytomany data, before will
remove them from data
* Add changed, saved and send_disptach to save() function.
* Improve `set_echo()`, add time, explain, caller parameters.
* Add `get_caller()` to utils.common module.
* Add `CheckboxSelectField` to form.
* Add `jsonp` function, just like json.
* Fix rule merge bug
* Improve `get_redis(**options)` enable pass parameters to it.
* Improve `jsonp()` only alphabetic and number available in `callback` parameter
* Improve pyini, support cross section variable referer and lazy process support
* Improve load command, add total records and used time display, and also use bulk
insert
* add `test_image` function in `uliweb/utils/image.py`
* add xhr_redirect_json support. When you start uliweb application, you can pass
xhr_redirect_json(boolean) to it, and default value is True. It means if the request
is ajax, so the redirect will be returned as a json result with 500 status code.
So the frontend can use it to redirect as what it wants.
* ORM remove/clear empty condition will delete all records
* Add `classonlymethod()` to uliweb.utils.common, it just likes classmethod, but
it'll limit only class object can invoke the method rather than instance object.
* Refactor upload app, add `download` to functions
* Improve secretkey app, add `-o` to specify output file. Add `keyfile` to most functions.
* Add `MIME_TYPES` section to upload app, but it'll only effect with uliweb application, but not web server
* Improve call command, enable call modules ouside apps directory, and add project path to sys.path
* Fix orm PICKLE update bug, use deepcopy to save old_value.
* Add tornado server support.
* Add gevent and gevent-socketio server support.
* Add install command support, you can write requirements.txt in project directory or app directory.
* Add create setup.py while makeproject
* `make_application()` can reenter
* Add `ORM/MODELS_CONFIG` support

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.