Use absolute imports and rename package to ihatemoney

This commit is contained in:
Alexis Métaireau 2017-06-28 22:23:17 +02:00
parent 0e374cd5e0
commit 692336754d
75 changed files with 22 additions and 22 deletions

View file

@ -29,7 +29,7 @@ remove-install-stamp:
update: remove-install-stamp install
serve: install
$(PYTHON) -m budget.manage runserver
$(PYTHON) -m ihatemoney.manage runserver
test: $(DEV_STAMP)
$(VENV)/bin/tox
@ -38,7 +38,7 @@ release: $(DEV_STAMP)
$(VENV)/bin/fullrelease
build-translations:
$(VENV)/bin/pybabel compile -d budget/translations
$(VENV)/bin/pybabel compile -d ihatemoney/translations
build-requirements:
$(VIRTUALENV) $(TEMPDIR)

View file

@ -2,8 +2,8 @@
from flask import Blueprint, request
from flask_rest import RESTResource, need_auth
from .models import db, Project, Person, Bill
from .forms import (ProjectForm, EditProjectForm, MemberForm,
from ihatemoney.models import db, Project, Person, Bill
from ihatemoney.forms import (ProjectForm, EditProjectForm, MemberForm,
get_billform_for)

View file

@ -10,8 +10,8 @@ from wtforms.widgets import html_params
from datetime import datetime
from jinja2 import Markup
from .models import Project, Person
from .utils import slugify
from ihatemoney.models import Project, Person
from ihatemoney.utils import slugify
def get_billform_for(project, set_default=True, **kwargs):
"""Return an instance of BillForm configured for a particular project.

View file

@ -5,8 +5,8 @@ from flask_script import Manager, Command
from flask_migrate import Migrate, MigrateCommand
from werkzeug.security import generate_password_hash
from .run import app
from .models import db
from ihatemoney.run import app
from ihatemoney.models import db
class GeneratePasswordHash(Command):

View file

@ -7,12 +7,12 @@ from flask_babel import Babel
from flask_migrate import Migrate, upgrade, stamp
from raven.contrib.flask import Sentry
from .web import main, db, mail
from .api import api
from .utils import PrefixedWSGI
from .utils import minimal_round
from ihatemoney.web import main, db, mail
from ihatemoney.api import api
from ihatemoney.utils import PrefixedWSGI
from ihatemoney.utils import minimal_round
from . import default_settings
from ihatemoney import default_settings
app = Flask(__name__, instance_path='/etc/ihatemoney', instance_relative_config=True)

View file

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View file

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View file

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View file

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View file

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 258 B

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 259 B

View file

@ -17,9 +17,9 @@ from flask import session
if 'IHATEMONEY_SETTINGS_FILE_PATH' in os.environ:
del os.environ['IHATEMONEY_SETTINGS_FILE_PATH']
from .. import run
from .. import models
from .. import utils
from ihatemoney import run
from ihatemoney import models
from ihatemoney import utils
__HERE__ = os.path.dirname(os.path.abspath(__file__))

View file

@ -22,13 +22,13 @@ import werkzeug
from sqlalchemy import orm
from functools import wraps
from .models import db, Project, Person, Bill
from .forms import (
from ihatemoney.models import db, Project, Person, Bill
from ihatemoney.forms import (
AdminAuthenticationForm, AuthenticationForm, EditProjectForm,
InviteForm, MemberForm, PasswordReminder, ProjectForm, get_billform_for,
ExportForm
)
from .utils import Redirect303, list_of_dicts2json, list_of_dicts2csv
from ihatemoney.utils import Redirect303, list_of_dicts2json, list_of_dicts2csv
main = Blueprint("main", __name__)
mail = Mail()

View file

@ -6,7 +6,7 @@ skip_missing_interpreters = True
commands =
python --version
py.test budget/tests/tests.py
py.test ihatemoney/tests/tests.py
deps =
-rdev-requirements.txt
-rrequirements.txt