Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize or remove unneeded dashboard cards? #2

Open
sridhar562345 opened this issue Nov 22, 2021 · 6 comments
Open

Customize or remove unneeded dashboard cards? #2

sridhar562345 opened this issue Nov 22, 2021 · 6 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@sridhar562345
Copy link

image

How to remove unwanted dashboard information cards?

@app-generator
Copy link
Owner

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 app-generator self-assigned this Nov 22, 2021
@app-generator app-generator added the help wanted Extra attention is needed label Nov 22, 2021
@sridhar562345
Copy link
Author

sridhar562345 commented Nov 22, 2021

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?

@dlopespenna
Copy link

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.

@sridhar562345
Copy link
Author

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.

@andreashhpetersen
Copy link

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.

@Spirit-Maker
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants