Giter VIP home page Giter VIP logo

Comments (4)

MarcSkovMadsen avatar MarcSkovMadsen commented on July 19, 2024 1

I love this push to get the repository cleaned up and would love a PR.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on July 19, 2024 1

Additionally any comments on what makes the repository useful (keep) and what does not (change) would be really, really valuable.

The intention is that this repo should be a valuable resource for inspiration and learning.

But it's also been on a journey pushing Panel forward and trying to find best practice solutions. 👍

from awesome-panel.

madeline-scyphers avatar madeline-scyphers commented on July 19, 2024

One thought I had about a useful section would be to have a template for a basic project somewhere. Like just the site getting initialized, with a dummy author, and a page or two. It was a lot to look at with the whole repo. Though if all the unnecessary stuff is removed, maybe it will be fine as it is.

I also think that at least of some of the stuff that is in _site.py when you subclass _site.Site could potentially go directly into _site.Site making it easier to use.

For example in AwesomePanelSite.create_application

...
if "thumbnail" in params:
    params["thumbnail"] = THUMBNAILS_ROOT + params["thumbnail"]
if "resources" in params:
    resources = params["resources"]
    if "code" in resources:
        resources["code"] = CODE_ROOT + resources["code"]
    if "mp4" in resources:
        resources["mp4"] = MP4_ROOT + resources["mp4"]
    if "gif" in resources:
        resources["gif"] = GIF_ROOT + resources["gif"]
return super().create_application(**params)

You could work work that into _site.Site such that it takes certain input parameters that tells it which params to append certain roots to. something like {"thumbnail": THUMBNAILS_ROOT}, and then just evaluate and whatever ones were passed in. For the ones that are keys of a dictionary in params (i.e. resources), maybe something like the {("resources", "code"): CODE_ROOT} That feels bad. I don't like that, But I am just trying to think of a way to not have to subclass _site.Site if not needed.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on July 19, 2024

Hi @madeline-scyphers

I will close this one as I believe the initial problem code in application/config has been solved.

I would be helpful if you could move your suggestions above into new, specific feature requests. Thanks.

I have opened the following requests

from awesome-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.