I just started using django-cms 3.01 and django 1.6.4/python 2.7.6. My last experience with django was 1.4 and I've never used django-cms before now.
I am trying to follow the instructions in the official documentation on Extending the Page & Title Models, but I am experiencing an issue.
The custom field I need to add is very similar to the example, so I simply used their code exactly. Rand a syncdb, started the server and everything was going well. The field shows in the admin just fine. There is an entry in the admin menu for "Icon Extensions." I click add, and I get to the form to upload the file. I go to upload the file, and I receive the following error:
DoesNotExist at /admin/the_site_name/iconextension/add/
IconExtension has no extended_object.
...
Exception Type: DoesNotExist
Exception Value: IconExtension has no extended_object.
Exception Location: /Users/me/Sites/the_site_name/env/lib/python2.7/site-packages/django/db/models/fields/related.py in __get__, line 326
Most likely I'm just missing something simple, but I can't figure it out. Should I have a foreignkey linking it directly to the page? I thought it was handled automatically, but obviously I'm not completely getting it jsut yet.
Any help is appreciated.
You must edit extensions in the frontend editing toolbar. Add a button to toolbar as described in the section "Adding a Toolbar Menu Item for your Page extension" in the documentation you linked above.
Related
I am working on an existing django project where admin console is extensively used.
With my latest run of package upgrade for my application admin page layout has changed.
Models have started appearing on all the pages, leaving a small space to display form fields.
For example this is how form page look like now:
Original Form view was occupying the whole page like this:
Any clue on what has been changed and which setting to change to get back the original view?
From the django-3.1 release notes,
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.
You can refer Customizing the AdminSite class - (django doc) to know more about customizing the AdminSite
Try this, open your browser and clear all the history then login back in again and it should work. I am sure the browser has cached an old version of Django admin.
I had the same problem when using version 3.1. I started a new demo app with version 2.2 to demonstrate something and when I got back to version 3.1 I got that issue, So what I did was just clear the browser history and everything came to its original state.
I have a snippet called event, After upgrading to wagtail 2.5.1 (Still i am not sure if this issue is related to version 2.5.1) The previous events aren't displayed on the wagtail admin page anymore. However i am able to search for them in the search box.any help is appreciated
As you can see from the screenshot below, 'Invite' app link is disabled. Actually this is just a text. If I open the model directly - /admin/invite/invite/ - I get 404 page.
What is the reason for that? That looks really strange, never seen that before.
Django 1.5.1
Worth mentioning - we don't use any special HTML admin templates.
It turned out it was because we've extended urls in admin.py file. That was the reason.
I have a photologue site set up and I really wanted to add an admin action so that when looking at a list of photos in the Django admin I can select a few and mark their respective checkboxes and via an admin action change them to some other gallery. How can something like this be implemented? I already got creating an admin class without having to write the photologue package and adding the action.. but have got no clue on how to send the "gallery" parameter.
Actually I think I got the answer after some more googling in this tutorial here (a bit old but it appears to work) link
We're running a Django website with rough 45 install Django admin classes. The handler is mod_fastcgi. Every once in a while about half the admins disappear from /admin/ screen. Touching the production.fcgi file restores everything to normal, but we have yet to determine the underling cause.
Any thoughts on what the underlying issue might be?
Django turns off admin for the model when it encounters an exception in admin. Examine admin code and make proper exception handling.