-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP admin: added flask-admin modelviews #30
Conversation
krzysztof
commented
Oct 30, 2015
- Added Flask-Admin model views registration
648cc53
to
ea5973d
Compare
@@ -155,6 +155,11 @@ def get(cls, pid_type, pid_value, pid_provider='', provider=None): | |||
# | |||
# Instance methods | |||
# | |||
def __repr__(self): | |||
"""Text representation of the object.""" | |||
return '<PID: Type:{0}, Value:{1}, Provider:{2}, Status:{3}>'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative formatting:
return ('<PID: Type:{0.pid_type}, Value:{0.pid_value}, Provider:{0.pid_provider}, '
'Status:{0.status}>'.format(self))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, looks much better. Thanks!
@@ -136,6 +136,9 @@ def run_tests(self): | |||
'invenio_base.apps': [ | |||
'invenio_pidstore = invenio_pidstore:InvenioPIDStore', | |||
], | |||
'invenio_admin.register': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jirikuncar How should this entry point group be named ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go for invenio_admin.apps
or invenio_admin.views
WDYT @lnielsen ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm..... not sure - I agree invenio_admin.register
is not the best.
Alternatives:
invenio_admin.init_admins
invenio_admin.init
invenio_admin.admins
invenio_admin.exts
The entry point specifies callable
s that initialise the admin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps invenio_admin.init_modelviews
would be the most accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to avoid a verb in entry point group name, hence invenio_admin.modelviews
is fine, however one can create admin views without a SQLAlchemy model too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go with invenio_admin.views
then.
e381311
to
d606aea
Compare
@krzysztof it's fine if the WIP is only in PR title and not commit message. |
def __repr__(self): | ||
"""Text representation of the PidLog.""" | ||
return '<PidLog (Id:{0.id}): IdPID:{0.id_pid}, Action:{0.action}, ' \ | ||
'Msg:{0.message}, Time:{0.timestamp}>'.format(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing )
?
35fc47c
to
d815edf
Compare
* INCOMPATIBLE Major rewrite of PIDStore in order to fix performance issues and clean up programmatic API. (closes inveniosoftware#21) (closes inveniosoftware#20) (closes inveniosoftware#19) (closes inveniosoftware#9) (closes inveniosoftware#4) (closes inveniosoftware#1) * Adds support for redirecting persistent identifiers. * Adds support for integer record identifier minting. Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
@krzysztof Will you update this PR to the latest version of PIDStore. |
c3f1103
to
d7b83aa
Compare
* Adds datacite and invenio_db as known third parties to .editorconfig Signed-off-by: Krzysztof Nowak <k.nowak@cern.ch>
Sorry, can I get you to rebase on top of latest master (I merged #35 before this one). Also, since you are anyway rebasing, please add a dot at the end of the commit message sentence in the bullet: |
Can we turn on the coveralls.io for PRs as well ? |
Don't merge this yet, I'll modify it once this: inveniosoftware/invenio-admin#7 is merged. |
bb868ba
to
9c0dacd
Compare
* Adds Flask-Admin model views registration. Signed-off-by: Krzysztof Nowak <k.nowak@cern.ch>
I have to PR to another branch of invenio-pidstore as |