Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django DRF JWT Authentication credentials were not provided on UpdateAPIView even for is_staff user
I'm implementing JWT authentication using Django REST Framework and djangorestframework-simplejwt in my project. I have an endpoint for updating a category. What I tried Verified that the JWT token is valid. Confirmed that the user is is_staff=True and is_superuser=True. Tried both PATCH and PUT methods. Question Why am I getting the error message: Authentication credentials were not provided. on this UpdateAPIView, even though JWT is configured and the user is admin? Is there something specific about UpdateAPIView or the way permissions are checked that I might be missing? Imports from rest_framework import generics from rest_framework.permissions import IsAdminUser from drf_spectacular.utils import extend_schema from .serializers import CategorySerializer from .models import Category from .limiter import AdminCategoryThrottle View @extend_schema( tags=["categories"], summary="Update category (admin only)", responses={201: CategorySerializer} ) class UpdateCategoryView(generics.UpdateAPIView): """ This endpoint allows an admin user to update a category. It is protected and only admin users can access it. """ serializer_class = CategorySerializer permission_classes = [IsAdminUser] throttle_classes = [AdminCategoryThrottle] queryset = Category.objects.all() lookup_field = "slug" Serializer from rest_framework import serializers from .models import Category class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ["name", "is_active"] read_only_fields = ["slug", "created_at", "updated_at"] def validate_name(self, value): if Category.objects.filter(name__iexact=value).exists(): raise serializers.ValidationError("Category already exists.") return value URL path( … -
What does _db used for in a django Model Manager
While trying to create a custom QuerySet and a custom Manager for a django Model I stumbled upon the documentation sections 1 and 2 that use the manager's _db property and i would like to understand what does this property do and why is it necessary to use it when overriding the get_queryset method. I read the code in the django repo and did some django db queries locally with different databases and printed the _db property but it seems it is always None. So, what is the use for it and why is it important to handle it as per doc 2? -
Gunicorn (Uvicorn Worker) continues processing requests after Heroku 30s timeout
I’m running a Django (ASGI) app on Heroku using Gunicorn with the Uvicorn worker to support WebSockets. Heroku has a hard 30-second request timeout. When a request exceeds 30 seconds, Heroku closes the connection as expected. Problem: Even after the Heroku timeout, Gunicorn/Uvicorn continues executing the request in the background, which wastes resources. Gunicorn command: newrelic-admin run-program gunicorn --workers 4 --worker-connections 200 --timeout 30 --max-requests 1000 --max-requests-jitter 500 --bind 0.0.0.0:8000 asgi:application Questions Why does Gunicorn/Uvicorn keep running the request after Heroku times out? Is there a way to cancel the request when the client disconnects? Should this be handled in Django (async cancellation/middleware), or via Gunicorn settings? Any help is appreciated. -
Correct implementation of Wright–Malécot inbreeding coefficient using shortest paths (Python/Django)
I am implementing the Wright inbreeding coefficient (F) for individuals in a pigeon pedigree (Django application, relational database). The current implementation builds the pedigree using a breadth-first search (BFS) up to a fixed number of generations and computes F using the classical formula: 𝐹=∑[(1/2)^(𝑛1+𝑛2+1)] (1+𝐹𝐴) where: n1 is the number of generations between the sire and the common ancestor, n2 is the number of generations between the dam and the common ancestor, 𝐹𝐴 is the inbreeding coefficient of the common ancestor. To reduce complexity, the algorithm intentionally: considers only the shortest path from sire and dam to each common ancestor, does not enumerate all possible loops in the pedigree. Although this approach works for simple pedigrees, the computed F values are incorrect for more complex cases involving: multiple independent loops, repeated ancestors through different paths, deeper or overlapping inbreeding structures. Specifically: the algorithm underestimates F when a common ancestor appears via more than one valid loop, contributions from additional paths are ignored, recursive calculation of 𝐹𝐴 propagates the same limitation. I am looking for clarification on whether: the Wright–Malécot coefficient can be correctly computed using shortest paths only, or all valid ancestral loops must be explicitly enumerated (or otherwise accounted … -
Existing Django project on Pythonanywhere refuses to correctly use static?
I have done the guide and yet i still cannot get it to work correctly. These two screenshots are the closest i have come to success attempt1 attempt2 This is how the site is suppose to look like https://github.com/zekaekop/The-Django-Project. Project settings.py: /home/zekaekop/The-Django-Project/testing_django/settings.py """ Django settings for testing_django project. Generated by 'django-admin startproject' using Django 5.2.7. For more information on this file, see https://docs.djangoproject.com/en/5.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.2/ref/settings/ """ from pathlib import Path import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-tcfa7m=f*$het2078=iywfz8w7^(u+m^&ya-r9y)(=hhiediu2' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False ALLOWED_HOSTS = ['zekaekop.pythonanywhere.com','localhost','127.0.0.1',] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'crispy_bootstrap5', 'crispy_forms', 'django_cleanup', 'ckeditor', 'post', 'home', 'user_profile', 'accounts', 'admin_panel', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'testing_django.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR,'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'testing_django.wsgi.application' # Database # … -
Does using Django model choices for search filters add server load on every page request?
I’m building a Django-based classifieds website. Previously, my search form populated districts and categories using database queries like: districts = ( AdPost.objects .filter(admin_verified=True) .values_list("district", flat=True) .distinct() ) To improve consistency and performance, I’ve now moved both district and category to static choices in the model. Example: class AdPost(models.Model): CATEGORY_CHOICES = [ ('fish', 'fish'), ('cow', 'cow'), ] DISTRICT_CHOICES = [ ('e', 'e'), ('j', 'j'), ] category = models.CharField(max_length=50, choices=CATEGORY_CHOICES) district = models.CharField(max_length=30, choices=DISTRICT_CHOICES) In my view, I now pass these directly: categories = AdPost.CATEGORY_CHOICES districts = AdPost.DISTRICT_CHOICES And render them in the search form: <select name="district"> {% for key, label in districts %} <option value="{{ key }}">{{ label }}</option> {% endfor %} </select> Question Does using model choices like this add any noticeable server load on every page request, or are these choices loaded once and reused? I want to confirm that this approach is safe and efficient compared to querying the database on each request. What I expect (but want confirmation) My understanding is that: choices are static Python data They are loaded once when Django starts Rendering them in templates does not cause database queries Is this correct? Environment Django 4.x PostgreSQL / SQLite Standard class-based views -
Change color for StackedInline?
I'd like to change background color for these headers for different color (not white): Like this: My models: from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models class Request(models.Model): class Method(models.TextChoices): POST = "POST", "POST" GET = "GET", "GET" PUT = "PUT", "PUT" DELETE = "DELETE", "DELETE" name = models.CharField(verbose_name="Название", null=True, blank=True, max_length=256, help_text="Не обязательно") method = models.CharField( max_length=10, choices=Method, default=Method.GET, verbose_name="Метод" ) url = models.CharField(verbose_name="Путь", max_length=1024, help_text="Часть после домена, без query-параметров") def __str__(self): return self.name or f"{self.method} {self.url}" class Response(models.Model): name = models.CharField(max_length=128, null=True, verbose_name="Название") status_code = models.PositiveIntegerField(verbose_name="Код") body = models.JSONField(verbose_name="Тело", blank=True, null=True) request = models.ForeignKey(Request, on_delete=models.CASCADE, related_name="responses", verbose_name="Запрос") class Meta: verbose_name = "Ответ" verbose_name_plural = "Ответы" def __repr__(self): return self.name or f"{self.request.method} {self.request.url}" @property def query_parameters(self): return {param.key: param.value for param in self.params.all()} class RequestParam(models.Model): key = models.CharField(verbose_name="Название", max_length=128) value = models.CharField(verbose_name="Значение", max_length=128) response = models.ForeignKey(Response, on_delete=models.CASCADE, related_name="params") My admin.py: from django.contrib import admin from django.urls import reverse from django.utils.safestring import mark_safe from app.server.models import Request, RequestParam, Response class RequestParamInline(admin.TabularInline): model = RequestParam extra = 1 @admin.register(Response) class ResponseAdmin(admin.ModelAdmin): inlines = [RequestParamInline] class ResponseInline(admin.StackedInline): model = Response extra = 1 show_change_link = True verbose_name = "Вариант ответ" verbose_name_plural = "Варианты ответов" fields = ["status_code", "body", "summary"] readonly_fields = … -
How to do nested inlines in Django?
I have models: from django.db import models class Request(models.Model): class Method(models.TextChoices): POST = "POST", "POST" GET = "GET", "GET" PUT = "PUT", "PUT" DELETE = "DELETE", "DELETE" method = models.CharField( max_length=10, choices=Method, default=Method.GET, ) url = models.TextField() class Response(models.Model): request = models.ForeignKey(Request, on_delete=models.CASCADE, related_name="responses") body = models.TextField(null=True) class RequestParam(models.Model): key = models.TextField() value = models.TextField() response = models.ForeignKey(Response, on_delete=models.CASCADE, related_name="params") And I'd like to display then all nested request response1 params response2 params ... How can I do it? -
How to make different url aliases work for local django development
I am using django-tenants and created various aliases that all point to localhost. If the local development server is reachable via http://localhost:8000/ and I can login to the admin as expected. If I use e.g. http://other_url.local:8000/django-admin the login form is also presented but I get an error message: 403 Forbidden CSRF verification failes cookie not set. How can I achieve testing for different clients locally without installing an nginx with different vhosts. Settings: CSRF_COOKIE_SAMESITE = None CSRF_COOKIE_SECURE = False Thanks and Regards -
Django Can't find table during insert: LINE 1: SELECT 1 AS "a" FROM "qmgr_def_rules" WHERE "qmgr_def_rules"
I'm trying to add a row to my model, but it keeps coming back with: django.db.utils.ProgrammingError: relation "qmgr_def_rules" does not exist LINE 1: SELECT 1 AS "a" FROM "qmgr_def_rules" WHERE "qmgr_def_rules"... Some context: I have 3 different applications under the same django project. I have 2 different postgres schemas: rules and django. The django schema is set to default where all the django specific tables go. The rules schema is for internal data where I can set interval timers, object definitions, etc. I have multiple tables in the rules schema for different types of data. When I use the admin panel to insert/update/delete on any other table in that schema, it works. Just not def_rules for some odd reason. A few really odd things: Updates work Deletions work Inserts break with error above through admin panel Inserts work if done through django shell (this is the shell that I used) from admin_page.models import QmgrDefRules from django.utils import timezone # Try to create a test entry with all required fields try: test_entry = QmgrDefRules( # Primary key - required qmgr='TEST', # Required boolean fields (NOT NULL in DDL) moni_core_enabled=False, moni_inventory_enabled=False, qreset=True, # Has default=true in DDL dbinsert_0_value=False, # Has default=false in … -
Django admin update get_queryset only for "change" view
In my django project admin I have an Order model. I display a bunch of information in the change page with the help of custom inlines. As I use a lot of related models, I want to prefetch/select the related objects but only for the change page (not the list page). I need to update the get_queryset method with a conditional branch "if this is the change view" but I can't find a proper way to do that. Any ideas? -
Why does Django Http404 return a JSON payload while all other Http error responses don't?
Django's http response.py library provides an Http404 class that can be used to raise a "not found" exception which returns a 404 along with the following JSON payload: {"detail":"Not found."}. However there are no other HTTP error response classes that do this. All the other standard error classes don't (such as HttpResponseBadRequest, HttpResponseServerError, HttpResponseBadRequest, etc). What is the rationale behind only providing a single error class (for a 404) that returns a JSON payload? -
Dealing with m2m changes in Django on object save
So I'm building a webhook functionality for a particular Django model, as in I trigger the webhooks for 2 events. One is for creation and one for modification, as in I wanna trigger them everytime an object of that model is created/updated. So, generally for other models, the pattern I follow is: class Model1(models.Model): ... fields ... def save(self. *args, **kwargs): self.is_new = self._state.adding super().save(*args, **kwargs) self.post_save() def post_save(self): if self.is_new: # Trigger webhook with self object as the payload. trigger_webhook(self) Now, with the current model I'm working, the only difference is that it has an m2m field on it, like: class Model2(models.Model): ... fields m2m_field = models.ManyToManyField( Model3, through="Model1Model2", blank=True, related_name="...", ) ... Now, for this model, when save() is triggered, the m2m field always comes out empty as apparently it's updated beyond this point and we need the field as part of our payload in the webhook. One of the solutions I tried was use a signal like: @receiver(m2m_changed, sender=Model1Model2) def signal_ready(sender, instance, action, **kwargs): if action not in ("post_add", "post_remove", "post_clear"): return trigger_model_webhook(instance) This did work for the case where the m2m field was changed or added during creation, but the limitation with this approach is that … -
How to make django textfield required
I'm somehow unable to make the field required, setting null and blank to True has no effect. # models.py from django.db import models class ExampleModel(models.Model): text_field = models.TextField() # tests.py from django.test import TestCase from .models import ExampleModel class ExampleModelTestCase(TestCase): def test_text_field_integrity(self): with self.assertRaises(Exception): example = ExampleModel.objects.create() -
How to insert single <li>?
I am trying to handle multi-level menu with AlpineJS. Is it posible to insert single <ul> (or </li>) in the code below? <template x-if="item.has_children"> <!-- insert <ul> here--> </template> <template x-if="! item.has_children"> <!-- insert </li> here--> </template> -
Celery crashes when PgBouncer closes idle connections (idle timeouts enabled)
I’m encountering an issue when running Celery with PgBouncer and PostgreSQL after enabling idle connection timeouts. My stack includes: Django (served via Tornado) Celery (workers + beat) PostgreSQL PgBouncer (in front of PostgreSQL) Due to a large number of idle database connections caused by Tornado + Django, I introduced idle timeout settings to protect PostgreSQL from running out of connections. PgBouncer idle_transaction_timeout=240 (4mins) client_idle_timeout=240 PostgreSQL idle_in_transaction_session_timeout=300000 (5mins) idle_session_timeout=300000 (5mins) Problem: After applying these settings, Celery occasionally crashes with the following error: [2025-12-16 06:12:01,578: ERROR/MainProcess] Unrecoverable error: DatabaseError('client_idle_timeout\nserver closed the connection unexpectedly\n\tThis probably means the server terminated abnormally\n\tbefore or while processing the request.\n',) Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/celery/worker/__init__.py", line 351, in start component.start() File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 393, in start self.consume_messages() File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 885, in consume_messages self.connection.drain_events(timeout=10.0) File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 276, in drain_events return self.transport.drain_events(self.connection, **kwargs) File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py", line 760, in drain_events item, channel = get(timeout=timeout) File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/scheduling.py", line 39, in get return self.fun(resource, **kwargs), resource File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py", line 780, in _drain_channel return channel.drain_events(timeout=timeout) File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py", line 578, in drain_events return self._poll(self.cycle, timeout=timeout) File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/__init__.py", line 287, in _poll return cycle.get() File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/scheduling.py", line 39, in get return self.fun(resource, **kwargs), resource File "/usr/local/lib/python2.7/site-packages/djkombu/transport.py", line 31, in _get m = … -
Django Deployment on Render: ModuleNotFoundError for WSGI Application The Problem
Demo of the Project The Problem I am attempting to deploy a Django portfolio project to Render. While the project runs perfectly on my local machine using python manage.py runserver, the deployment fails during the build process. The Render logs indicate that Gunicorn cannot locate the project module, even though the folder structure appears correct in my GitHub repository. Error Log: Bash ==> Running 'gunicorn foremanbportfolio.wsgi:application --bind 0.0.0.0:$PORT' Traceback (most recent call last): ... ModuleNotFoundError: No module named 'foremanbportfolio' ==> Exited with status 1 Minimal Reproducible Example 1. Project Structure: My repository is structured as follows: Foreman-B_MyPortfolio/ ├── manage.py ├── portfolio/ │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ ├── wsgi.py │ └── asgi.py ├── pages/ │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ ├── views.py │ └── static/ # App-specific static │ └── pages/ │ ├── css/ │ ├── js/ │ └── images/ ├── static/ # Global static folder (all large assets) │ ├── admin/ # Admin CSS/JS/images │ ├── bootstrap/ │ ├── css/ │ ├── js/ │ ├── img/ │ └── rest_framework/ ├── templates/ │ └── pages/ │ └── foremanbportfolio.html └── staticfiles/ 2. Current Configuration … -
My Journey as a Beginner Web Developer – Need Advice [closed]
As a beginner web developer, I started my journey with **HTML, PHP, and MySQL**. I built only one real project, a **school management system** . One day, I saw someone working with **React** as a front-end developer. That moment really inspired me — I felt a bit of envy and motivation at the same time. I decided to start learning **JavaScript**, and after a few months of understanding the basics, I moved on to **React**. My long-term goal has always been to become a **full-stack developer**. While learning React, some friends advised me to choose **Node.js** as my backend, saying that _React and PHP don’t really make sense together_. I followed that advice and started learning **React + Node.js**.So far, I’ve completed **three to four small React projects**, built my **portfolio** (https://abouzari.vercel.app/), and spent **more than six months learning JavaScript and React**. Later, I enrolled in **OpenLabs (Ghana)** for an **8-month full-stack developer training program**. At the beginning, I faced a challenge: I wasn’t learning much because we were covering fundamentals I had already learned earlier — **UI/UX, HTML, CSS, JavaScript, CSS frameworks, and jQuery**. Because of that, I decided to start **Node.js on my own** while continuing with **React**. … -
"No module named django_heroku" (or django_on_heroku) error
I'm trying to install OWASP PyGoat, and then create a secure version of it. I followed method 2 on the repository's site (https://github.com/adeyosemanputra/pygoat?tab=readme-ov-file#method-2), but running the "python3 manage.py migrate" command yielded the error message in this post's title. I used "pip3 list" to verify that django_heroku was installed. I also tried with the newer django_on_heroku, but got the same result. I saw on another post that somebody tried installing psycopg-binary to fix this, but that's already installed as well. What else should I do to diagnose this problem? -
When building platforms with multiple Python services (FastAPI, Flask, Django, internal APIs), we kept facing the same issues:
When building platforms with multiple Python services (FastAPI, Flask, Django, internal APIs), we kept facing the same issues: • Authentication duplicated across services • Roles and permissions drifting over time • Weak tenant isolation • No clear audit trail We built Verge Auth to solve this centrally. It’s a Python-first authentication & authorization service that: Integrates once across FastAPI, Flask, Django, or custom Python APIs Automatically generates permissions from routes Enforces RBAC and tenant isolation centrally Provides detailed audit logs It can be: Fully self-hosted using Docker Compose (on-prem) Or used as a managed service This is aimed at teams running multiple Python services, not simple apps. Would love feedback: • Would this simplify your setup? • What would make you hesitant to adopt it? -
I just couldn't connect Railway volume With my django-Project
Here in settings.py I've added if os.environ.get("MOUNT_MEDIA"): MEDIA_ROOT = "/app/media" print("Using Railway mounted volume for MEDIA_ROOT") else: MEDIA_ROOT = BASE_DIR / "media" print("Using local folder for MEDIA_ROOT") MEDIA_URL = "/media/" in urls.py if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) else: # allow Django to serve media in production (NOT recommended, but works) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) Model is image = models.ImageField(upload_to="products", default="product.jpg") description = models.TextField(blank=True, null=True) Whatever I do. I can't get to view those images..! Here is the edit product view where I am being able to view the photo @login_required def edit_product(request, pk): product = get_object_or_404(Product, pk=pk, user=request.user) if request.method == "GET": # print("GET request for product data") # Return product data as JSON for prefill return JsonResponse({ "id": product.id, "name": product.name, "price": float(product.price), "discounted_price": float(product.discounted_price) if product.discounted_price else "", "stock_quantity": product.stock_quantity, "description": product.description, "status": product.status, "image": product.image.url if product.image and hasattr(product.image, "url") else "" }) elif request.method == "POST": # Update product with submitted form data product.name = request.POST.get("name") product.price = request.POST.get("price") product.discounted_price = request.POST.get("discounted_price") or None product.stock_quantity = request.POST.get("stock_quantity") product.description = request.POST.get("description") product.status = request.POST.get("status") == "True" if "image" in request.FILES: product.image = request.FILES["image"] product.save() return JsonResponse({"success": True, "message": … -
Django Admin is showing a different model
I understand there might be a design issue here but I'm a little confused. I have two very similar models => Submission and Partial Submission. There are two other models linked to them, CheckedSubmission and CheckedPartialSubmission. The way they are displayed and checked is pretty similar, it's just that I need a separate submission model for user convenience. The problem is not with the models, but with how Django admin chooses to display them -- the submission model for some reason displays partial submissions, and the partial submission model is showing submissions. The fields and related names might be the issue too, the partial check model has this: submission = models.ForeignKey(PartialLRSubmission, on_delete=models.CASCADE, related_name="partial_checks") key_source = models.ForeignKey(AnswerKey, on_delete=models.CASCADE, related_name="partial_checks", null=True) And the full check model has this: submission = models.ForeignKey(LRSubmission, on_delete=models.CASCADE, related_name="checks") key_source = models.ForeignKey(AnswerKey, on_delete=models.CASCADE, related_name="checks", blank=True, null=True) Here's a PasteBin with models, inlines and Admins. -
How to set table column width to django admin list_display?
I want column foo (TextField 2500 chars) to have a width of 30% in admin view. Yet whatever I try, the columns widths remain equal (50% / 50%). td.foo {width: 30%;} has no effect at all. admin.py: class FooAdmin(ModelAdmin): list_display = ['foo', 'bar'] # foo column width should be 30% class Media: css = {'all': ('css/custom.css', )} custom.css: table { table-layout: fixed; } td.field-foo { width: 30%; } Working minimal html example of desired result: <!DOCTYPE html> <html> <head> <style> table { table-layout: fixed; } td.foo { width: 30%; } </style> </head> <body> <table border="1"> <tr> <td class="foo">30% width</td> <td>Cell 2</td> <td>Cell 3</td> </tr> </table> </body> </html> -
Viviene Sandhu: Experienced Mediator & Litigator
Viviene Sandhu is a highly seasoned Advocate and Co-Managing Partner at Clifford Law LLP, listed in the Law Guide Singapore directory for her comprehensive practice. Admitted to the Singapore Bar in 1998, she possesses over 25 years of experience in dispute resolution. Viviene's core practice areas include contentious Family Law, Employment Law, and Personal Injury & Negligence Claims, as well as Wills & Probate. Beyond litigation, she is a distinguished Principal Mediator at the Singapore Mediation Centre and an Accredited Mediator (Level 4) with the Singapore International Mediation Institute (SIMI). Viviene Sandhu is committed to providing every client with clear, strategic, and compassionate legal counsel to navigate complex legal processes. -
How to see changes in django admin base.css
I want to change some css in static/admin/css/base.css After some attempts I now fail to understand the static-file concept at all. As a matter of fact I can delete the whole static directory without any effect/error (browser CTRL + F5). # settings.py STATIC_URL = "static/" STATIC_ROOT = BASE_DIR.joinpath('static') # urls.py if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) Long story short; How to change base.css?