The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

Django changed path for urls


Hello Team,

I have installed Django template and as default all working fine,
Now we want some URL path changed, so we made changes to _keenthemes\url.py file,
If you see we have added App/ in URL,
After that, we see assets are not loading, as it looks for App/asset path,

So how can we change the default asset path for images? or other items.

The image is linked at https://imgur.com/a/OlkiA4q



from django.contrib import admin
from django.urls import include, path
from django.conf import settings
from _keenthemes.views import SystemView

urlpatterns = [
path('admin/', admin.site.urls),

# Dashboard urls
path('App/', include('dashboards.urls')),


path('App/', include('futures.urls')),

# Auth urls
path('login/', include('auth.urls')),


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Jigar,

Since you have added the "App/" prefix to your URLs, you need to update the STATIC_URL in your Django project's settings. This is necessary to ensure that the static files are served from the correct path based on your new URL structure.

In your settings.py file, update the STATIC_URL:


STATIC_URL = "/App/static/"


This change reflects the new URL path of your app and will allow Django to correctly locate the static files.

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(