Giter Site home page Giter Site logo

hashrouting's People

Contributors

jshaffstall avatar rhurlbatt avatar s-cork avatar starwort avatar subhashb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hashrouting's Issues

[Enhancement] URL variables in routes

I would like a way of mimicking dynamic deep links using routing.

Example:

  • @routing.route('users/{user}', title="{user}'s profile")
  • user should be available to the routed form, perhaps in a self.dynamic_vars dict or similar
  • Would behave similarly to url_dict but allow the developer a form closer to dynamic deep links

I can have a go at implementing this myself, but I cannot guarantee code quality

onbeforeunload

Currently a warning is fired when leaving the app.

This should be the default behaviour when leaving a form with a before_unload method

It should not be the default behaviour when leaving the app unless explicitly set.

How does one call native JS functions?

In normal Anvil forms it's self.call_js but it appears that no such property exists on routing.Routes. Could someone tell me? (Is there a better place to ask about this?)

Instructions on cloning and using the dependency

The forum post on HashRouting outlines the thought process and development history of the dependency. It also (presumably) contains the instruction to use the dependency.

  • Are the instructions up-to-date?
  • Can they be added to the README here?
  • Are there any special instructions if I have a production app already, and want to introduce HashRouting?

I am relatively new to Anvil and would love to use the HashRouting dependency, but I am unsure how to go about it.

Thank you for this dependency!

Set the title of the page dynamically

Currently, we can set page title by setting the title parameter of the @routing.route, but we can supply only items in url_keys for dynamic title construction. If the form is displaying an article, we would want to display its title instead of its id.

@routing.route('article', url_keys=['id'], title="Article-{id} | RoutingExample")
class ArticleForm(ArticleFormTemplate):

Is it possible to set the title of the page directly? We can then load the article object from DB and set the title manually in __init__.

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.