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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?