django-volt-dashboard icon indicating copy to clipboard operation
django-volt-dashboard copied to clipboard

Customize or remove unneeded dashboard cards?

Open sridhar562345 opened this issue 3 years ago • 6 comments
trafficstars

image

How to remove unwanted dashboard information cards?

sridhar562345 avatar Nov 22 '21 10:11 sridhar562345

Hello @sridhar562345,

Try to edit the dashboard page. The link for the main dashboard is thin one apps/templates/home/index.html

https://github.com/app-generator/django-volt-dashboard/blob/master/apps/templates/home/index.html

app-generator avatar Nov 22 '21 10:11 app-generator

Hello @app-generator ,

I am installing it as a custom admin theme using:

pip install django-admin-volt

So where should I place my customized HTML file inside my Django app to override default templates?

sridhar562345 avatar Nov 22 '21 10:11 sridhar562345

Hello @app-generator ,

I am installing it as a custom admin theme using:

pip install django-admin-volt

So where should I place my customized HTML file inside my Django app to override default templates?

@sridhar562345 were you able to replace the default HTML file? I'm trying to do the same thing.

dlopespenna avatar Feb 09 '22 20:02 dlopespenna

Hello @app-generator , I am installing it as a custom admin theme using:

pip install django-admin-volt

So where should I place my customized HTML file inside my Django app to override default templates?

@sridhar562345 were you able to replace the default HTML file? I'm trying to do the same thing.

Hi @dlopespenna,

You will have to fork the repo and change the template according to your use case, that's the only way I got succeded. I wasn't able to do this by replacing the templates directly in the Django templates.

sridhar562345 avatar Feb 11 '22 15:02 sridhar562345

Hello @app-generator , I am installing it as a custom admin theme using:

pip install django-admin-volt

So where should I place my customized HTML file inside my Django app to override default templates?

@sridhar562345 were you able to replace the default HTML file? I'm trying to do the same thing.

Hi @dlopespenna and @sridhar562345 You can override or replace by adding your own file to a directory called admin somewhere on your template search path (defined in settings.TEMPLATES). For example, in my settings I have

TEMPLATES = [
    {
        'BACKEND': ...,
        'DIRS': [ BASE_DIR \ 'templates' ],
    },
]

and then I can override the dashboard default by adding my own templates/admin/index.html.

The documentation doesn't provide much info on working with django-admin-volt, but you can generally just follow the normal Django documentation on the admin page.

andreashhpetersen avatar May 17 '22 12:05 andreashhpetersen

Hello @app-generator , I am installing it as a custom admin theme using:

pip install django-admin-volt

So where should I place my customized HTML file inside my Django app to override default templates?

@sridhar562345 were you able to replace the default HTML file? I'm trying to do the same thing.

Hi @dlopespenna,

You will have to fork the repo and change the template according to your use case, that's the only way I got succeded. I wasn't able to do this by replacing the templates directly in the Django templates.

I have copied templates and templatetags from the admin-volt in library to my app. I am facing issue related to templatetags. Apparently you have to add app in settings which is already in installed apps becuase it is my main app. I even renamed the templatetags py file to app name. Screenshot attached for reference.

image

image

Please guide me what I am doing wrong in this case.

Spirit-Maker avatar Aug 30 '23 10:08 Spirit-Maker