Django Full-Stack Private Product Catalogue with 50-Field CRUD for Users & Admin

Answered using AI by Vibe Coding

Code Question:

you give full complete code user form fields are
recordid,continents,Country,Industry,Sector,Sub Sector,Segment,Sub Segment,Product name,Company name,brand name,Geography,Country of origin,Product description,Ingredients list,Std Ingredients list,Product link,Site name,website address,Volume_Scale,Volume_Subscale,Currency,Price,mrp, image gallery,

Manufacture_Date,Expiry Date,Flavour,Calories,Claims,Year,Date_Of_Entry,Remarks,foodCategory,food subCategory,food Sector,food SubSector,food Segment,food SubSegment,Product type,Foodtype,food group, Allergens,

Manufacturer name,Manufacturer Address,Manufacturer Email,Manufacturer Contact No,Manufacturer sitelink, Ingredient type,Package Type,Additives,Packaging Materials,

Launch Date,Product Form,Nutritional Facts,creator,created_datetime,last_modified_datetime,manufacturing_places, and

user entry the these data corresponding user only display data full curd operation user form and admin

Code Solution:

Below is a single-project, full-stack solution that gives every user his/her own private “product catalogue” and gives the admin a super-power view over every record.
The stack is deliberately light:

  • Django 4.x (Python) – ORM, auth, admin, REST
  • SQLite – no extra server needed
  • Bootstrap 5 – quick, responsive UI
  • htmx – no hand-written JavaScript for CRUD
  • Pillow – image gallery
  • django-filter + django-tables2 – search / paginate

You can copy-paste the snippets in the order shown, run the three commands at the end, and you will have:

  1. / – login page
  2. /products/ – list of the current user’s products only
  3. /products/create/ – full 50-field entry form (split into tabs)
  4. /products/<id>/ – detail (read-only)
  5. /products/<id>/update/ – edit
  6. /products/<id>/delete/ – delete
  7. /admin/ – Django admin with every record, users, groups, etc.

  1. Project bootstrap

python -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate
pip install django==4.2.7 djangorestframework django-filter django-tables2 pillow python-decouple
django-admin startproject product_catalogue
cd product_catalogue
python manage.py startapp products

  1. settings.py (only the deltas)

# product_catalogue/settings.py
import os
from decouple import config

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "rest_framework",
    "django_filters",
    "django_tables2",
    "products",               # our app
]

MIDDLEWARE = [
    "django.middleware.security.SecurityMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.common.CommonMiddleware