Showing admin page of previous project in django - django

While running server of new project getting the admin page of the previous project how to get the admin page of current project?
I tried to add"^" in the urls.py file but it is not working at all

Related

how to create view for django root module

I have a django project with nested smaller apps call: blog, research, report.
I would like to create a view at the root folder (django project level) so that it displays all the blog, research and report posts.
what can i do?
usually i wire the django project urls so that the request '' go to the blog home view. Now i dont want it to be wired that way anymore. I would like that the '' go to a page (i think at django project root level) that can render all blog, research and report articles.
I just start a new app to handle those 3 types, step by step as usual.

Django Admin now showing model list in iframe — what changed?

I have built a Django application with a custom interface. It hasn't been changed in a couple of years.
These (previous) servers are running Django 3.0.8.
Recently I set up a new server, and the Django Admin interface now shows the model list in a scrolling iframe, and long tables on the right side are also scrolled independently of the page.
This server is running Django 3.2.3.
I don't like the new interface, but it more importantly it will require an extensive rewrite of our custom admin css.
Can anyone point me to information about the change, or tell me if there is a setting to disable it?
I found the answer in this Stack Overflow answer. I will leave this question up because the other answer doesn't mention iframes.
Django 3.1 added the new scrolling sidebar in an iframe.
To disable it add the following to the root urls.py file:
from django.contrib import admin
admin.autodiscover()
admin.site.enable_nav_sidebar = False
The 3.1 Release Notes say:
The admin now has a sidebar on larger screens for easier navigation. It is enabled by default but can be disabled by using a custom AdminSite and setting AdminSite.enable_nav_sidebar to False.
Reference links from the original answer:
Django 3.1 release notes
The Django admin site

Django admin not loading individual app pages

I've just set up a new local version of my django application, and all working fine until I checked on the django admin.
127.0.0.1:8000/admin works fine and brings up the usual Django Admin homepage with full list of apps, but when I click into any of the individual app elements it breaks. The URL changes, but instead of displaying that app's admin site it shows an oddly rendered version of the admin homepage, with the app list collapsed on left side of screen (see screenshots below)
Can't immediately see which parts of codebase could be relevant here, so please request copies of any code you want to see.
The correctly displayed Django Admin homepage
How it renders when I click into any of the individual app/model admin sites
As above, with list of all apps expanded from left
This happened to me when I upgraded to django 3.1.
Set admin.site.enable_nav_sidebar = False on your admin.py file.
from django.contrib import admin
admin.site.enable_nav_sidebar = False
Actually the admin does load the pages for every model but the nav_sidebar takes all the space. If you zoom out long enough you'll see the models and forms are there.

Modify Django Admin Page

I have a django admin where the name for the login was changed and after logging in the page is cut off. I went in to modify the page but it appears there is no admin/index under templates. I have looked throughout the project and can not find it anywhere. Is there an easy way to locate the files needed to proceed with the project?

How do I change my weblate site url

I installed my own weblate server somewhere, then I switched my nginx configuration to a domain name. I went into weblate's django admin, in sites section and updated the site entry to point to the right location.
I couldn't find anything related to this within settings.py. There's a default site id, but it's already set to 1.
After doing this, urls to projects were still using old url.
Update site entry in django admin and Restart the weblate django application. After restarting weblate, the new url from database started working.
There is also this documented section:
https://docs.weblate.org/en/latest/admin/management.html#changesite
Which should refresh website.