Rebranded to Tailbone.

This commit is contained in:
Lance Edgar 2013-09-01 07:27:47 -07:00
parent 47944767dc
commit 40efd8a3bc
111 changed files with 188 additions and 209 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
rattail.pyramid.egg-info
Tailbone.egg-info

View file

@ -3,8 +3,8 @@ include *.txt
include *.rst
include *.py
recursive-include rattail/pyramid/static *.css
recursive-include rattail/pyramid/static *.png
recursive-include tailbone/static *.css
recursive-include tailbone/static *.png
recursive-include rattail/pyramid/templates *.mako
recursive-include rattail/pyramid/reports *.mako
recursive-include tailbone/templates *.mako
recursive-include tailbone/reports *.mako

View file

@ -1,11 +1,9 @@
rattail.pyramid
===============
Tailbone
========
Rattail is a retail software framework based on `edbob <http://edbob.org/>`_,
and released under the GNU Affero General Public License.
This package contains Pyramid views, etc., for managing a Rattail system.
Tailbone is an extensible web application based on Rattail. It provides a
"back-office network environment" (BONE) for use in managing retail data.
Please see Rattail's `home page <http://rattail.edbob.org/>`_ for more
information.

18
fabfile.py vendored
View file

@ -22,27 +22,15 @@
#
################################################################################
import os.path
import shutil
from fabric.api import *
execfile(os.path.join(os.path.dirname(__file__), 'rattail', 'pyramid', '_version.py'))
from fabric.api import local
@task
def release():
"""
Release a new version of 'rattail.pyramid'.
Release a new version of 'Tailbone'.
"""
shutil.rmtree('rattail.pyramid.egg-info')
shutil.rmtree('Tailbone.egg-info')
local('python setup.py sdist --formats=gztar register upload')
filename = 'rattail.pyramid-{0}.tar.gz'.format(__version__)
put(os.path.join('dist', filename), '/srv/pypi/{0}'.format(filename))
with cd('/srv/pypi'):
run('rm --recursive --force simple')
run('compoze index')

View file

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__)

View file

@ -1,47 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2012 Lance Edgar
#
# This file is part of Rattail.
#
# Rattail is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
# more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Rattail. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
"""
``rattail.pyramid.views`` -- Pyramid Views
"""
from rattail.pyramid.views.core import *
from rattail.pyramid.views.grids import *
from rattail.pyramid.views.crud import *
from rattail.pyramid.views.autocomplete import *
def includeme(config):
config.include('rattail.pyramid.views.batches')
# config.include('rattail.pyramid.views.categories')
config.include('rattail.pyramid.views.customergroups')
config.include('rattail.pyramid.views.customers')
config.include('rattail.pyramid.views.departments')
config.include('rattail.pyramid.views.employees')
config.include('rattail.pyramid.views.labels')
config.include('rattail.pyramid.views.products')
config.include('rattail.pyramid.views.roles')
config.include('rattail.pyramid.views.stores')
config.include('rattail.pyramid.views.subdepartments')
config.include('rattail.pyramid.views.vendors')

View file

@ -1,6 +1,6 @@
[nosetests]
nocapture = 1
cover-package = rattail.pyramid
cover-package = tailbone
cover-erase = 1
cover-inclusive = 1
cover-html = 1

View file

