Git Product home page Git Product logo

flask-admin-old's Introduction

flask-admin-old's People

Contributors

delai avatar mfa avatar mgood avatar reite avatar wilsaj avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

flask-admin-old's Issues

make html in doc failed

make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.1.3
loading pickled environment... done

Theme error:
no theme named 'flask_small' found (missing theme.conf?)
make: *** [html] Error 1

reduce repo size

currently pretty bulky at ~25MB - there should be some old frameworky stuff that can be removed to slim things down

default value wrong displayed

suppose there is a column which has a default value 0, like
upped = Column(Integer, default=0)
in Tweet model. It will display a column value with "ColumnDefault(0)" but not 0 in the "add new tweet page"

No module named flask.ext.admin.datastore

from flask.ext import admin
from flask.ext.admin.datastore.sqlalchemy import SQLAlchemyDatastore
from flask.ext.sqlalchemy import SQLAlchemy

i already install flask_admin.

MongoAlchemy support

Add a datastore class that works with MongoAlchemy (and Flask-MongoAlchemy) models.

refactor to support other datastores

The current code is directly tied to SQLAlchemy in a lot of places. One approach that should work well is to abstract out the stuff that Flask-Admin needs to ask of a datastore into some API that can be satisfied by a datastore object of some sort; then for any datastore, we just write objects that satisfy this API and we should be good.

Make a difference between sequential and non-sequential primary keys

Whenever you define a field as primary_key it won't appear in the add/edit form. This behaviour can be modified by setting the exclude_pks to False on admin.datastore.sqlalchemy.SQLAlchemyDatastore.

This is ok for autoincremental Integer fields, but when you need a String as a primary_key this becomes a problem. Usually string primary keys are not sequential, and need to be edited while keeping sequential database-defined keys hidden.

A possible solution would be to split the exclude_pks parameter into editable_pks and editable_sequential_pks. That way you can achieve the expected behaviour by setting editable_pks=True and editable_sequential_pks=False.

what about full-featured editor

It looks like we can not add/edit a REAL article(with style and photos) by flask-admin right now. Is it possible to fork it and add those functions?

AttributeError when SQLAlchemyDatastore.exclude_pks=False

When the exclude_pks parameter is set to False in datastore.sqlalchemy.SQLAlchemyDatastore the following exception is thrown:

  File "(...)python2.7/site-packages/flask_admin/datastore/sqlalchemy.py", line 250, in convert
    not callable(default_value.arg):
AttributeError: 'Sequence' object has no attribute 'arg'

The Column is defined as follows:

pk = Column(Integer, Sequence('hash_pk'), primary_key=True)

pypi install possibly broken

This is the output from easy_install flask-admin using flask 0.8

Searching for flask-admin
Reading http://pypi.python.org/simple/flask-admin/
Reading https://github.com/wilsaj/flask-admin/
Best match: Flask-Admin 0.3.0
Downloading http://pypi.python.org/packages/source/F/Flask-Admin/Flask-Admin-0.3
.0.tar.gz#md5=641c4caaa66aed3e15b67660d1e647d6
Processing Flask-Admin-0.3.0.tar.gz
Running Flask-Admin-0.3.0\setup.py -q bdist_egg --dist-dir c:\users\abhishek\app
data\local\temp\easy_install-5o9g6k\Flask-Admin-0.3.0\egg-dist-tmp-ehn5np
Traceback (most recent call last):
  File "c:\Python27\Scripts\easy_install-script.py", line 8, in 
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
    with_ei_usage(lambda:
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
    return f()
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in 
    distclass=DistributionWithoutHelpCommands, **kw
  File "c:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
    self.easy_install(spec, not self.no_deps)
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
446, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "c:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
919, in run_setup
    run_setup(setup_script, args)
  File "c:\Python27\lib\site-packages\setuptools\sandbox.py", line 62, in run_se
tup
    lambda: execfile(
  File "c:\Python27\lib\site-packages\setuptools\sandbox.py", line 105, in run
    return func()
  File "c:\Python27\lib\site-packages\setuptools\sandbox.py", line 64, in 
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 50, in 
  File "c:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 167
, in run
    self.run_command("egg_info")
  File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 177,
 in run
    self.find_sources()
  File "c:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 252,
 in find_sources
    mm.run()
  File "c:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 308,
 in run
    self.read_template()
  File "c:\Python27\lib\site-packages\setuptools\command\sdist.py", line 157, in
 read_template
    _sdist.read_template(self)
  File "c:\Python27\lib\distutils\command\sdist.py", line 315, in read_template
    self.filelist.process_template_line(line)
  File "c:\Python27\lib\distutils\filelist.py", line 118, in process_template_li
ne
    action, patterns, dir, dir_pattern = self._parse_template_line(line)
  File "c:\Python27\lib\distutils\filelist.py", line 97, in _parse_template_line

    dir = convert_path(words[1])
  File "c:\Python27\lib\distutils\util.py", line 202, in convert_path
    raise ValueError, "path '%s' cannot end with '/'" % pathname
ValueError: path 'flask_admin/' cannot end with '/'

relationship name in wtf form

Currently flask-admin is using the foreign model's name as the fields label/name in a model form:

line 530- line 533
return sa_fields.QuerySelectField(
foreign_model.name,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),

It seems to me that it is more intuitive to use relationship's name, rather than a models name,
ie: return sa_fields.QuerySelectField(
prop.key,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),

support AJAX forms for creating new objects

So adds and edits can be done on related items without leaving the page.
Example:
Teacher has a relationship on Student objects (one to many); we could add an "add a new <...>" button to pop up a student form that would create a new Student without leaving the Teacher edit/create page

relationship name in wtf form

Currently flask-admin is using the foreign model's name as the fields label/name in a model form:

line 530- line 533
return sa_fields.QuerySelectField(
foreign_model.name,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),

It seems to me that it is more intuitive to use relationship's name, rather than a models name,
ie: return sa_fields.QuerySelectField(
prop.key,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),

Problems with bson ??

I installed bson 0.3.3 via pip.
Is that not the version you are using? Please add the correct version to setup.py.

from bson.errors import InvalidId

ImportError: No module named errors

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.