Using iframe in Django, keep getting 'TemplateDoesNotExist'How to apply CSS to iframe?How to get the current time in PythonDoes Django scale?Getting the last element of a listHow do I get the number of elements in a list?Getting translation strings for jinja2 templates integrated with django 1.x?differentiate null=True, blank=True in djangoDjango 1.8.3 urlsHow to link my css, js and image file link in djangoPython - Get all the variable in template passed from views.py render() function
What is the reason behind water not falling from a bucket at the top of loop?
Export economy of Mars
Speaker impedance: rewiring four 8 Ω speakers for use with 8 Ω amp output
Is this popular optical illusion made of a grey-scale image with coloured lines?
What is the most 'environmentally friendly' way to learn to fly?
Difference between "jail" and "prison" in German
C# TCP server/client class
Reasons for using monsters as bioweapons
Approximating an expression for a potential
A wiild aanimal, a cardinal direction, or a place by the water
Which honorific is correct, oshumi or goshumi?
How to enable/disable Adobe host port in terminal?
How to avoid a lengthy conversation with someone from the neighborhood I don't share interests with
What is a summary of basic Jewish metaphysics or theology?
Is the first page of Novel really that important?
Skipping same old introductions
Is there a word that describes people who are extraverted and/or energetic, but uneducated, unintelligent and/or uncreative?
What does Argus Filch specifically do?
Have you been refused entry into the Federal Republic of Germany?
Why adjustbox needs a tweak of raise=-0.3ex with enumitem?
Is an "are" omitted in this sentence
Is it moral to remove/hide certain parts of a photo, as a photographer?
Has J.J.Jameson ever found out that Peter Parker is Spider-Man?
Why does BezierFunction not follow BezierCurve at npts>4?
Using iframe in Django, keep getting 'TemplateDoesNotExist'
How to apply CSS to iframe?How to get the current time in PythonDoes Django scale?Getting the last element of a listHow do I get the number of elements in a list?Getting translation strings for jinja2 templates integrated with django 1.x?differentiate null=True, blank=True in djangoDjango 1.8.3 urlsHow to link my css, js and image file link in djangoPython - Get all the variable in template passed from views.py render() function
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am using iFrame with Django 2.0.13. I keep getting TemplateDoesNotExist error, and I don't see what I'm missing.
I've looked at other answers here on StackOverFlow and I seem to be doing everything.
settings.py
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
TEMPLATES = [
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR],
'APP_DIRS': True,
'OPTIONS':
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
,
,
]
urls.py
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from NatureApp import views
urlpatterns = [
path('', views.index, name="index"),
path('NatureApp/', include('NatureApp.urls')),
path('admin/', admin.site.urls),
path(r'Map2.html', TemplateView.as_view(template_name="Map2.html"), name='Map2'),
]
views.py
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
# def index(request):
# return HttpResponse("Hello World!")
def index(request):
my_dict = 'insert_me':"Hello I am from views.py!"
return render(request,'NatureApp/index.html',context=my_dict)
Map2.html
should being showing. I see index.html
fine, but inside the IFrame I see the TemplateDoesNotExist
message.
I'm new to Django, I'm trying to include all code needed for troubleshooting.
python html django
add a comment |
I am using iFrame with Django 2.0.13. I keep getting TemplateDoesNotExist error, and I don't see what I'm missing.
I've looked at other answers here on StackOverFlow and I seem to be doing everything.
settings.py
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
TEMPLATES = [
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR],
'APP_DIRS': True,
'OPTIONS':
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
,
,
]
urls.py
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from NatureApp import views
urlpatterns = [
path('', views.index, name="index"),
path('NatureApp/', include('NatureApp.urls')),
path('admin/', admin.site.urls),
path(r'Map2.html', TemplateView.as_view(template_name="Map2.html"), name='Map2'),
]
views.py
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
# def index(request):
# return HttpResponse("Hello World!")
def index(request):
my_dict = 'insert_me':"Hello I am from views.py!"
return render(request,'NatureApp/index.html',context=my_dict)
Map2.html
should being showing. I see index.html
fine, but inside the IFrame I see the TemplateDoesNotExist
message.
I'm new to Django, I'm trying to include all code needed for troubleshooting.
python html django
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33
add a comment |
I am using iFrame with Django 2.0.13. I keep getting TemplateDoesNotExist error, and I don't see what I'm missing.
I've looked at other answers here on StackOverFlow and I seem to be doing everything.
settings.py
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
TEMPLATES = [
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR],
'APP_DIRS': True,
'OPTIONS':
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
,
,
]
urls.py
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from NatureApp import views
urlpatterns = [
path('', views.index, name="index"),
path('NatureApp/', include('NatureApp.urls')),
path('admin/', admin.site.urls),
path(r'Map2.html', TemplateView.as_view(template_name="Map2.html"), name='Map2'),
]
views.py
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
# def index(request):
# return HttpResponse("Hello World!")
def index(request):
my_dict = 'insert_me':"Hello I am from views.py!"
return render(request,'NatureApp/index.html',context=my_dict)
Map2.html
should being showing. I see index.html
fine, but inside the IFrame I see the TemplateDoesNotExist
message.
I'm new to Django, I'm trying to include all code needed for troubleshooting.
python html django
I am using iFrame with Django 2.0.13. I keep getting TemplateDoesNotExist error, and I don't see what I'm missing.
I've looked at other answers here on StackOverFlow and I seem to be doing everything.
settings.py
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
TEMPLATES = [
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR],
'APP_DIRS': True,
'OPTIONS':
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
,
,
]
urls.py
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from NatureApp import views
urlpatterns = [
path('', views.index, name="index"),
path('NatureApp/', include('NatureApp.urls')),
path('admin/', admin.site.urls),
path(r'Map2.html', TemplateView.as_view(template_name="Map2.html"), name='Map2'),
]
views.py
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
# def index(request):
# return HttpResponse("Hello World!")
def index(request):
my_dict = 'insert_me':"Hello I am from views.py!"
return render(request,'NatureApp/index.html',context=my_dict)
Map2.html
should being showing. I see index.html
fine, but inside the IFrame I see the TemplateDoesNotExist
message.
I'm new to Django, I'm trying to include all code needed for troubleshooting.
python html django
python html django
edited Mar 27 at 5:21
Devang Padhiyar
1,2158 silver badges24 bronze badges
1,2158 silver badges24 bronze badges
asked Mar 27 at 1:34
user1707389user1707389
361 gold badge1 silver badge6 bronze badges
361 gold badge1 silver badge6 bronze badges
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33
add a comment |
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33
add a comment |
1 Answer
1
active
oldest
votes
Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368518%2fusing-iframe-in-django-keep-getting-templatedoesnotexist%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
add a comment |
Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
add a comment |
Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()
Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()
answered Mar 27 at 7:17
MikeyMikey
1615 bronze badges
1615 bronze badges
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
add a comment |
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
Thanks! I did that, and changed urls.py : path(r'Map2', views.Map2, name='Map2'), I guess I didn't need the TemplateView.as_view() at all.
– user1707389
Mar 27 at 20:23
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368518%2fusing-iframe-in-django-keep-getting-templatedoesnotexist%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Where is IFrame related code, Could you please update your question to include template file?
– Devang Padhiyar
Mar 27 at 4:33