"""project URL Configuration

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


from django.contrib import admin
from django.urls import path
from portfolio import views as viewsPortfolio
from userapp import views as viewUser
from django.contrib.auth.decorators import login_required
from doucoder import settings
from django.conf.urls.static import static
from django.conf.urls import url
from django.contrib.sitemaps.views import sitemap
from portfolio.sitemap import Static_Sitemap

sitemaps = {
    # 'article': Article_Sitemap(),
    'static': Static_Sitemap(),
}

urlpatterns = [
    path('samaportfolio/', admin.site.urls),
    path('', viewsPortfolio.Home.as_view(), name='home'),
    path('portfolio', viewsPortfolio.portfolio, name='portfolio'),
    path('jgj', viewsPortfolio.meet, name='meet'),
    path('devis', viewsPortfolio.devis,),
    path('bc', viewsPortfolio.bc, name='bc'),
    path('mecontacter', viewsPortfolio.meContacter),
    # path('desssitemap', viewsPortfolio.sitemap),

    path('fhkfghfghyftdtdthdthygyjgyjyj',viewUser.Inscription.as_view() , name="registre"),
    path('jyfkjghjfjftftfchkfjftfjf',viewUser.Authentification.as_view() , name="login"),
    path('tlyrityrlhiyrityhri',viewUser.Logout.as_view() , name="logout"),
    path('profile/<username>/',login_required( viewUser.Profile.as_view() ), name='profile'),
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),

    path('activate/<uidb64>/<token>/',viewUser.activate, name='activate' ),

    path('tconf',viewUser.conf, name='activate' ),
]+ static(settings.MEDIA_URL)
