Thanks Ken
all my urls are as follow:
from django.contrib import admin
from django.contrib.auth import views
from django.urls import path, include
from core.views import index, about
from userprofile.views import signup
urlpatterns = [
path('', index, name='index'),
path('dashboard/leads/', include('lead.urls')),
path('dashboard/patients/', include('patient.urls')),
path('dashboard/treatments/', include('treatment.urls')),
path('dashboard/appointments/', include('appointment.urls')),
path('dashboard/', include('dashboard.urls')),
path('about/', about, name='about'),
path('sign-up/', signup, name='signup'),
path('log-in/', views.LoginView.as_view(template_name='userprofiles/login.html'), name='login'),
path('log-out/', views.LogoutView.as_view(), name='logout'),
path('admin/', admin.site.urls),
]
each of my app are structured the same:
One of my template looks like this:
{% extends "core/base.html" %}
{%block title%} Patients {% endblock %}
{% block content %}
<div class="py-6 px-8">
<h1 class="mb-4 text-xl">Patients</h1>
<a href="{% url 'add_patient' %}" class="inline-block py-4 px-6 bg-teal-600 rounded-xl text-white">Add patient</a>
{% if patients %}
<div class="mt-6 flex justify-between">
<p class="py-4 px-2 bg-gray-200 font-semibold w-full">Name</p>
<p class="py-4 px-2 bg-gray-200 font-semibold w-full">Priority</p>
</div>
{% for patient in patients%}
<div class="flex justify-between">
<p class="py-4 px-2 w-full {% cycle 'bg-gray-100' ''%}"><a href="{% url 'patients_detail' patient.id %}">{{patient.full_name}}</a> </p>
<p class="py-4 px-2 w-full {% cycle 'bg-gray-100' ''%}">{{ patient.get_priority_display}}</p>
</div>
{% endfor %}
{% else %}
<p class="mt-6 px-2" > No patients found</p>
{% endif %}
</div>
{% endblock %}
and therefore my config.JS is as so:
/** @type {import ('tailwindcss').Config} */
module.exports = {
content:[
'patient/templates/patient/*.html',
'core/templates/core/*.html',
'lead/templates/lead/*.html',
'dashboard/templates/dashboard/*.html',
'appointment/templates/appointment/*.html',
'treatment/templates/treatment/*.html',
'userprofile/templates/userprofile/*.html',
],
theme:{
extends: {},
},
plugins:[],
}