Update changelog
This commit is contained in:
commit
a38c832dee
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
rattail_poser.egg-info/
|
6
MANIFEST.in
Normal file
6
MANIFEST.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: conf -*-
|
||||
|
||||
recursive-include poser/web/static *.css
|
||||
recursive-include poser/web/static *.js
|
||||
|
||||
recursive-include poser/web/templates *.mako
|
11
README.rst
Normal file
11
README.rst
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
Rattail 'Poser'
|
||||
===============
|
||||
|
||||
This project serves as a working demo, to illustrate various concepts of the
|
||||
Rattail software framework. See the `Rattail Wiki`_ for more info.
|
||||
|
||||
Note that it also aims to be usable as a starting point for your own
|
||||
project(s), should you need one.
|
||||
|
||||
.. _`Rattail Wiki`: https://rattailproject.org/moin/
|
8
poser/__init__.py
Normal file
8
poser/__init__.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Rattail 'Poser' (demo project)
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from ._version import __version__
|
3
poser/_version.py
Normal file
3
poser/_version.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = u'0.1.0'
|
0
poser/web/__init__.py
Normal file
0
poser/web/__init__.py
Normal file
40
poser/web/app.py
Normal file
40
poser/web/app.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Pyramid web application
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from tailbone import app
|
||||
|
||||
|
||||
def main(global_config, **settings):
|
||||
"""
|
||||
This function returns a Pyramid WSGI application.
|
||||
"""
|
||||
# set some defaults for PostgreSQL
|
||||
app.provide_postgresql_settings(settings)
|
||||
|
||||
# prefer Poser templates over Tailbone; use 'better' theme
|
||||
settings.setdefault('mako.directories', ['poser.web:templates',
|
||||
'tailbone:templates/themes/better',
|
||||
'tailbone:templates',])
|
||||
|
||||
# make config objects
|
||||
rattail_config = app.make_rattail_config(settings)
|
||||
pyramid_config = app.make_pyramid_config(settings)
|
||||
|
||||
# bring in the rest of Tailbone
|
||||
pyramid_config.include('tailbone.static')
|
||||
pyramid_config.include('tailbone.subscribers')
|
||||
pyramid_config.include('tailbone.views')
|
||||
|
||||
# # bring in the rest of Poser
|
||||
# pyramid_config.include('poser.web.subscribers')
|
||||
# pyramid_config.include('poser.web.static')
|
||||
# pyramid_config.include('poser.web.views')
|
||||
|
||||
# configure PostgreSQL some more
|
||||
app.configure_postgresql(pyramid_config)
|
||||
|
||||
return pyramid_config.make_wsgi_app()
|
139
poser/web/templates/menu.mako
Normal file
139
poser/web/templates/menu.mako
Normal file
|
@ -0,0 +1,139 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%def name="main_menu_items()">
|
||||
|
||||
% if request.has_any_perm('schedule.view', 'timesheet.view'):
|
||||
<li>
|
||||
<a>Time Clock</a>
|
||||
<ul>
|
||||
% if request.has_perm('schedule.view'):
|
||||
<li>${h.link_to("Employee Schedule", url('schedule.employee'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('timesheet.view'):
|
||||
<li>${h.link_to("Employee Time Sheet", url('timesheet.employee'))}</li>
|
||||
% endif
|
||||
% if request.has_any_perm('schedule.viewall', 'timesheet.viewall'):
|
||||
<li>-</li>
|
||||
% if request.has_perm('schedule.viewall'):
|
||||
<li>${h.link_to("Full Schedule", url('schedule'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('timesheet.viewall'):
|
||||
<li>${h.link_to("Full Time Sheet", url('timesheet'))}</li>
|
||||
% endif
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
<li>
|
||||
<a>Products</a>
|
||||
<ul>
|
||||
% if request.has_perm('products.list'):
|
||||
<li>${h.link_to("Products", url('products'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('brands.list'):
|
||||
<li>${h.link_to("Brands", url('brands'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('families.list'):
|
||||
<li>${h.link_to("Families", url('families'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('reportcodes.list'):
|
||||
<li>${h.link_to("Report Codes", url('reportcodes'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a>Vendors</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Vendors", url('vendors'))}</li>
|
||||
% if request.has_any_perm('vendorcatalogs.list', 'vendorcatalogs.create'):
|
||||
<li>-</li>
|
||||
% if request.has_perm('vendorcatalogs.list'):
|
||||
<li>${h.link_to("Catalogs", url('vendorcatalogs'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('vendorcatalogs.create'):
|
||||
<li>${h.link_to("Upload New Catalog", url('vendorcatalogs.create'))}</li>
|
||||
% endif
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a>Company</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Stores", url('stores'))}</li>
|
||||
<li>${h.link_to("Departments", url('departments'))}</li>
|
||||
<li>${h.link_to("Subdepartments", url('subdepartments'))}</li>
|
||||
<li>-</li>
|
||||
<li>${h.link_to("Employees", url('employees'))}</li>
|
||||
<li>-</li>
|
||||
<li>${h.link_to("Customers", url('customers'))}</li>
|
||||
% if request.has_perm('customergroups.list'):
|
||||
<li>${h.link_to("Customer Groups", url('customergroups'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a>Reports</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Ordering Worksheet", url('reports.ordering'))}</li>
|
||||
<li>${h.link_to("Inventory Worksheet", url('reports.inventory'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
% if request.has_any_perm('batch.handheld.list', 'batch.inventory.list'):
|
||||
<li>
|
||||
<a>Batches</a>
|
||||
<ul>
|
||||
% if request.has_perm('batch.handheld.list'):
|
||||
<li>${h.link_to("Handheld", url('batch.handheld'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('batch.inventory.list'):
|
||||
<li>${h.link_to("Inventory", url('batch.inventory'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('users.list', 'roles.list', 'labelprofiles.list', 'settings.list', 'emailprofiles.list', 'datasyncchanges.list'):
|
||||
<li>
|
||||
<a>Admin</a>
|
||||
<ul>
|
||||
% if request.has_perm('users.list'):
|
||||
<li>${h.link_to("Users", url('users'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('roles.list'):
|
||||
<li>${h.link_to("Roles", url('roles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('labelprofiles.list'):
|
||||
<li>${h.link_to("Label Profiles", url('labelprofiles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('settings.list'):
|
||||
<li>${h.link_to("Settings", url('settings'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('emailprofiles.list'):
|
||||
<li>${h.link_to("Email Profiles", url('emailprofiles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('datasyncchanges.list'):
|
||||
<li>${h.link_to("DataSync Changes", url('datasyncchanges'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.user:
|
||||
<li>
|
||||
<a>${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'))}</li>
|
||||
<li>${h.link_to("Change Password", url('change_password'))}</li>
|
||||
<li>${h.link_to("Logout", url('logout'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
% else:
|
||||
<li>${h.link_to("Login", url('login'))}</li>
|
||||
% endif
|
||||
|
||||
</%def>
|
81
setup.py
Normal file
81
setup.py
Normal file
|
@ -0,0 +1,81 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Setup script for Rattail 'Poser'
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
execfile(os.path.join(here, 'poser', '_version.py'))
|
||||
README = open(os.path.join(here, 'README.rst')).read()
|
||||
|
||||
|
||||
requires = [
|
||||
#
|
||||
# Version numbers within comments below have specific meanings.
|
||||
# Basically the 'low' value is a "soft low," and 'high' a "soft high."
|
||||
# In other words:
|
||||
#
|
||||
# If either a 'low' or 'high' value exists, the primary point to be
|
||||
# made about the value is that it represents the most current (stable)
|
||||
# version available for the package (assuming typical public access
|
||||
# methods) whenever this project was started and/or documented.
|
||||
# Therefore:
|
||||
#
|
||||
# If a 'low' version is present, you should know that attempts to use
|
||||
# versions of the package significantly older than the 'low' version
|
||||
# may not yield happy results. (A "hard" high limit may or may not be
|
||||
# indicated by a true version requirement.)
|
||||
#
|
||||
# Similarly, if a 'high' version is present, and especially if this
|
||||
# project has laid dormant for a while, you may need to refactor a bit
|
||||
# when attempting to support a more recent version of the package. (A
|
||||
# "hard" low limit should be indicated by a true version requirement
|
||||
# when a 'high' version is present.)
|
||||
#
|
||||
# In any case, developers and other users are encouraged to play
|
||||
# outside the lines with regard to these soft limits. If bugs are
|
||||
# encountered then they should be filed as such.
|
||||
#
|
||||
# package # low high
|
||||
|
||||
'psycopg2', # 2.6.2
|
||||
'rattail', # 0.7.25
|
||||
]
|
||||
|
||||
|
||||
setup(
|
||||
name = "rattail-poser",
|
||||
version = __version__,
|
||||
author = "Lance Edgar",
|
||||
author_email = "lance@edbob.org",
|
||||
url = "https://rattailproject.org/",
|
||||
description = "Rattail Software Demo",
|
||||
long_description = README,
|
||||
|
||||
classifiers = [
|
||||
'Private :: Do No Upload',
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Environment :: Console',
|
||||
'Intended Audience :: Developers',
|
||||
'Natural Language :: English',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Office/Business',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
|
||||
install_requires = requires,
|
||||
packages = find_packages(),
|
||||
|
||||
entry_points = {
|
||||
'paste.app_factory': [
|
||||
'main = poser.web.app:main',
|
||||
],
|
||||
},
|
||||
)
|
Loading…
Reference in a new issue