@ -28,7 +28,7 @@ from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
execfile(os.path.join(here, 'rattail', 'pyramid', '_version.py'))
execfile(os.path.join(here, 'tailbone', '_version.py'))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
@ -68,13 +68,13 @@ requires = [
setup(
name = "rattail.pyramid",
name = "Tailbone",
version = __version__,
author = "Lance Edgar",
author_email = "lance@edbob.org",
url = "http://rattail.edbob.org/",
license = "GNU Affero GPL v3",
description = "Rattail Pyramid Framework",
description = "Backoffice Web Application for Rattail",
long_description = README + '\n\n' + CHANGES,
classifiers = [
@ -97,7 +97,6 @@ setup(
tests_require = requires + ['mock', 'nose', 'coverage', 'fixture'],
test_suite = 'nose.collector',
namespace_packages = ['rattail'],
packages = find_packages(),
include_package_data = True,
zip_safe = False,

View file

@ -23,15 +23,15 @@
################################################################################
"""
``rattail.pyramid`` -- Rattail's Pyramid Framework
Rattail's Pyramid Framework
"""
from rattail.pyramid._version import __version__
from ._version import __version__
from edbob.pyramid import Session
def includeme(config):
config.include('rattail.pyramid.static')
config.include('rattail.pyramid.subscribers')
config.include('rattail.pyramid.views')
config.include('tailbone.static')
config.include('tailbone.subscribers')
config.include('tailbone.views')

View file

@ -23,8 +23,9 @@
################################################################################
"""
``rattail.pyramid.views.grids`` -- Grid Views
Forms
"""
from rattail.pyramid.views.grids.core import *
from rattail.pyramid.views.grids.alchemy import *
from .simpleform import *
from .fields import *
from .renderers import *

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.fields`` -- FormAlchemy Fields
``tailbone.forms.fields`` -- FormAlchemy Fields
"""
from formalchemy import Field

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.renderers`` -- FormAlchemy Field Renderers
FormAlchemy Field Renderers
"""
from webhelpers.html import literal

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.renderers.common`` -- Common Field Renderers
Common Field Renderers
"""
from formalchemy.fields import FieldRenderer, SelectFieldRenderer

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.renderers.products`` -- Product Field Renderers
Product Field Renderers
"""
from formalchemy import TextFieldRenderer

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.renderers.users`` -- User Field Renderers
User Field Renderers
"""
from formalchemy.fields import TextFieldRenderer

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.forms.simpleform`` -- ``pyramid_simpleform`` Forms
``pyramid_simpleform`` Forms
"""
from pyramid_simpleform import renderers

View file

@ -23,9 +23,10 @@
################################################################################
"""
``rattail.pyramid.forms`` -- Forms
Grids
"""
from rattail.pyramid.forms.simpleform import *
from rattail.pyramid.forms.fields import *
from rattail.pyramid.forms.renderers import *
from .core import *
from .alchemy import *
from . import util
from . import search

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.grids.alchemy`` -- FormAlchemy Grid Classes
FormAlchemy Grid Classes
"""
from webhelpers.html import tags
@ -34,8 +34,8 @@ import formalchemy
import edbob
from edbob.util import prettify
from rattail.pyramid.grids.core import Grid
from rattail.pyramid import Session
from .core import Grid
from .. import Session
from sqlalchemy.orm import object_session
__all__ = ['AlchemyGrid']

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.grids.core`` -- Core Grid Classes
Core Grid Classes
"""
try:

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.grids.search`` -- Grid Search Filters
Grid Search Filters
"""
from sqlalchemy import or_

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.grids.util`` -- Grid Utilities
Grid Utilities
"""
from sqlalchemy.orm.attributes import InstrumentedAttribute
@ -32,7 +32,7 @@ from webhelpers.html import literal
from pyramid.response import Response
from rattail.pyramid.grids.search import SearchFormRenderer
from .search import SearchFormRenderer
def get_sort_config(name, request, **kwargs):
@ -93,7 +93,7 @@ def get_sort_map(cls, names=None, **kwargs):
def render_grid(grid, search_form=None, **kwargs):
"""
Convenience function to render ``grid`` (which should be a
:class:`rattail.pyramid.grids.Grid` instance).
:class:`tailbone.grids.Grid` instance).
This "usually" will return a dictionary to be used as context for rendering
the final view template.

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.helpers`` -- Template Context Helpers
Template Context Helpers
"""
import datetime

View file

@ -23,9 +23,9 @@
################################################################################
"""
``rattail.pyramid.static`` -- Static Assets
Static Assets
"""
def includeme(config):
config.add_static_view('rattail', 'rattail.pyramid:static')
config.add_static_view('tailbone', 'tailbone:static')

View file

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 641 B

View file

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

View file

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View file

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

View file

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 616 B

View file

@ -23,13 +23,13 @@
################################################################################
"""
``rattail.pyramid.subscribers`` -- Event Subscribers
Event Subscribers
"""
from pyramid import threadlocal
import rattail
from rattail.pyramid import helpers
from . import helpers
def before_render(event):
@ -53,5 +53,5 @@ def before_render(event):
def includeme(config):
config.add_subscriber('rattail.pyramid.subscribers:before_render',
config.add_subscriber('tailbone.subscribers:before_render',
'pyramid.events.BeforeRender')

View file

@ -23,13 +23,25 @@
################################################################################
"""
``rattail.pyramid.views.batches`` -- Batch Views
Pyramid Views
"""
from rattail.pyramid.views.batches.params import *
from .core import *
from .grids import *
from .crud import *
from .autocomplete import *
def includeme(config):
config.include('rattail.pyramid.views.batches.core')
config.include('rattail.pyramid.views.batches.params')
config.include('rattail.pyramid.views.batches.rows')
config.include('tailbone.views.batches')
# config.include('tailbone.views.categories')
config.include('tailbone.views.customergroups')
config.include('tailbone.views.customers')
config.include('tailbone.views.departments')
config.include('tailbone.views.employees')
config.include('tailbone.views.labels')
config.include('tailbone.views.products')
config.include('tailbone.views.roles')
config.include('tailbone.views.stores')
config.include('tailbone.views.subdepartments')
config.include('tailbone.views.vendors')

View file

@ -23,11 +23,11 @@
################################################################################
"""
``rattail.pyramid.views.autocomplete`` -- Autocomplete View
Autocomplete View
"""
from rattail.pyramid.views import View
from rattail.pyramid import Session
from .core import View
from .. import Session
__all__ = ['AutocompleteView']

View file

@ -23,10 +23,13 @@
################################################################################
"""
``rattail.pyramid.grids`` -- Grids
Batch Views
"""
from rattail.pyramid.grids.core import *
from rattail.pyramid.grids.alchemy import *
from rattail.pyramid.grids import util
from rattail.pyramid.grids import search
from .params import *
def includeme(config):
config.include('tailbone.views.batches.core')
config.include('tailbone.views.batches.params')
config.include('tailbone.views.batches.rows')

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.views.batches.core`` -- Core Batch Views
Core Batch Views
"""
from pyramid.httpexceptions import HTTPFound
@ -32,14 +32,14 @@ from pyramid.renderers import render_to_response
from webhelpers.html import tags
from edbob.pyramid.forms import PrettyDateTimeFieldRenderer
from rattail.pyramid.forms import EnumFieldRenderer
from rattail.pyramid.grids.search import BooleanSearchFilter
from ...forms import EnumFieldRenderer
from ...grids.search import BooleanSearchFilter
from edbob.pyramid.progress import SessionProgress
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView, View
from .. import SearchableAlchemyGridView, CrudView, View
import rattail
from rattail import batches
from rattail.pyramid import Session
from ... import Session
from rattail.db.model import Batch
from rattail.threads import Thread

View file

@ -23,10 +23,10 @@
################################################################################
"""
``rattail.pyramid.views.batches.params`` -- Batch Parameter Views
Batch Parameter Views
"""
from rattail.pyramid.views import View
from ... import View
__all__ = ['BatchParamsView']
@ -49,4 +49,4 @@ class BatchParamsView(View):
def includeme(config):
config.include('rattail.pyramid.views.batches.params.labels')
config.include('tailbone.views.batches.params.labels')

View file

@ -23,13 +23,13 @@
################################################################################
"""
``rattail.pyramid.views.batches.params.printlabels`` -- Print Labels Batch
Print Labels Batch
"""
from rattail.pyramid import Session
from .... import Session
import rattail
from rattail.pyramid.views.batches.params import BatchParamsView
from . import BatchParamsView
class PrintLabels(BatchParamsView):

View file

@ -23,16 +23,16 @@
################################################################################
"""
``rattail.pyramid.views.batches.rows`` -- Batch Row Views
Batch Row Views
"""
from pyramid.httpexceptions import HTTPFound
from rattail.pyramid import Session
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from ... import Session
from .. import SearchableAlchemyGridView, CrudView
import rattail
from rattail.pyramid.forms import GPCFieldRenderer
from ...forms import GPCFieldRenderer
def field_with_renderer(field, column):

View file

@ -23,11 +23,10 @@
################################################################################
"""
``rattail.pyramid.views.brands`` -- Brand Views
Brand Views
"""
from rattail.pyramid.views import (
SearchableAlchemyGridView, CrudView, AutocompleteView)
from . import SearchableAlchemyGridView, CrudView, AutocompleteView
from rattail.db.model import Brand

View file

@ -23,10 +23,10 @@
################################################################################
"""
``rattail.pyramid.views.categories`` -- Category Views
Category Views
"""
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from . import SearchableAlchemyGridView, CrudView
from rattail.db.model import Category

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.views.core`` -- Core View
Core View
"""
class View(object):

View file

@ -23,16 +23,16 @@
################################################################################
"""
``rattail.pyramid.views.crud`` -- CRUD View
CRUD View
"""
from pyramid.httpexceptions import HTTPFound
import formalchemy
from rattail.pyramid import Session
from .. import Session
from edbob.pyramid.forms.formalchemy import AlchemyForm
from rattail.pyramid.views.core import View
from .core import View
from edbob.util import requires_impl, prettify

View file

@ -23,12 +23,12 @@
################################################################################
"""
``rattail.pyramid.views.customergroups`` -- CustomerGroup Views
CustomerGroup Views
"""
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from . import SearchableAlchemyGridView, CrudView
from rattail.pyramid import Session
from .. import Session
from rattail.db.model import CustomerGroup, CustomerGroupAssignment

View file

@ -23,22 +23,22 @@
################################################################################
"""
``rattail.pyramid.views.customers`` -- Customer Views
Customer Views
"""
from sqlalchemy import and_
from edbob.enum import EMAIL_PREFERENCE
from rattail.pyramid.views import SearchableAlchemyGridView
from rattail.pyramid.forms import EnumFieldRenderer
from . import SearchableAlchemyGridView
from ..forms import EnumFieldRenderer
import rattail
from rattail.pyramid import Session
from .. import Session
from rattail.db.model import (
Customer, CustomerPerson, CustomerGroupAssignment,
CustomerEmailAddress, CustomerPhoneNumber)
from rattail.pyramid.views import CrudView
from . import CrudView
class CustomersGrid(SearchableAlchemyGridView):

View file

@ -23,12 +23,11 @@
################################################################################
"""
``rattail.pyramid.views.departments`` -- Department Views
Department Views
"""
from rattail.pyramid.views import (
SearchableAlchemyGridView, CrudView, AlchemyGridView, AutocompleteView)
from . import SearchableAlchemyGridView, CrudView, AlchemyGridView, AutocompleteView
from rattail.db.model import Department, Product, ProductCost, Vendor

View file

@ -23,14 +23,14 @@
################################################################################
"""
``rattail.pyramid.views.employees`` -- Employee Views
Employee Views
"""
from sqlalchemy import and_
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from rattail.pyramid.grids.search import EnumSearchFilter
from rattail.pyramid.forms import AssociationProxyField, EnumFieldRenderer
from . import SearchableAlchemyGridView, CrudView
from ..grids.search import EnumSearchFilter
from ..forms import AssociationProxyField, EnumFieldRenderer
from rattail.db.model import (
Employee, EmployeePhoneNumber, EmployeeEmailAddress, Person)
from rattail.enum import EMPLOYEE_STATUS, EMPLOYEE_STATUS_CURRENT

View file

@ -0,0 +1,30 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2012 Lance Edgar
#
# This file is part of Rattail.
#
# Rattail is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
# more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Rattail. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
"""
Grid Views
"""
from .core import *
from .alchemy import *

View file

@ -23,14 +23,14 @@
################################################################################
"""
``rattail.pyramid.views.grids.alchemy`` -- FormAlchemy Grid Views
FormAlchemy Grid Views
"""
from webhelpers import paginate
from rattail.pyramid.views.grids.core import GridView
from rattail.pyramid import grids
from rattail.pyramid import Session
from .core import GridView
from ... import grids
from ... import Session
__all__ = ['AlchemyGridView', 'SortableAlchemyGridView',

View file

@ -23,11 +23,11 @@
################################################################################
"""
``rattail.pyramid.views.grids.core`` -- Core Grid View
Core Grid View
"""
from rattail.pyramid.views import View
from rattail.pyramid import grids
from .. import View
from ... import grids
__all__ = ['GridView']

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.views.labels`` -- Label Views
Label Views
"""
from pyramid.httpexceptions import HTTPFound
@ -32,9 +32,9 @@ import formalchemy
from webhelpers.html import HTML
from rattail.pyramid import Session
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from rattail.pyramid.grids.search import BooleanSearchFilter
from .. import Session
from . import SearchableAlchemyGridView, CrudView
from ..grids.search import BooleanSearchFilter
from edbob.pyramid.forms import StrippingFieldRenderer
from rattail.db.model import LabelProfile

View file

@ -23,15 +23,14 @@
################################################################################
"""
``rattail.pyramid.views.people`` -- Person Views
Person Views
"""
from sqlalchemy import and_
from rattail.pyramid.views import (
SearchableAlchemyGridView, CrudView, AutocompleteView)
from . import SearchableAlchemyGridView, CrudView, AutocompleteView
from rattail.pyramid import Session
from .. import Session
from rattail.db.model import (Person, PersonEmailAddress, PersonPhoneNumber,
VendorContact)

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.views.products`` -- Product Views
Product Views
"""
from sqlalchemy import and_
@ -36,7 +36,7 @@ from pyramid.renderers import render_to_response
import edbob
from edbob.pyramid.progress import SessionProgress
from rattail.pyramid.views import SearchableAlchemyGridView
from . import SearchableAlchemyGridView
import rattail.labels
from rattail import sil
@ -48,10 +48,9 @@ from rattail.db.model import (
Brand, Vendor, Department, Subdepartment, LabelProfile)
from rattail.gpc import GPC
from rattail.pyramid import Session
from rattail.pyramid.forms import (AutocompleteFieldRenderer,
GPCFieldRenderer, PriceFieldRenderer)
from rattail.pyramid.views import CrudView
from .. import Session
from ..forms import AutocompleteFieldRenderer, GPCFieldRenderer, PriceFieldRenderer
from . import CrudView
class ProductsGrid(SearchableAlchemyGridView):

View file

@ -30,7 +30,7 @@ from .core import View
from mako.template import Template
from pyramid.response import Response
from rattail.pyramid import Session
from .. import Session
from rattail.db.model import Vendor, Department, Product, ProductCost
import re
@ -58,7 +58,7 @@ class OrderingWorksheet(View):
This is the "Ordering Worksheet" report.
"""
report_template_path = 'rattail.pyramid:reports/ordering_worksheet.mako'
report_template_path = 'tailbone:reports/ordering_worksheet.mako'
upc_getter = staticmethod(get_upc)
@ -129,7 +129,7 @@ class InventoryWorksheet(View):
This is the "Inventory Worksheet" report.
"""
report_template_path = 'rattail.pyramid:reports/inventory_worksheet.mako'
report_template_path = 'tailbone:reports/inventory_worksheet.mako'
upc_getter = staticmethod(get_upc)

View file

@ -23,7 +23,7 @@
################################################################################
"""
``rattail.pyramid.views.roles`` -- Role Views
Role Views
"""
from pyramid.httpexceptions import HTTPFound
@ -34,8 +34,8 @@ from webhelpers.html.builder import HTML
from edbob.db import auth
from rattail.pyramid import Session
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from .. import Session
from . import SearchableAlchemyGridView, CrudView
from rattail.db.model import Role

View file

@ -23,12 +23,12 @@
################################################################################
"""
``rattail.pyramid.views.stores`` -- Store Views
Store Views
"""
from sqlalchemy import and_
from rattail.pyramid.views import SearchableAlchemyGridView, CrudView
from . import SearchableAlchemyGridView, CrudView
from rattail.db.model import Store, StoreEmailAddress, StorePhoneNumber

Some files were not shown because too many files have changed in this diff Show more