from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path,include
from . import views
from users  import views  as user_views
from django.contrib.auth import views as auth_views
from django.conf import settings


urlpatterns = [
    path('admin/', admin.site.urls),
    path('',views.mainhome_view, name='main'),
    path('blog/', include('Blog.urls')),
    path('register/', user_views.register, name = 'register'),
    path('profile/', user_views.profile, name = 'profile'),
    path('login/', auth_views.LoginView.as_view(template_name='login.html'), name = 'login'),
    path('logout/', auth_views.LogoutView.as_view(template_name='logout.html'), name = 'logout'),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)