{% extends 'base.html' %} {% load djinsight_tags %} {% block title %}Home - djinsight Example{% endblock %} {% block content %}

Welcome to djinsight Demo!

This is a demonstration of the djinsight package - a high-performance Django analytics system. Browse articles, products, and courses to see live view tracking in action!

📊 View Analytics Dashboard

Latest Articles

Each article tracks views automatically using djinsight

{% for article in articles %}
{{ article.title }}

{{ article.content|truncatewords:20 }}

By {{ article.author }} on {{ article.published_at|date:"M d, Y" }}
{% if article.total_views > 0 %}
🔥 {{ article.total_views|format_view_count }} views
{% endif %}
{% total_views_stat obj=article %} {% if article.unique_views > 0 %} {% unique_views_stat obj=article %} {% endif %}
{% empty %}
No articles yet!

Visit the admin panel to create some sample articles.

{% endfor %}
🛍️ Popular Products
{% for product in popular_products %}
{{ product.name }}
${{ product.price }} {% if product.total_views > 0 %} • {{ product.total_views|format_view_count }} views {% endif %}
{% if product.total_views > 0 %} {% total_views_stat obj=product %} {% endif %}
{% empty %}

No products yet. Add some products to see analytics!

{% endfor %} {% if popular_products %} View All Products {% endif %}
🎓 Popular Courses
{% for course in popular_courses %}
{{ course.title }}
by {{ course.instructor }} {% if course.total_views > 0 %} • {{ course.total_views|format_view_count }} views {% endif %}
{% if course.total_views > 0 %} {% total_views_stat obj=course %} {% endif %}
{% empty %}

No courses yet. Add some courses to see analytics!

{% endfor %} {% if popular_courses %} View All Courses {% endif %}
🚀 djinsight Features Demonstrated
  • Automatic View Tracking: Every page view is tracked automatically
  • Modular Template Tags: Mix and match statistics components
  • Multiple Content Types: Works with Articles, Products, Courses, and any Django model
  • Live Statistics: Real-time view counts with Redis backend
  • Popular Content Detection: Automatically highlights trending content
{% endblock %}