[GH-ISSUE #521] django admin layout defect #373

Closed
opened 2026-02-26 10:31:09 +03:00 by kerem · 3 comments
Owner

Originally created by @ThomasWaldmann on GitHub (Apr 15, 2023).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/521

Since some change recently, the layout of the django admin is defect:

  • the main menu still gets shown normally
  • but any of the item views there, e.g. "hosts" or "users" has (parts of) the main menu repeated above their main table

IIRC, I didn't change any CSS or anything related to this, so guess this is some unexpected collateral damage of another change.

Here's how the "Hosts" view looks like (I searched for a special host to not show arbitrary hosts for privacy reasons):

Screenshot 2023-04-15 at 13 55 39

Recent changes:

  • #520
  • #516
  • some more before that (after a long time of no changes), but they were rather github actions testing related
  • I also removed all social auths from local_settings.py.
Originally created by @ThomasWaldmann on GitHub (Apr 15, 2023). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/521 Since some change recently, the layout of the django admin is defect: - the main menu still gets shown normally - but any of the item views there, e.g. "hosts" or "users" has (parts of) the main menu repeated above their main table IIRC, I didn't change any CSS or anything related to this, so guess this is some unexpected collateral damage of another change. Here's how the "Hosts" view looks like (I searched for a special host to not show arbitrary hosts for privacy reasons): <img width="1237" alt="Screenshot 2023-04-15 at 13 55 39" src="https://user-images.githubusercontent.com/356103/232218614-b5c69a48-4137-4c87-8975-1b887c74c729.png"> Recent changes: - #520 - #516 - some more before that (after a long time of no changes), but they were rather github actions testing related - I also removed all social auths from `local_settings.py`.
kerem 2026-02-26 10:31:09 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ThomasWaldmann commented on GitHub (Apr 15, 2023):

@nougad do you also have this issue on your site?

<!-- gh-comment-id:1509747659 --> @ThomasWaldmann commented on GitHub (Apr 15, 2023): @nougad do you also have this issue on your site?
Author
Owner

@ThomasWaldmann commented on GitHub (Apr 15, 2023):

This is the piece of html injected between header and content that either shouldn't be there or at least should be hidden:

    <div class="main shifted" id="main">
          
<button class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar" aria-label="Toggle navigation"></button>
<nav class="sticky" id="nav-sidebar">
  
    <div class="app-accounts module">
      <table>
        <caption>
          <a href="/admin/accounts/" class="section" title="Models in the Accounts application">Accounts</a>
        </caption>
        
          <tr class="model-userprofile">
              <th scope="row"><a href="/admin/accounts/userprofile/">User profiles</a></th>
              <td><a href="/admin/accounts/userprofile/add/" class="addlink">Add</a></td>
          </tr>        
      </table>
    </div>
  
    <div class="app-auth module">
      ...
<!-- gh-comment-id:1509753136 --> @ThomasWaldmann commented on GitHub (Apr 15, 2023): This is the piece of html injected between header and content that either shouldn't be there or at least should be hidden: ``` <div class="main shifted" id="main"> <button class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar" aria-label="Toggle navigation"></button> <nav class="sticky" id="nav-sidebar"> <div class="app-accounts module"> <table> <caption> <a href="/admin/accounts/" class="section" title="Models in the Accounts application">Accounts</a> </caption> <tr class="model-userprofile"> <th scope="row"><a href="/admin/accounts/userprofile/">User profiles</a></th> <td><a href="/admin/accounts/userprofile/add/" class="addlink">Add</a></td> </tr> </table> </div> <div class="app-auth module"> ... ```
Author
Owner

@ThomasWaldmann commented on GitHub (Apr 15, 2023):

Ah, I forgot to run django-admin collectstatic --settings=local_settings.

Now it looks better:

Screenshot 2023-04-15 at 14 27 24
<!-- gh-comment-id:1509763140 --> @ThomasWaldmann commented on GitHub (Apr 15, 2023): Ah, I forgot to run `django-admin collectstatic --settings=local_settings`. Now it looks better: <img width="1163" alt="Screenshot 2023-04-15 at 14 27 24" src="https://user-images.githubusercontent.com/356103/232223572-beff6755-46e8-411b-8b09-856c3065a4bd.png">
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#373
No description provided.