Django admin action for photologue gallery change - django

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

Related

Can I access my website from Django admin panel?

I am trying to develop a website where I can see the homepage as it is from Django admin panel. The reason I want that is I want to edit the name of the static content like 'Home' to 'All' along with the change of slide show picture. In summary, I want to change the website layout from Django admin panel that is not accessible to users. Is that possible? I just want an idea of how to implement the process.
Static texts you can change in admin panel with different modules:
for example django-rosetta or my own library Django-tof. https://github.com/wP-soft-GmbH/django-tof
But in your case, i think, you want to made something more.
For this case you can use django-flat-pages, already included in Django, if you have a static web-page.
you can edit every element on the page and after save, you can see it on the front.
if you really want to change the django templates, which you use in your views, you can create a simple template editor in the admin panel based on a widget like django-Ckeditor.

Django-Machina forum panel not showing in wagtail admin panel

I have a wagtail project being developed, essentially a blog with a forum. I chose django-machina as the forum I want to use because of how modular it is and how well it integrates into existing projects.
I followed the instructions in the documentation without issue, and the install was a success. I can access the app by going to /forum on my project.
However, the next step in the documentation refers to using the forum admin panel. My wagtail admin menu does not have a section for forum and I can't access the django admin panel as it is a wagtail project.
Where exactly can I access the django-machina forum admin panel in a wagtail project? Or would I have to recreate it somehow?
Jake, it's not so difficult. Let your project be named 'my_project'. So than we should go to my_project/my_project/urls.py. There we see something like this:
url(r'^django-admin/', admin.site.urls),
And what this string say to us? It show how to get the vanilla django-admin! Ok, now just go to your.site/django-admin and run your forum! ;)
Unless the documentation specifically mentions Wagtail, it's more likely that the admin panel shows up in the Django admin backend rather than the Wagtail one. On a standard Wagtail project this is found at the URL /django-admin/, but it depends on what you have specified in your project's urls.py file.

WYSIWYG form for users in Django CMS

Recently I started using Django CMS, it turns out to be a great tool for web developer. But one thing I couldn't have achieved so far is creating a form for users so they could submit some content created with WYSIWYG editor. I thought maybe there's some easy way to add editor available in admin panel (the one you use with creating / modifying Text plugins), doesn't seem like that unfortunately.
Long story short - I'd like to enbable users to use the same WYISWYG editor available from admin panel, without giving them permission to access admin panel. Is it possible? Or do I have to use some additional extension so I could embed similiar editor on my Page(s)?
Maybe you should look into divio/djangocms-text-ckeditor. It offers a HTMLFieldto be parts of models and a TextEditorWidgetto be parts of your app's forms.
So based on the comments I assume, when you say "users", you mean anonymous site visitors that are not registered to the CMS? And you want to display a WYSIWYG form field to them to "submit some content"?
If my assumptions are correct, you just need to create an own plugin or maybe an app.
See http://docs.django-cms.org/en/release-3.4.x/how_to/custom_plugins.html

Django model layout with multiple columns

My admin page for a specific model has two stackedInlines. Currently they display one under the other. I would like them to display side by side so The page would look like this (don't have enough reputation to embed the image :[ )
Any easy way to go about this without having to write my own admin page?
If that's the only solution, how exactly would I go about that?
you can override Django admin template for each app in your project.
you just have too create same folder as your app in template directory and overriding html.
How to override and extend basic Django admin templates?
You can add CSS/Javascript to admin page by defining class Media.
You'll have to override the admin template to accomplish this. See roshan's answer for more info.

django-registration login and register on one page

Is there a good way to have both the login and register forms for django-registration on one page? I've had trouble finding a way to do it now that the backend system is enforced. Is there a view that can be overwritten that would allow you to add both forms to it? Anyone done this before or can point to an article about this?
Edit: Just to clarify I have the whole django-registration and login system set up and working properly, I'd just like to get both forms on the same page. I do not have access to their views.
Just hard-code your login-form in the registration-html-template. It should work like a charm.
You can always override the default login and registration views/templates. You can take a look at this link and see if this was what you were thinking to do. Then, you can read the Django documentation for further information about making custom login and registration views and templates as well.