question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a blueprint name like the python flask?

See original GitHub issue

Like this, add a group

@Location("/index", name="index")
class index

@Location("/admin", name="admin")
class Admin


route<Admin>() {
    get<index>() {
     if call.groupName == "admin.index" {
          process...
     }
   }
}

Splice their father’s name with the current function name to form the view name

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
cy6erGn0mcommented, Oct 1, 2018

Use typesafe instead

@Location("/admin")
class Admin {
    @Location("/index")
    class Index

    @Location("/page/{id}")
    class Page(id: Int)
}

// ....

route<Admin.Index> { index ->
    call.respondText("admin index")
}

route<Admin.Page> { page ->
    call.respondText("Page ${page.id}")
}
0reactions
oleg-larshincommented, Aug 10, 2020

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modular Applications with Blueprints
Flask uses a concept of blueprints for making application components and supporting common patterns within an application or across applications.
Read more >
What are Flask Blueprints, exactly?
A Flask blueprint helps you to create reusable instances of your application. It does so by organizing your project in modules ...
Read more >
How to Use Blueprints to Organize Your Flask Apps
Flask is a simple, easy-to-use microframework for Python that can help you build scalable and secure web applications.
Read more >
Organize Flask Apps with Blueprints
We can organize our Flask apps via a built-in concept called Blueprints, which are essentially the Flask equivalent of Python modules. Blueprints are...
Read more >
Blueprints — Explore Flask 1.0 documentation
This blueprint would define the views for routes like /admin/login and /admin/dashboard. It may also include the templates and static files that will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found