Add app model in new Page by drop-down select in Django - django

It is bit complicated so I hope that explain this properly.
I have app which is created within new Page in admin site. In that app I have also drop-down list with my installed apps like on picture.
drop-down of installed apps in new Page
I need someway to add models of selected app dynamicaly by add button at the end of this Page. So if I select app, with add button add model of app below page content, next select second app and add model below app added before. So at the end I will have filled Page with models of apps that I added.
Adding functionality like on this picture or with some add button or add button next to drop-down.
desired functionality
I dont have so much experiences in Django that I can make it self right now. I know that this is possible but I need help of you that you are Django Pro. I really need to make this done.

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.

Add a new field to Sitecore JSS

I created a simple Sitecore JSS Application and imported the same.
In connected mode, I want to add a few new fields. I added them to the template (Image 1) and they show up in the item (Image 2). When I query the item, I get the new fields in the json object as well (Image 4).
However, I cannot see the new fields in the experience editor (Image 3) and I am assuming I need to add those in the View. I am unable to locate where I need to add these fields or what I need to do, to have these show up.
Image 1: The modified template
Image 2: Both description and photo show up in the item
Image 3: Description and photo do not show up in the experience editor
Image 4: Json however returns these 2 properties
The Experience Editor use the Node.js app inside the /dist folder of your Sitecore webroot. (See also the config, you can have multiple apps)
Change your frontend, I Guess you use React, Vue, or Angular and upload/deploy to the dist folder.
You need to choose your dev workflow see:
https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/development-workflows.html
When you add your fields in Sitecore, you are using the Sitecore-First Workflow.
Hidden gem:
JSS add a extra Field "Always Display Field Editor Button in Experience Editor" to Renderings. In the Experience editor the Chrome Toolbar from a rendering has as first icon a Pencil, That opens a Field editor for all custom fields.

Button to create new page

I'm new to Mezzanine and django, in this moment I'm trying to make a button in a page template, the idea is to allow the registered user to do two things:
create a new daughter page of the current page
add an access link to a list of links of the current page
I would like to make a popup appear that asks for the name and content of the new page, I do not know if what I need is very complex to do with mezzanine, I study the djangogirls tutorial (tutorial.djangogirls.org) and I reviewed the examples of the mezzanine documentation (mezzanine.jupo.org/docs/content-architecture.html), but I do not see how to do what I need, this is the link for my mezzanine project: github.com/Dacastror/inicio_mezzanine
in advance I appreciate the help.

django admin: Adding a textarea and a button that invokes a function

On the main admin screen I want a link that when clicked would bring up a page with a textarea along with a button that when clicked will invoke a python function. That function would return data that would be displayed on the page below the textarea.
If this were a regular page that was part of my app I could easily do this, but I'm not sure how to integrate something like this into my admin page. Everything thing in admin seems to be tied to a model, and this is not. Do I have to create a dummy model for this? Let's say I do create a dummy model, then how do I get django to display my custom template for this?
Can anyone help with this?
You can use this django app: https://github.com/jsocol/django-adminplus to add links at the bottom of the list of models without adding a dummy once.

problems in virtumart cart page and product description page

I am using Virtuemart 2 and Joomla 2.5 . i have assigned slideshow module in home page, but slide show module is displayed in Cart Page too. I'm much confused and I have no idea to solve it.
Like Shairya said, modules depend on the item ID to determine if they need to display or not. If a page in Joomla does not have a corresponding menu item, then it will inherit the item ID from the page that linked to it. You can do a couple of things to fix your issue. First, you can make a new menu and create a menu item for the VM cart. You don't have to put the menu in a module, it does not need to display for it to work.
You can also install Advanced Module Manager and use the Display on Home Page filter for the slideshow. AMM will not display modules on a page that inherits the home page item ID if you use this filter.