talpor / django-dashing

django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project. Inspired in the dashboard framework Dashing
BSD 3-Clause "New" or "Revised" License
731 stars 108 forks source link

Map URL arguments to parameters in widgets #5

Closed mverteuil closed 10 years ago

mverteuil commented 10 years ago

It would be nice if I could write a general widget, for example a github repository commit list (I have written this in my fork but it's pretty messy), to use URL parameters to pass configuration options like the repo to watch and the most recent commits.

I can see a case to be made for REST style URLs here (i.e. /widgets/githubcommits/talpor/django-dashing/) or parameterized requests (i.e. /widgets/githubcommits/?user=talpor&repo=django-dashing)

This project is fantastic and has good velocity and I'd be happy to discuss design and implementation of this feature if you like. Have you considered this yourself?

mtdb commented 10 years ago

Hi, I think that have third party widgets through a URL is a very good idea, right now I got to review the dashing ruby project to check the way they do, and I see that use a console command to cloning third party plugins, I think this is a good way to do it, the main difficulty I see is update the dashing/dashboard.html file to load the available plugins, this could solve with a configuration file and/or a templatetag.

I'm not sure if you were thinking something like this, I had not considered this feature but I think it can add value to the project.

mverteuil commented 10 years ago

Yes, I totally agree about the dashboard.html as well. I was thinking about how to solve it in my actual implementation but I had considered discussing it with you and for the meanwhile I just copied the original dashboard.html contents and added the other templates to the source directly since i cant easily override the template.

A registry in settings.py isnt a bad idea for this too. I'll open a ticket about this specific issue if you lie, as its a bit different from this one.

I will provide a real world example to better explain what I mean later on too.

I love this project! Great work!

On Thursday, October 23, 2014, Mauricio notifications@github.com wrote:

Hi, I think that have third party widgets through a URL is a very good idea, right now I got to review the dashing ruby project to check the way they do https://github.com/Shopify/dashing/wiki/Additional-Widgets, and I see that use a console command to cloning third party plugins, I think this is a good way to do it, the main difficulty I see is update the dashing/dashboard.html file to load the available plugins, this could solve with a configuration file and/or a templatetag.

I'm not sure if you were thinking something like this, I had not considered this feature but I think it can add value to the project.

— Reply to this email directly or view it on GitHub https://github.com/talpor/django-dashing/issues/5#issuecomment-60308536.

mverteuil commented 10 years ago

*if you like

On Thursday, October 23, 2014, Matthew de Verteuil onceuponajooks@gmail.com wrote:

Yes, I totally agree about the dashboard.html as well. I was thinking about how to solve it in my actual implementation but I had considered discussing it with you and for the meanwhile I just copied the original dashboard.html contents and added the other templates to the source directly since i cant easily override the template.

A registry in settings.py isnt a bad idea for this too. I'll open a ticket about this specific issue if you lie, as its a bit different from this one.

I will provide a real world example to better explain what I mean later on too.

I love this project! Great work!

On Thursday, October 23, 2014, Mauricio <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Hi, I think that have third party widgets through a URL is a very good idea, right now I got to review the dashing ruby project to check the way they do https://github.com/Shopify/dashing/wiki/Additional-Widgets, and I see that use a console command to cloning third party plugins, I think this is a good way to do it, the main difficulty I see is update the dashing/dashboard.html file to load the available plugins, this could solve with a configuration file and/or a templatetag.

I'm not sure if you were thinking something like this, I had not considered this feature but I think it can add value to the project.

— Reply to this email directly or view it on GitHub https://github.com/talpor/django-dashing/issues/5#issuecomment-60308536 .

mverteuil commented 10 years ago

Ok so I have looked into this and it was actually possible before the registry was introduced. The registry blocks you from doing this easily, so I will construct a PR to add options to do this and submit for review.

mverteuil commented 10 years ago

I've submitted a pull request in #7