django-urls Questions
5
Solved
In django framework,When there are changes in urls.py or model.py or views.py .We would restart httpd.
But as the documentation says we could restart runserver to get the latest changes.
Which is...
Ment asked 18/9, 2010 at 17:36
5
Solved
In Django templates, is there a variable in the context (e.g. {{ BASE\_URL }}, {{ ROOT\_URL }}, or {{ MEDIA\_URL }} that one can use to link to the home url of a project?
I.e. if Django is running...
Event asked 22/10, 2008 at 16:14
1
Solved
I have a view that is part of a page, I am using HTMX to update this view multiple times (each time is a new question, the user answers, then the next question is shown). The rest of the page does ...
Animadversion asked 28/11, 2023 at 18:0
7
Solved
My project is named homefood, and when I runserver I get this error.Anybody have any clue how to fix this error.
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Usin...
Broderick asked 20/11, 2013 at 17:2
9
Solved
I've got two applications located on two separate computers. On computer A, in the urls.py file I have a line like the following:
(r'^cast/$', 'mySite.simulate.views.cast')
And that url will wo...
Collaboration asked 20/10, 2009 at 18:41
10
Solved
I have to build an url dynamically according to the current url. Using the {% url %} tag is the easiest way to do it, but I need the current url namespace to generate the new one dynamically.
How c...
Chokebore asked 22/3, 2010 at 11:0
2
Solved
How do I use DRF's reverse to call a complex URL from SimpleRouter?
My URL is at two places, one for teams, and one for games, as follows:
league.urls:
url(r'^team/', include('teams.urls')),
t...
Shortcoming asked 3/3, 2015 at 0:49
6
Solved
When include()ing urlconf from the Django app to the project's urls.py, some kind of app's name (or namespace) should be specified as:
app_namespace in include((pattern_list, app_namespace), name...
Hydranth asked 16/4, 2020 at 16:6
16
Solved
I am trying to process a form in django/python using the following code.
home.html:
<form action="{% url 'home:submit' %}" method='post'>
views.py:
def submit(request):
a = requ...
Godavari asked 26/1, 2017 at 21:25
6
I was trying to use the url template tag in django, but no lucky,
I defined my urls.py like this
urlpatterns = patterns('',
url(r'^analyse/$', views.home, name="home"),
url(r'^analyse/i...
Altar asked 22/11, 2009 at 2:25
7
Solved
I have looked a lot on google for answers of how to use the 'url' tag in templates only to find many responses saying 'You just insert it into your template and point it at the view you want the ur...
Selfsustaining asked 4/1, 2011 at 23:13
5
Solved
After upgrading to Django 4.0, I get the following error when running python manage.py runserver
...
File "/path/to/myproject/myproject/urls.py", line 16, in <module>
from django...
Transmarine asked 11/12, 2021 at 22:44
1
This is my django-project below to translate from English to French. *I use Django 4.2.1:
django-project
|-core
| |-settings.py
| └-urls.py
|-my_app1
| |-views.py
| └-urls.py
|-my_app2
└-lo...
Caltanissetta asked 22/6, 2023 at 0:41
0
I'm trying to translate the entire Django Admin including the url from English to French.
This is my django-project below. *I use Django 4.2.1:
django-project
|-core
| |-settings.py
| └-urls.py
...
Auspicious asked 17/6, 2023 at 0:19
1
This is my django-project as shown below. *I'm learning Translation with Django 4.2.1:
django-project
|-core
| |-settings.py
| └-urls.py
|-app1
| |-models.py
| |-admin.py
| └-urls.py
|-app2...
Balas asked 23/5, 2023 at 0:9
2
Solved
I have two urls in dispatcher pointing the same view:
path('posts/top/', posts, name='top'),
path('posts/new/', posts, name='new'),
I want view start as follows:
def posts(request, ordering):
......
Intrude asked 19/7, 2018 at 10:20
10
Solved
I'm trying to make a REST API in Django by outputting Json. I'm having problems if I make a POST request using curl in terminal. The error I get is:
You called this URL via POST, but the URL doesn...
Dignadignified asked 16/3, 2012 at 14:11
2
Solved
i wanna Move user to admin panel site in Django using {% url 'admin' %} but the problem is my template in rendering in an app and i dont wanna rewrite url("^admin/",admin.site.urls) in project/site...
Unstudied asked 15/7, 2017 at 20:22
4
Solved
I have a basic model named "Places" which has this view:
def view_index(request, place_name):
The user will access that view with a URL like this one:
http://server.com/kansas
"kansas" is a v...
Nydia asked 11/1, 2011 at 15:37
2
Solved
Suppose, this is an url which takes an argument (here, book_id) and pass the value to the views:
url(r'^/(?P<book_id>\w+)/$', 'pro.views.book', name='book'),
Is it possible for a url which...
Treva asked 2/12, 2013 at 0:12
2
Solved
I need to implement a structure similar to this: example.com/folder1/folder2/folder3/../view (there can be other things at the end instead of "view")
The depth of this structure is not known, and ...
Flagg asked 2/3, 2010 at 0:40
21
How can I see the current urlpatterns that "reverse" is looking in?
I'm calling reverse in a view with an argument that I think should work, but doesn't. Any way I can check what's there and why ...
Harmonyharmotome asked 14/8, 2009 at 0:49
5
I am referring https://www.webforefront.com/django/namedjangourls.html to understand django urlconfs. I have encountered terms instance namespace and application namespace. I know about namespaces ...
Kalakalaazar asked 12/3, 2018 at 14:22
5
Solved
This is my base.html
<!DOCTYPE html>
<head>
<title> My Site </title>
</head>
<body>
<div id="wrapper">
<!-- HEADER START -->
{% block nav %} {% ...
Area asked 31/12, 2011 at 14:12
4
Solved
I want to pass two parameters in my url pattern but i am getting error no-reverse match i.e 'projects'.While it works fine with only one parameter.
here is main urls file-
urlpatterns = [
path('...
Flintlock asked 22/7, 2018 at 10:23
1 Next >
© 2022 - 2024 — McMap. All rights reserved.