Ejemplo n.º 1
0
#
# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin

#@tximikel add report
from model_report import report
report.autodiscover()

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^i18n/', include('django.conf.urls.i18n')),
    (r'^admin/', include(admin.site.urls)),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.STATIC_DOC_ROOT, 'show_indexes': True}),
    (r'^user/', include('user.urls')),
    (r'^news/', include('news.urls')),
    (r'^messages/', include('messages.urls')),
    (r'^services/', include('serv.urls')),
    (r'^tasks/', include('tasks.urls')),
    (r'^notification/', include('notification.urls')),
    #@tximikel add report
Ejemplo n.º 2
0
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic.base import TemplateView

from django.conf import settings
from django.contrib.auth.views import login

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

#Include Model reports
from model_report import report
report.autodiscover()

from tastypie.api import Api
from weighin.api import TransactionResource, VehicleResource, ProductResource

api = Api(api_name='1.0')
api.register(TransactionResource())
api.register(VehicleResource())
api.register(ProductResource())

urlpatterns = patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
    url(r'^$', TemplateView.as_view(template_name='base/dashboard.html') , name="index"),
    url(r'^accounts/login/$', login, {'template_name': 'login.html'}, name="login"),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/vehicles/'}, name="logout"),
    url(r'^global/', include('base.urls')),
    url(r'^vehicles/', include('vehicles.urls')),