Questions tagged [routes]

1

votes
2

answer
1.7k

Views

Using variables across Flask routes [duplicate]

This question already has an answer here: Are global variables thread safe in flask? How do I share data between requests? 2 answers I am learning Flask and have a question regarding use of variables in the context of routes.For Example, my app.py: from flask import Flask, render_template app = Fla...
James Wonder
0

votes
0

answer
14

Views

Passing the language parameter to the next page (url) when submitting the form

I'm having problems with getting the right language parameter in the url when submitting a form. My application has two possible language parameters: de and en. I've made a middleware called setLocale.php with this function: public function handle($request, Closure $next) { $locale = $request->seg...
ofmiceandmoon
0

votes
0

answer
4

Views

How to change property of newly created collection on click

I am creating a new collection from current schema with same properties. I am using nodemailer to verify email by setting a schema key to value true upon clicking the link. It is happening successfully if changing value of current schema from this code:- router.get('/verify',function(req,res){ con...
NoobCoder
1

votes
1

answer
44

Views

Unable to find modules when routing Dart Angular Tour of Heroes

I have been following the Dart Angular Tour of Heroes tutorial. I made it to part 5, where routing is taught. But I got stuck at the section where the router is made available. I typed out the code, but it does not build. I get the following error: [SEVERE] build_web_compilers|entrypoint on web/main...
Comrade SparklePony
1

votes
1

answer
44

Views

How do I restrict an auto-generated route to accept only POST requests?

We have overridden Sonata's RegistrationController using Easy Extends. In our generated appDevProjectContainerUrlMatcher class, we now have the following lines: if ($pathinfo === '/password/reset') { return array ( '_controller' => 'Application\\Sonata\\UserBundle\\Controller\\RegistrationControll...
Patrick at work
1

votes
2

answer
35

Views

Redirect to a specific page in Laravel using ajax

I have created ajax function when the user clicks the button, it will check first the users profile if account is already confirmed. If not, it will redirect back to user dashboard. However, my problem now is that the page is not displayed or it is not redirecting back. The result can only be seen i...
Eem Jee
1

votes
1

answer
794

Views

Root Route Not Redirecting in Express

My issue stems around strictly the '/' route. I think this is called the root route. When a user connects to my site, I check to see if there's session data on the said user so that he/she doesn't always have to re-log when the browser closes. If there is no session data on the user, then my website...
Programmer wannabe
1

votes
1

answer
174

Views

Express Routes serving up as expected on local machine. But not when on Nginx

Routes serving up as expected on my local machine. But not serving up /public or /api routes. I've setup a serverblock for node.mydomain.com, installed a node app, and am getting 404 errors for all the routes express is supposed to be serving (static and api). node.mydomain.com => /public/index.htm...
Alice
1

votes
1

answer
291

Views

symfony 3 route not found for login/ register

I dont use FOS What is wrong? My links directs to 'login' and 'register' and I am getting this: No route found for 'GET /login/' Also getting this for register No route found for 'GET /register/' My debug:router looks like: Entity and Controller are in UserBundle routing.yml:
Jakub Stanek
1

votes
2

answer
161

Views

ember js trigger actions on my route

current URL: http://localhost:4200/bands router.js: Router.map(function() { this.route('bands', function(){ this.route('band', {path: ':slug'}, function(){ this.route('songs'); this.route('albums'); }); }); }); app/routes/bands.js export default Route.extend({ actions: { createBand: function(){ this...
Antediluvian
1

votes
0

answer
28

Views

how to create routes that accepts any number of path parameters in Laravel?

I have to pass dynamic list of email addresses in the GET request, e.g. GET http://example.com/[email protected]/[email protected]/.... and so on. I tried to do it with the following code. http://example.com/sendmail/{list} Can this be done with passing Array as a GET parameter?
Muhamamad Adil
1

votes
1

answer
44

Views

Php artisan route:list value means that

You see that URI section have {} that. but I can't understand what URI will be that position
Istiyak Amin
1

votes
1

answer
612

Views

How can I share logout method between components in Vue.js?

I found this nice mode to share a method between components in Vue.js Now my problem is this: I want share the logout method So i created this function into auth.ts file import Router from 'vue-router'; const router = new Router({ mode: 'history' }); export function logout() { router.replace('/'); /...
Janka
1

votes
0

answer
36

Views

How can i use the features of travel_mode: transit and transit_mode: rail for my android application?

I am developing an application that will show the duration, transit and fares for railway journey but i cant find any way to use the features provided in google directions api for android. how to retrieve the data from the json file? and the mode: transit is not included when i search for normal rou...
bell
1

votes
0

answer
151

Views

Include forwarded path phoenix

When forwarding to another router, something like: scope '/' do get page_controller, :index forward '/child', ChildWeb.Router do The page_path(conn, :other) inside the ChildWeb evaluates to '/other' As it was forwarded using the '/child' string, it would be great if page_path could actually be evalu...
Sam Houston
1

votes
2

answer
389

Views

MVC route is not using default action

In my web api, I have created this controller: public class DistributionGroupController : ApiController { [HttpGet] public ServiceResult Index(string id) { if (id == null) return null; else return new ServiceResult(); } } In addition, this is my route config. I am specifying my default action for my...
Matt Spinks
1

votes
0

answer
53

Views

Change params in the middle of the URL

I'm trying to change the params id and version in the middle of my URL: localhost:8080/parent/id/version/child I'm doing this in the parent component: this.router.navigate(['../../', newId, newVersion], { relativeTo: this.route }); The problem is, it navigates to localhost:8080/parent/newId/newVersi...
Leandro Lima
1

votes
1

answer
1.2k

Views

react-navigation Cannot read property 'routes' of undefined

My application to use to react-navigation the router, in accordance with the API method, the following problems: react-navigation : why 'routes' of undefined ? https://reactnavigation.org/docs/routers const SimpleApp = TabNavigator({}) const Simple = StackNavigator({ Home: { screen: SimpleApp }, Lo...
张东生
1

votes
1

answer
1.1k

Views

Why route on qnap is not working

I have two networks, 172.16.4.0/22 and 172.16.16.0/22. There are two firewalls/GW GW1: 172.16.4.1 & Internet GW2: 172 16.4.2 & 172.16.16.1 Behind GW2 are some spezial computer. I don´t like to use NAT on GW2, so each computer which likes to communicate with the 172.16.16.0/22 needs a route. I do t...
leon
1

votes
0

answer
33

Views

Rails routes set post and link to set method to post but still wrong

The function is, a user can press like to tweet, and redirect to the same page. Here's my route resources :tweets, only: [:index, :create] do member do post :like end end end and screenshot for checking with rails routes And here's the view But when I press Like, there's an error mes...
Adamlin0708
1

votes
3

answer
112

Views

How to display only companies which belongs to current user

I want to access show page based on the current user.id == company.user_id, i want show particular user added company details only, when the company_path link click. companies_controller.rb file is class CompaniesController < ApplicationController def index @companies = Company.all end...
Anuradha Withanage
1

votes
1

answer
306

Views

asp.net mvc routing with two controller or action name reference

I am not an advanced developer. I just started working with MVC. Few days back I had seen an example of ASP.NET MVC routing code where two controller or action name has been referenced. routes.MapRoute( name: 'test', url: '{controller}/{action}/{page}/{id}', defaults: new { controller = 'Home', acti...
Monojit Sarkar
1

votes
1

answer
43

Views

Submitting a form from one model's controller and view to a different model

I'm new to Rails and working on a sample app. The idea behind the app is that it's a computerized check-in sheet for kids to ride a school bus. There are four models: Family, Kid, SchoolRide, and HomeRide. For Family and Kid, I generated complete scaffolds, but for SchoolRide and HomeRide, they're j...
landmark
1

votes
0

answer
314

Views

Angular Universal - OG meta tags not working with child routes

My website hosted on http://abc.xyz.com OG meta tag works for the main page. If I am adding it to the child routes it doesn't work. for example - http://abc.xyz.com/pqr/slug-url. index.html component.ts this.meta.updateTag({ property: 'og:type', content: 'article' }); this.meta.updateTag({ property:...
Nilesh Mistry
1

votes
2

answer
692

Views

how to set default values for url parameters?

https://laravel.com/docs/5.5/urls#default-values In the docs it says, you may use the URL::defaults method to define a default value for this parameter that will always be applied during the current request. I don't understand what current request is I thought it is meant to be used as route('route...
Deeven
1

votes
1

answer
291

Views

Laravel multi auth | Route middleware

I have to tables which i am authenticating with users, admins. I have changed the config/auth.php accordingly for guards and providers. Now i have some guarded routes for admins like : Route::group(['middleware' => ['auth']], function () { Route::get('/admin', '[email protected]')->name('adminIn...
Gammer
1

votes
0

answer
527

Views

Vue ,listen to route param change but not child route change?

I have the following structure in vue.js ,using vue-router. routes: [ { path: '/domains', component: ListOfDomains }, { path: '/domain/:domainName', component: Domain, children: [{ // Photos Tab content will be rendered inside domain's // when /domain/:id/photos is matched path: 'posts', name: 'p...
Sainath S.R
1

votes
0

answer
23

Views

How to capture post method while redirecting from third party website to front end localhost page?

Hi all, I'm using Angular for front end and my route works perfectly in my local but when the third party website is redirecting to my localhost page i'm getting 404 error not found. And the third party website is redirecting to local host with a response in post method. How can i capture this page?...
anil chean
1

votes
1

answer
339

Views

Vue.js SPA with Laravel API

I have a problem with defining routes for frontend portion of the application. It is Vue.js with Vue Router. Since it is SPA I think defining all routes in Laravel is not the correct answer but it seems I need to somehow because content is not served with current setup. Does Vue Router fetch the ent...
1

votes
1

answer
150

Views

Laravel routes stop working when i have created Self-Signed SSL Certificate

recently i created self-signed ssl certificate following this tutorial: DigitalOcean self-signed SSL here is my .htaccess file in laravel/public directory: Options -MultiViews -Indexes RewriteEngine On # Handle Authorization Header RewriteRule ^(.*)$ public/$1 [L] RewriteCond %{HTTPS} !=on RewriteRu...
OF STTP
1

votes
1

answer
50

Views

What is the best way to handle the view routing in Web API Razor

I have this doubt, because always when I create a Web API project I use the API controllers to get data and I create a normal controller where I define all my methods that returns ActionResult to redirect to the views and I am not sure if this is the best way. What is the correct way to do this?
user3442776
1

votes
0

answer
38

Views

Swagger does not detect optional strings in URL Parameters

It seems Swagger is not able to detect optional URL parameters if it is of string format? For example: customers/{customerid}/loyalty/promotions/{memberid?} GetListOfPromotions(int customerId, string memberid = '') Is allowed when I tried in Fiddler (customers/1234/loyalty/promotions). But Swagger s...
Water
1

votes
0

answer
60

Views

Route conflict with public folder in Laravel 4.1.31

I have a route in my app/routes.php i.e. Route::get('sitemap', [ 'as' => 'sitemap', 'uses' => '[email protected]' ]); And sitemap.xml in public/ folder. When I hit the URL http://example.com/sitemap it returns the content written in public/sitemap.xml rather than executing a specified route f...
webwarrior
1

votes
0

answer
48

Views

React Route redirection failed

I cant understand why component UserLogout doesn't get rendered while i'm pressing the Logout Link. After clicking /currentroute changes to /logout but the view of /logout doesn't appear. Then comes in onEnter method and route /logout changes directly to /login. Are there some other methods except...
Daikiree Savage
1

votes
1

answer
644

Views

Waiting for dependencies [(&(component=Simple)(objectClass=org.apache.camel.spi.ComponentResolver))]

I am working with Apache Camel and I am defining a route that I need to access some headers. To accomplish that I use simple to access dynamically a header. from('direct:buildInformation') .setProperty('id', constant(simple('${header.headers[id]}'))) .to(simple('http://localhost/search?id=${h...
Erick Roseira
1

votes
1

answer
27

Views

ajax datatable laravel Linking

I have a datatable using yajrabox package with links to various strings. When I click on a link, it takes me to a 404 page with '/teams/'string'. How do I make this string a viewable page? I have tried using a slug, but I could be using it incorrectly and honestly I don't know where my error is. Her...
Bw70316
1

votes
2

answer
128

Views

MethodNotAllowedHttpException path without CSRF

I pass a route in laravel which is called by a function in JS and I have no control of it because it is external, this route is a post method since I need it to be that way but it generates me a MethodNotAllowedHttpException as I do to exclude certain routes of this validation. Note: I have already...
Mhurtado
1

votes
0

answer
99

Views

nuxtjs route map in order

I have an issues with nuxtjs route naming. Ex: my pages folder is page: -|blog: -|_categorySlug.vue -|_postSlug.html.vue -|service: -|index.vue When i access url like example.com/blog/demo-post-slug.html -> route map to /blog/_categorySlug.vue example.com/blog/demo-category-slug -> route map to /bl...
Phạm Jacob
1

votes
0

answer
41

Views

Host matching in Symfony3 routes

I have a website (example.com) which has a subdomain for the customer area like customer.example.com. Now I want to add a different subdomain which is exactly the same as that website but only has a different images. This should result in example.com equals demo.example.com and customer.exmaple.com...
Jay Wit
1

votes
0

answer
106

Views

Lumen Dingo Route:list

Installed Dingo framework in my lumen project 5.5 before that i was able to run and view all routes using the normal artisan command artisan route:list. After installing Dingo the route list shows just an empty list screenshot of route-list results. I am presuming dingo has handles its own routes li...
Roho

View additional questions