"""tryTen URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from  other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""

from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import url, include
from django.contrib import admin
from profiles import views as profile_views
from contact import views as contact_views
from checkout import views as checkout_views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', profile_views.home, name='home'),
    url(r'^about/$', profile_views.about, name='about'),
    url(r'^profile/$', profile_views.userProfile, name='profile'),
    url(r'^payment_form/$', checkout_views.payment_form, name='payment_form'),
    # url(r'^shop/$', checkout_views.shop, name='shop'),
    url(r'^shop1/$', checkout_views.shop1, name='shop1'),
    # url(r'^checkout$', checkout_views.checkout, name='checkout_page'),
    url(r'^checkout2$', checkout_views.checkout2, name='checkout2'),
    url(r'^update/(?P<id>\d+)$', checkout_views.update, name='update'),
    url(r'^remove/(?P<id>\d+)$', checkout_views.remove, name='remove'),
    url(r'^contact/$', contact_views.contact, name='contact'),
    url(r'^addToCart/(?P<id>\d+)$', checkout_views.addToCart, name="addToCart"),
    url(r'^accounts/', include('allauth.urls')),

]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
