Browse Source

Fixed sphinx makefile

master
Serge S. Koval 11 years ago
parent
commit
c740b85e0c
  1. 4
      Makefile
  2. 3
      examples/simple/simple.py
  3. 9
      flask_admin/base.py
  4. 2
      flask_admin/templates/admin/model/list.html

4
Makefile

@ -10,9 +10,9 @@ BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) doc
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) doc
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

3
examples/simple/simple.py

@ -37,6 +37,9 @@ if __name__ == '__main__':
admin.add_view(AnotherAdminView(category='Test'))
admin.init_app(app)
import pdb
pdb.set_trace()
# Start app
app.debug = True
app.run()

9
flask_admin/base.py

@ -1,3 +1,6 @@
import sys
import os.path
from functools import wraps
from re import sub
@ -179,6 +182,12 @@ class BaseView(object):
if self.name is None:
self.name = self._prettify_name(self.__class__.__name__)
# Figure out root_path
mod_name = self.__module__
mod = sys.modules[mod_name]
root_path = os.path.abspath(os.path.dirname(mod.__file__))
print mod_name, mod.__file__, root_path
# Create blueprint and register rules
self.blueprint = Blueprint(self.endpoint, __name__,
url_prefix=self.url,

2
flask_admin/templates/admin/model/list.html

@ -138,7 +138,7 @@
</td>
{% endif %}
<td>
{% block list_row_row_actions scoped %}
{% block list_row_actions scoped %}
{%- if admin_view.can_edit -%}
<a class="icon" href="{{ url_for('.edit_view', id=get_pk_value(row), url=return_url) }}">
<i class="icon-pencil"></i>

Loading…
Cancel
Save