- 12 Feb, 2014 1 commit
-
-
Phil Schleihauf authored
This is an issue for fields whose name might be changed at any point, like any image ending in "jpeg" (which will be renamed to "jpg". That would cause the actual file to be saved to disk with ".jpeg", but be saved elsewhere as ".jpg". This example (mostly copied from the example in `examples/forms/simple.py`) shows it better than I can explain: import os from flask import Flask from flask.ext.admin import Admin, form from flask.ext.admin.contrib import sqla from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///hello.db' db = SQLAlchemy(app) os.path.isdir('static') or os.mkdir('static') class Photo(db.Model): id = db.Column(db.Integer, primary_key=True) path = db.Column(db.Unicode(128)) class PhotoView(sqla.ModelView): form_extra_fields = {'path': form.ImageUploadField('Photo', base_path='static')} admin = Admin(app, 'Photos are broken!') admin.add_view(PhotoView(Photo, db.session)) db.create_all() app.run(debug=True) ... try uploading files with `.jpeg` vs `.jpg` extensions. It's pretty broken.
-
- 03 Feb, 2014 3 commits
-
-
Serge S. Koval authored
_get_dir_url() may be called without a path
-
Matthias Urlichs authored
one positional instead of keyord parameter gettext(gettext()) => gettext()
-
Matthias Urlichs authored
-
- 02 Feb, 2014 8 commits
-
-
Serge S. Koval authored
-
Serge S. Koval authored
-
Serge S. Koval authored
-
Serge S. Koval authored
ONETOMANY should not be InputRequired.
-
Serge S. Koval authored
-
Serge S. Koval authored
-
Serge S. Koval authored
Apply `type_formatter` after `column_formatter` in list view.
-
Serge S. Koval authored
-
- 28 Jan, 2014 3 commits
-
-
Iuri de Silvio authored
-
Serge S. Koval authored
Added missing translation for 'save and continue'
-
Raz0r authored
-
- 22 Jan, 2014 2 commits
-
-
Serge S. Koval authored
prettify file size format
-
Raz0r authored
Apply Jinja2 filter "filesizeformat" to filesize values
-
- 21 Jan, 2014 2 commits
- 19 Jan, 2014 1 commit
-
-
Serge S. Koval authored
-
- 16 Jan, 2014 1 commit
-
-
Serge S. Koval authored
-
- 15 Jan, 2014 2 commits
-
-
Serge S. Koval authored
-
Serge S. Koval authored
-
- 09 Jan, 2014 2 commits
-
-
Serge S. Koval authored
Fix two small code error in examples.
-
Xiao Hanyu authored
-
- 06 Jan, 2014 3 commits
-
-
Serge S. Koval authored
Save form_overrides into CustomModelConverter, to fix #421, in conjunction with https://github.com/coleifer/wtf-peewee/pull/20
-
bryhoyt authored
-
Serge S. Koval authored
-
- 02 Jan, 2014 1 commit
-
-
Serge S. Koval authored
-
- 28 Dec, 2013 2 commits
-
-
Serge S. Koval authored
-
Serge S. Koval authored
-
- 26 Dec, 2013 2 commits
-
-
Serge S. Koval authored
Inline model field fix to address issues #417, #418
-
Bryan Hoyt authored
-
- 23 Dec, 2013 2 commits
-
-
Serge S. Koval authored
Missing "op" alias for os.path
-
Joe Meilinger authored
-
- 20 Dec, 2013 2 commits
-
-
Serge S. Koval authored
Use `send_file` instead of `send_from_directory` to serve files in FileAdmin
-
Serge S. Koval authored
Don't use column name for pk
-
- 19 Dec, 2013 2 commits
-
-
John Rork authored
Gets the attribute name of the model's pk column, rather than the column's name (which can differ). This probably needs to happen for inherited keys, too, but I have not tested.
-
Iuri de Silvio authored
The path is already validated in `_normalize_path`. Also, `send_from_directory` abort paths with backslash, breaking FileAdmin subfolders in Windows. With `send_file`, we have a minor issue with the download URL, it has path with backslash, but `_normalize_path` fix this before download.
-
- 18 Dec, 2013 1 commit
-
-
Serge S. Koval authored
Make FileAdmin.base_url optional.
-