Skip to content
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

Fixed Broken Broken Reference to Application #53

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ nosetests.xml
virtualenv
venv

.idea
.idea
Dockerfile
2 changes: 1 addition & 1 deletion examples/custom/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from json import dumps

from flask import Flask, redirect, request
from flask.ext.autodoc import Autodoc
from flask_autodoc import Autodoc


app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion examples/factory/blog/doc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Blueprint
from flask.ext.autodoc import Autodoc
from flask_autodoc import Autodoc


doc = Blueprint('doc', __name__, url_prefix='/doc')
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/blog.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from json import dumps

from flask import Flask, redirect, request
from flask.ext.autodoc import Autodoc
from flask_autodoc import Autodoc


app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion flask_autodoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = 'arnaud'

from flask.ext.autodoc.autodoc import Autodoc
from flask_autodoc.autodoc import Autodoc
4 changes: 2 additions & 2 deletions flask_autodoc/autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import inspect

from flask import current_app, render_template, render_template_string
from jinja2 import evalcontextfilter
from jinja2 import pass_eval_context


try:
Expand Down Expand Up @@ -55,7 +55,7 @@ def add_custom_nl2br_filters(self, app):
_paragraph_re = re.compile(r'(?:\r\n|\r|\n){3,}')

@app.template_filter()
@evalcontextfilter
@pass_eval_context
def nl2br(eval_ctx, value):
result = '\n\n'.join('%s' % p.replace('\n', '<br>\n')
for p in _paragraph_re.split(value))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def readme():

setup(
name='Flask-Autodoc',
version='0.1.2',
version='0.2.0',
url='http://github.com/acoomans/flask-autodoc',
license='MIT',
author='Arnaud Coomans',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os

from flask import Flask
from flask.ext.autodoc import Autodoc
from flask_autodoc import Autodoc


class TestAutodoc(unittest.TestCase):
Expand Down Expand Up @@ -259,7 +259,7 @@ def ab(param1, param2):
self.assertIn('Returns arguments', doc)

def testLocation(self):
line_no = inspect.stack()[0][2] + 2 # the doc() line
line_no = inspect.stack()[0][2] + 3 # the doc() line
@self.app.route('/location')
@self.autodoc.doc()
def location():
Expand Down