Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
Base layout does not load when accepting dynamic url

I am using web.py for a web project. I have the following url structure

urls = (
    '/', 'Home',
    '/register','Register',
    '/postregistration', 'PostRegistration',
    '/login', 'Login',
    '/check-login', 'CheckLogin',
    '/logout', 'Logout',
    '/post-activity', 'PostActivity',
    '/profile/(.*)/info', 'userInfo',
    '/profile/(.*)', 'Profile',
    '/abcd', 'abcd'
    )

Everything works fine but when i try to visit pages which have dynamic link like "/profile/anything" my web page loads without the css & js added in base layout. On inspecting and checking sources i noticed that on these urls my all css & js file have html content inside them.

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm going to chance the code seen within the static files, is the HTML you're serving from the any url endpoint.

The static/ URL is resolving through your anything URL, because they don't start with an absolute path. Here's an example of a CSS Link, I can see in the screenshot:

<link href='static\css\profile.css'> (relative from the current path)

should look more like:

<link href='/static/css/profile.css'> (absolute from the server root)

The same applies for your JS. More about relative pathing can be perused here: Relative path in HTML

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!