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;








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.










share|improve this question


























  • Where is IFrame related code, Could you please update your question to include template file?

    – Devang Padhiyar
    Mar 27 at 4:33

















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.










share|improve this question


























  • Where is IFrame related code, Could you please update your question to include template file?

    – Devang Padhiyar
    Mar 27 at 4:33













0












0








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












1 Answer
1






active

oldest

votes


















0














Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()






share|improve this answer

























  • 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











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
);



);













draft saved

draft discarded


















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









0














Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()






share|improve this answer

























  • 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
















0














Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()






share|improve this answer

























  • 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














0












0








0







Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()






share|improve this answer













Try creating Map2 view in views.py. There could be problem with TemplateView.as_view()







share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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









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.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript