{% block linkcss %}{% endblock %} {% " /> <meta property="og:title" content="[Solved] How can I pass context data to sylesheet 'src' and image 'src' attributes? on python,django,template-context" /> <meta property="og:type" content="article" /> <meta property="article:tag" name="article:tag" content="python" /> <meta property="article:tag" name="article:tag" content="django" /> <meta property="article:tag" name="article:tag" content="template-context" /> <meta property="og:url" content="https://www.techqa.club/v/q/how-can-i-pass-context-data-to-sylesheet-src-and-image-src-attributes-31056750" /> <meta property="og:description" content="I have a _layout.html template as follows: <!DOCTYPE html> {% load staticfiles %} <html lang="en"> <head> {% block linkcss %}{% endblock %} <title>{% " /> <meta property="og:site_name" content="TechQA" /> <meta property="og:image" itemprop="image primaryImageOfPage" content="https://www.techqa.club/img/img_default.jpg" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:url" content="https://www.techqa.club/v/q/how-can-i-pass-context-data-to-sylesheet-src-and-image-src-attributes-31056750" /> <meta name="twitter:domain" content="TechQA.club" /> <meta name="twitter:title" content="[Solved] How can I pass context data to sylesheet 'src' and image 'src' attributes? on python,django,template-context" /> <meta name="twitter:description" property="og:description" itemprop="description" content="I have a _layout.html template as follows: <!DOCTYPE html> {% load staticfiles %} <html lang="en"> <head> {% block linkcss %}{% endblock %} <title>{% "/> <meta property="article:published_time" content="2015-06-25T17:19:21.390000" /> <meta property="article:published_time" name="article:published_time" content="2015-06-25T17:19:21.390000" /> <meta property="article:modified_time" content="2025-12-19T04:36:43.542000" /> <meta property="article:modified_time" name="article:modified_time" content="2025-12-19T04:36:43.542000" /> <meta property="article:author:username" name="article:author:username" content="IAbstract" /> <meta property="og:site_name" name="og:site_name" content="TechQA" /> <meta property="og:locale" name="og:locale" content="en_US" /> <meta name="revisit-after" content="3"> <meta name="webcrawlers" content="all"> <meta name="spiders" content="all"> <meta name='language' content='en'/> <meta name='geo.placename' content='United States'/> <meta name='robots' content='index, follow'/> <meta name='Googlebot-Image' content='follow, all'/> <meta name='rating' content='general'/> <meta name='audience' content='all'/> <link rel='dns-prefetch' href='//code.jquery.com' /> <link type="text/css" rel="stylesheet" href="https://www.techqa.club/css/github.css"> <link rel="canonical" href="https://www.techqa.club/v/q/how-can-i-pass-context-data-to-sylesheet-src-and-image-src-attributes-31056750" > <link rel="alternate" href="https://techqa.club" hreflang="en-US"/> <link rel="shortcut icon" href="https://www.techqa.club/img/favicon.png " type="image/x-icon"> <link rel='dns-prefetch' href='//ajax.googleapis.com' /> <link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900" rel="stylesheet" type="text/css"> <link type="text/css" rel="stylesheet" href="https://www.techqa.club/css/app.css"> <link href="/opensearch" rel="search" title="TechQA" type="application/opensearchdescription+xml"> <script async src="https://fundingchoicesmessages.google.com/i/pub-2199440138602787?ers=1" nonce="TtLptpgaqXOaBif-3n-EXw"></script><script nonce="TtLptpgaqXOaBif-3n-EXw">(function() {function signalGooglefcPresent() {if (!window.frames['googlefcPresent']) {if (document.body) {const iframe = document.createElement('iframe'); iframe.style = 'width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;'; iframe.style.display = 'none'; iframe.name = 'googlefcPresent'; document.body.appendChild(iframe);} else {setTimeout(signalGooglefcPresent, 0);}}}signalGooglefcPresent();})();</script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-2199440138602787", enable_page_level_ads: true }); </script> <!-- Global site tag (gtag.js) - Google Analytics Dikamian--> <script async src="https://www.googletagmanager.com/gtag/js?id=G-F469FFWQH9"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-F469FFWQH9'); </script> </head> <body class=""> <header class="main-header"> <div class="container"> <div class="row no-gutters"> <div class="col-6"> <a href="/"> <h1>TechQA.</h1> </a> </div> <div class="col-6"> <div class="searchMod"> <form id="searchForm" action="/sr" method="POST"> <div class="searchBox01" id="searchBox01"> <input type="text" id="searchKeyword" name="keyword" placeholder="Search question..." value="" maxlength="100" class="form-control" autocomplete="off"> </div> <input type="hidden" name="_token" value="LZACBSEX6X7aney7SlBOHROvZzXiW8jLao6tbc6u" autocomplete="off"> </form> </div> </div> </div> </div> </header> <section class="content"> <div class="container"> <div class="row"> <div class="ikanAtas"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:970px;height:250px" data-ad-client="ca-pub-2199440138602787" data-ad-slot="2207584572"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="col-md-8" itemscope="itemscope" itemtype="http://schema.org/QAPage"> <div class="wrapperLayout" itemprop="mainEntity" itemscope="" itemtype="http://schema.org/Question"> <link itemprop="image" href="https://www.techqa.club/img/logo-default.png"> <div class="box question"> <div class="box-header with-border"> <h1 itemprop="name"> <a href=""> How can I pass context data to sylesheet 'src' and image 'src' attributes? </a> </h1> <span class="text-muted text-date"> <span class="views">503 views</span> Asked by <span itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name"> <strong>IAbstract</strong> </span> </span> At <time class="d-none" datetime="2015-06-25T17:19:21+00:00" itemprop="datePublished" title="2015-06-25T17:19:21+00:00"> 2015-06-25T17:19:21+00:00 </time> <time datetime="2015-06-25T17:19:21.390000" title="2015-06-25T17:19:21+00:00"> 25 June 2015 at 17:19 </time> <time class="d-none" itemprop="dateModified" title="2025-12-19T04:36:43+00:00"> 2025-12-19T04:36:43+00:00 </time> </span> </div> <div class="box-body"> <div itemprop="text" class="post-text"> <p>I have a <code>_layout.html</code> template as follows:</p> <pre><code><!DOCTYPE html> {% load staticfiles %} <html lang="en"> <head> {% block linkcss %}{% endblock %} <title>{% block title %}{% endblock %}</title> <script type="text/javascript" src="{% static 'scripts/jquery-2.1.3.min.js' %}"></script> {% block scripts %}{% endblock %} </head> <body> {% block head %}{% endblock %} <table class="page_content"> <tr> <td> <div id="content"> {% block content %}{% endblock %} </div> </td> </tr> </table> </body> </html> </code></pre> <p>The page <code>home.html</code> extends the above with the following:</p> <pre><code>{% extends "generic/_layout.html" %} {% load staticfiles %} {% block title %}{{ cust_title }}{% endblock %} {% block linkcss %}<link rel="stylesheet" type="text/css" href="{% static '{{ cust_stylesheet }}' %}" />{% endblock %} {% block scripts %} <script type="text/javascript"> </script> {% endblock %} {% block head %} <table class="head"> <tr> <td class="center"> <img src="{% static '{{ cust_header }}' %}"> </td> </tr> </table> {% endblock %} {% block content %} <table class="content"> <thead align="center"> <tr> <th colspan="3" style="text-align: center">{{ cust_message }}</th> </tr> </thead> <tbody> </tbody> </table> {% endblock %} </code></pre> <p>The view is generic in that the code checks the path and gets the context data and page ...here is an example:</p> <pre><code># customer configurations constants: CUSTOMER_CONFIGS = { 'samplewebpage': { 'context': { 'cust_title': "Sample Customer Page", 'cust_stylesheet': "SampleWeb/style.css", 'cust_header': "SampleWeb/sample_header.png", 'cust_message': "Welcome to Sample Web Page" }, 'home': "SampleWebPage/home.html" }, } # generic view: def index(request): path = request.path.replace("/", "") context = CUSTOMER_CONFIGS[path]['context'] page = CUSTOMER_CONFIGS[path]['home'] return render(request, page, context) </code></pre> <p>Directory structure: <img src="https://i.stack.imgur.com/qpbxH.png" alt="directory structure"></p> <p>The <code>cust_title</code> works properly. So how can I pass the <code>cust_stylesheet</code> location and <code>cust_header</code> image source the same way? </p> <p>The actual rendering resembles the following:</p> <pre><code><link rel="stylesheet" type="text/css" href="/static/%7B%7B%20cust_stylesheet%20%7D%7D" /> <img src="/static/%7B%7B%20cust_header%20%7D%7D"> </code></pre> </div> <div class="tagcloud"> <a href="https://www.techqa.club/q/t/python"> <span>python</span> </a> <a href="https://www.techqa.club/q/t/django"> <span>django</span> </a> <a href="https://www.techqa.club/q/t/template-context"> <span>template-context</span> </a> </div> </div> <div class="box-footer"> <span class="source"> <a href="https://stackoverflow.com/questions/31056750/how-can-i-pass-context-data-to-sylesheet-src-and-image-src-attributes" target="_blank" rel="nofollow"> Original Q&A </a> </span> </div> </div> <div class="ikanPalsu"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Econ_respon --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2199440138602787" data-ad-slot="9990002217" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="counter-header my-3"> <span class="d-none" itemprop="answerCount">2</span> <h2>There are 2 answers</h2> </div> <div class="box answerQuestion"> <div id="wajab" class="box"> <div class="box"> <div class="post answerId-669fdd39a06677a8f26c5183 accepted" id="answer-669fdd39a06677a8f26c5183" class="box" data-answerid="669fdd39a06677a8f26c5183" itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer"> <a class="d-none" itemprop="url" href="#answer-669fdd39a06677a8f26c5183"></a> <div class="vote-count d-none" itemprop="upvoteCount" data-value="0">0</div> <div class="box-header"> <span class="username"> <img src="/img/user-default.png" onerror="this.src='/img/user-default.png';" class="answerAva" alt="Gocht" > <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <span itemprop="name" class="author-name"> <strong>Gocht</strong> </span> </span> <span title="2015-06-25T17:50:23.857000" class="dater d-none d-md-inline-block"> On <time class="d-none" itemprop="datePublished" title="2015-06-25T17:50:23+00:00" datetime="2015-06-25T17:50:23+00:00"> 2015-06-25T17:50:23+00:00 </time> <time title="2015-06-25T17:50:23.857000" datetime="2015-06-25T17:50:23.857000"> 25 June 2015 at 17:50 </time> </span> <span class="badge badge-danger"> BEST ANSWER </span> </span> </div> <div class="box-comment box-body"> <div class="comment-text"> <div class="" itemprop="text"> <p>As @DanielRoseman says in comments <em>You can't call tags inside other tags.</em> But it is possible to use variables. Then you could try this:</p> <pre><code>{% static cust_header %} </code></pre> <p>That should print your string properly.</p> </div> </div> </div> </div> <div class="AnswerWrapper" id="answer-669fdd39a06677a8f26c5183" data-answerid="669fdd39a06677a8f26c5183" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer"> <div class="post answerId-669fdd39a06677a8f26c5183"> <a class="d-none" itemprop="url" href="#answer-669fdd39a06677a8f26c5183"></a> <div class="vote-count d-none" itemprop="upvoteCount" data-value="0">0</div> <div class="box-header"> <span class="username"> <img src="/img/user-default.png" onerror="this.src='/img/user-default.png';" class="answerAva" alt="IAbstract"> <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <span itemprop="name" class="author-name"> <strong>IAbstract</strong> </span> </span> <span title="2015-06-25T17:40:15.653000" class="dater d-none d-md-inline-block"> On <time class="d-none" itemprop="datePublished" title="2015-06-25T17:40:15+00:00" datetime="2015-06-25T17:40:15+00:00"> 2015-06-25T17:40:15+00:00 </time> <time title="2015-06-25T17:40:15.653000" datetime="2015-06-25T17:40:15.653000"> 25 June 2015 at 17:40 </time> </span> </span> </div> <div class="box-comment box-body"> <div class="comment-text"> <div class="" itemprop="text"> <p><strong>NOTE: the method provided by @Gocht is preferable as it takes advantage of the django settings.</strong> I have left this answer simply as <em>another option</em> although maybe less favorable.</p> <p>Based on @DanielRoseman's comment above - "You can't call tags inside other tags." - I changed the customer configurations and the dependent template as follows:</p> <pre><code>'samplewebpage': { 'context': { 'cust_title': "Sample Customer Page", 'cust_stylesheet': "/static/SampleWeb/style.css", 'cust_header': "/static/images/SampleWeb/sample_header.png", 'cust_message': "Welcome to Sample Web Page" }, 'home': "SampleWebPage/home.html" } # template tags change <link rel="stylesheet" type="text/css" href="{{ cust_stylesheet }}" /> <img src="{{ cust_header }}"> </code></pre> <p>Based on these changes, the page loads correctly with it's specific style.css and header image: </p> <p><img src="https://i.stack.imgur.com/YbbrB.png" alt="sample web page with custom stylesheet and header image"></p> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="widget bottom-rel"> <div class="widget-title"> <h3>Related Questions in <strong>PYTHON</strong></h3> </div> <ul id="relatedBottom" class="relatedPost postbottom"> <li> <a href='https://www.techqa.club/v/q/new-thread-blocks-main-thread-30701983'> new thread blocks main thread </a> </li> <li> <a href='https://www.techqa.club/v/q/extracting-viewcount-subscribercount-from-youtube-api-v3-for-a-given-channel-where-channelid-does-not-equal-userid-30713009'> Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID </a> </li> <li> <a href='https://www.techqa.club/v/q/display-images-on-django-template-site-30713020'> Display images on Django Template Site </a> </li> <li> <a href='https://www.techqa.club/v/q/difference-between-list-and-dict-with-generators-30725389'> Difference between list() and dict() with generators </a> </li> <li> <a href='https://www.techqa.club/v/q/how-can-i-serialize-a-numpy-array-while-preserving-matrix-dimensions-30698004'> How can I serialize a numpy array while preserving matrix dimensions? </a> </li> <li> <a href='https://www.techqa.club/v/q/protractor-did-not-run-properly-when-using-browser-wait-msg-wait-timed-out-after-xxxms-30715541'> Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms" </a> </li> <li> <a href='https://www.techqa.club/v/q/why-is-my-program-adding-int-as-string-4-7-47-30656857'> Why is my program adding int as string (4+7 = 47)? </a> </li> <li> <a href='https://www.techqa.club/v/q/store-numpy-array-in-mysql-30713062'> store numpy array in mysql </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-omit-the-less-frequent-words-from-a-dictionary-in-python-30715549'> how to omit the less frequent words from a dictionary in python? </a> </li> <li> <a href='https://www.techqa.club/v/q/update-a-text-file-with-new-words-n-after-the-words-is-appended-into-a-list-30720199'> Update a text file with ( new words+ \n ) after the words is appended into a list </a> </li> <li> <a href='https://www.techqa.club/v/q/python-how-to-write-list-of-lists-to-file-30711899'> python how to write list of lists to file </a> </li> <li> <a href='https://www.techqa.club/v/q/removing-url-features-from-tokens-in-nltk-30686691'> Removing URL features from tokens in NLTK </a> </li> <li> <a href='https://www.techqa.club/v/q/optimizing-for-social-leaderboards-30715573'> Optimizing for Social Leaderboards </a> </li> <li> <a href='https://www.techqa.club/v/q/python-get-size-of-string-in-bytes-30686701'> Python : Get size of string in bytes </a> </li> <li> <a href='https://www.techqa.club/v/q/what-is-the-code-of-the-sorted-function-30709918'> What is the code of the sorted function? </a> </li> </ul> </div> <div class="widget bottom-rel"> <div class="widget-title"> <h3>Related Questions in <strong>DJANGO</strong></h3> </div> <ul id="relatedBottom" class="relatedPost postbottom"> <li> <a href='https://www.techqa.club/v/q/display-images-on-django-template-site-30713020'> Display images on Django Template Site </a> </li> <li> <a href='https://www.techqa.club/v/q/protractor-did-not-run-properly-when-using-browser-wait-msg-wait-timed-out-after-xxxms-30715541'> Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms" </a> </li> <li> <a href='https://www.techqa.club/v/q/django-invalid-literal-for-int-with-base-10-30720213'> Django invalid literal for int() with base 10: </a> </li> <li> <a href='https://www.techqa.club/v/q/removing-url-features-from-tokens-in-nltk-30686691'> Removing URL features from tokens in NLTK </a> </li> <li> <a href='https://www.techqa.club/v/q/django-noob-url-to-from-root-page-to-sub-page-30720234'> Django Noob URL to from Root Page to sub Page </a> </li> <li> <a href='https://www.techqa.club/v/q/django-admin-tables-not-displaying-correctly-30698030'> Django Admin tables not displaying correctly </a> </li> <li> <a href='https://www.techqa.club/v/q/django-with-chartkick-30709945'> Django with chartkick </a> </li> <li> <a href='https://www.techqa.club/v/q/django-urls-py-not-rendering-correct-template-30698033'> Django urls.py not rendering correct template </a> </li> <li> <a href='https://www.techqa.club/v/q/django-form-errors-before-submit-30711993'> django form errors before submit </a> </li> <li> <a href='https://www.techqa.club/v/q/django-admin-custom-app-index-with-context-30661187'> django admin: custom app_index with context </a> </li> <li> <a href='https://www.techqa.club/v/q/display-multiple-models-in-one-view-in-django-30704390'> Display multiple models in one view in Django </a> </li> <li> <a href='https://www.techqa.club/v/q/unexpected-noreversematch-error-when-using-include-in-urls-patterns-30720413'> Unexpected NoReverseMatch error when using include() in urls patterns </a> </li> <li> <a href='https://www.techqa.club/v/q/search-for-a-key-in-django-core-cache-30661208'> Search for a key in django.core.cache </a> </li> <li> <a href='https://www.techqa.club/v/q/django-webapp-on-an-apache2-server-hangs-indefintely-when-importing-nltk-in-views-py-30715896'> Django webapp (on an Apache2 server) hangs indefintely when importing nltk in views.py </a> </li> <li> <a href='https://www.techqa.club/v/q/django-flush-won-t-load-fixtures-30718881'> Django flush won't load fixtures </a> </li> </ul> </div> <div class="widget bottom-rel"> <div class="widget-title"> <h3>Related Questions in <strong>TEMPLATE-CONTEXT</strong></h3> </div> <ul id="relatedBottom" class="relatedPost postbottom"> <li> <a href='https://www.techqa.club/v/q/how-can-i-pass-context-data-to-sylesheet-src-and-image-src-attributes-31056750'> How can I pass context data to sylesheet 'src' and image 'src' attributes? </a> </li> <li> <a href='https://www.techqa.club/v/q/acess-context-from-request-in-django-70243379'> Acess context from request in Django </a> </li> <li> <a href='https://www.techqa.club/v/q/records-getting-duplicated-when-mapped-to-object-in-templatecontext-database-sqlquery-function-37830994'> Records getting duplicated when mapped to object in TemplateContext.Database.SqlQuery function </a> </li> <li> <a href='https://www.techqa.club/v/q/streaming-template-context-using-context-processor-in-django-32349283'> Streaming template context using context processor in django </a> </li> <li> <a href='https://www.techqa.club/v/q/structural-directive-ngtemplatecontextguard-not-working-77042496'> Structural directive - ngTemplateContextGuard not working </a> </li> <li> <a href='https://www.techqa.club/v/q/template-context-for-angular-components-and-routermodule-77160095'> Template context for Angular components and RouterModule </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-pass-data-from-child-template-to-parent-template-then-to-included-template-in-django-43148215'> How to pass data from child template to parent template then to included template in Django? </a> </li> </ul> </div> <div class="ikanPalsu"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Econ_respon --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2199440138602787" data-ad-slot="9990002217" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="col-md-4"> <div class="sampingIkan"> <script type="text/javascript"> atOptions = { 'key' : '2e0d99b51effa0c5bfdb2929ca02a4c8', 'format' : 'iframe', 'height' : 250, 'width' : 300, 'params' : {} }; document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://padsims.com/2e0d99b51effa0c5bfdb2929ca02a4c8/invoke.js"></scr' + 'ipt>'); </script> </div> <div class="widget"> <div class="widget-title"> <h4>Popular Questions</h4> </div> <ul class="relatedPost"> <li> <a href='https://www.techqa.club/v/q/how-do-i-undo-the-most-recent-local-commits-in-git-927358' title="How do I undo the most recent local commits in Git?"> How do I undo the most recent local commits in Git? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-can-i-remove-a-specific-item-from-an-array-in-javascript-5767325' title="How can I remove a specific item from an array in JavaScript?"> How can I remove a specific item from an array in JavaScript? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-delete-a-git-branch-locally-and-remotely-2003505' title="How do I delete a Git branch locally and remotely?"> How do I delete a Git branch locally and remotely? </a> </li> <li> <a href='https://www.techqa.club/v/q/find-all-files-containing-a-specific-text-string-on-linux-16956810' title="Find all files containing a specific text (string) on Linux?"> Find all files containing a specific text (string) on Linux? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-revert-a-git-repository-to-a-previous-commit-4114095' title="How do I revert a Git repository to a previous commit?"> How do I revert a Git repository to a previous commit? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-create-an-html-button-that-acts-like-a-link-2906582' title="How do I create an HTML button that acts like a link?"> How do I create an HTML button that acts like a link? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-check-out-a-remote-git-branch-1783405' title="How do I check out a remote Git branch?"> How do I check out a remote Git branch? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-force-git-pull-to-overwrite-local-files-1125968' title="How do I force "git pull" to overwrite local files?"> How do I force "git pull" to overwrite local files? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-list-all-files-of-a-directory-3207219' title="How do I list all files of a directory?"> How do I list all files of a directory? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-check-whether-a-string-contains-a-substring-in-javascript-1789945' title="How to check whether a string contains a substring in JavaScript?"> How to check whether a string contains a substring in JavaScript? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-redirect-to-another-webpage-503093' title="How do I redirect to another webpage?"> How do I redirect to another webpage? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-can-i-iterate-over-rows-in-a-pandas-dataframe-16476924' title="How can I iterate over rows in a Pandas DataFrame?"> How can I iterate over rows in a Pandas DataFrame? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-convert-a-string-to-an-int-in-java-5585779' title="How do I convert a String to an int in Java?"> How do I convert a String to an int in Java? </a> </li> <li> <a href='https://www.techqa.club/v/q/does-python-have-a-string-contains-substring-method-3437059' title="Does Python have a string 'contains' substring method?"> Does Python have a string 'contains' substring method? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-do-i-check-if-a-string-contains-a-specific-word-4366730' title="How do I check if a string contains a specific word?"> How do I check if a string contains a specific word? </a> </li> </ul> </div><div class="widget"> <div class="widget-title"> <h4>Popular Tags</h4> </div> <div class="tagcloud sidebare"> <a href="/q/t/javascript"> <span>javascript</span> </a> <a href="/q/t/python"> <span>python</span> </a> <a href="/q/t/java"> <span>java</span> </a> <a href="/q/t/c#"> <span>c#</span> </a> <a href="/q/t/php"> <span>php</span> </a> <a href="/q/t/android"> <span>android</span> </a> <a href="/q/t/html"> <span>html</span> </a> <a href="/q/t/jquery"> <span>jquery</span> </a> <a href="/q/t/c++"> <span>c++</span> </a> <a href="/q/t/css"> <span>css</span> </a> <a href="/q/t/ios"> <span>ios</span> </a> <a href="/q/t/sql"> <span>sql</span> </a> <a href="/q/t/mysql"> <span>mysql</span> </a> <a href="/q/t/r"> <span>r</span> </a> <a href="/q/t/reactjs"> <span>reactjs</span> </a> </div> </div> <div class="widget"> <div class="widget-title"> <h4>Trending Questions</h4> </div> <ul class="relatedPost"> <li> <a href='https://www.techqa.club/v/q/uiimageview-frame-doesn-t-reflect-constraints-32240629' title="UIImageView Frame Doesn't Reflect Constraints"> UIImageView Frame Doesn't Reflect Constraints </a> </li> <li> <a href='https://www.techqa.club/v/q/is-it-possible-to-use-adb-commands-to-click-on-a-view-by-finding-its-id-39315028' title="Is it possible to use adb commands to click on a view by finding its ID?"> Is it possible to use adb commands to click on a view by finding its ID? </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-create-a-new-web-character-symbol-recognizable-by-html-javascript-11059803' title="How to create a new web character symbol recognizable by html/javascript?"> How to create a new web character symbol recognizable by html/javascript? </a> </li> <li> <a href='https://www.techqa.club/v/q/why-isn-t-my-css3-animation-smooth-in-google-chrome-but-very-smooth-on-other-browsers-37629745' title="Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?"> Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)? </a> </li> <li> <a href='https://www.techqa.club/v/q/heap-gives-page-fault-39109581' title="Heap Gives Page Fault"> Heap Gives Page Fault </a> </li> <li> <a href='https://www.techqa.club/v/q/connect-ffmpeg-to-visual-studio-2008-17218902' title="Connect ffmpeg to Visual Studio 2008"> Connect ffmpeg to Visual Studio 2008 </a> </li> <li> <a href='https://www.techqa.club/v/q/both-object-and-valueanimator-jumps-when-duration-is-set-above-api-lvl-24-46991118' title="Both Object- and ValueAnimator jumps when Duration is set above API LvL 24"> Both Object- and ValueAnimator jumps when Duration is set above API LvL 24 </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-avoid-default-initialization-of-objects-in-std-vector-78203063' title="How to avoid default initialization of objects in std::vector?"> How to avoid default initialization of objects in std::vector? </a> </li> <li> <a href='https://www.techqa.club/v/q/second-argument-of-the-command-line-arguments-in-a-format-other-than-char-argv-or-char-argv-60047957' title="second argument of the command line arguments in a format other than char** argv or char* argv[]"> second argument of the command line arguments in a format other than char** argv or char* argv[] </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permutation-43290467' title="How to improve efficiency of algorithm which generates next lexicographic permutation?"> How to improve efficiency of algorithm which generates next lexicographic permutation? </a> </li> <li> <a href='https://www.techqa.club/v/q/navigating-to-the-another-actvity-app-getting-crash-in-android-44773528' title="Navigating to the another actvity app getting crash in android"> Navigating to the another actvity app getting crash in android </a> </li> <li> <a href='https://www.techqa.club/v/q/how-to-read-the-particular-message-format-in-android-and-store-in-sqlite-database-23211116' title="How to read the particular message format in android and store in sqlite database?"> How to read the particular message format in android and store in sqlite database? </a> </li> <li> <a href='https://www.techqa.club/v/q/resetting-inventory-status-after-order-is-cancelled-39125469' title="Resetting inventory status after order is cancelled"> Resetting inventory status after order is cancelled </a> </li> <li> <a href='https://www.techqa.club/v/q/efficiently-compute-powers-of-x-in-sse-avx-67955549' title="Efficiently compute powers of X in SSE/AVX"> Efficiently compute powers of X in SSE/AVX </a> </li> <li> <a href='https://www.techqa.club/v/q/insert-into-an-external-database-using-ajax-and-php-post-500-internal-server-error-43365921' title="Insert into an external database using ajax and php : POST 500 (Internal Server Error)"> Insert into an external database using ajax and php : POST 500 (Internal Server Error) </a> </li> </ul> </div> </div> <div class="ikanAtas"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:970px;height:250px" data-ad-client="ca-pub-2199440138602787" data-ad-slot="2207584572"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="row"> </div> </div> <div class="scrolltop-wrap"> <a href="#" role="button" aria-label="Scroll to top"> <svg height="48" viewBox="0 0 48 48" width="48" height="48px" xmlns="http://www.w3.org/2000/svg"> <path id="scrolltop-bg" d="M0 0h48v48h-48z"></path> <path id="scrolltop-arrow" d="M14.83 30.83l9.17-9.17 9.17 9.17 2.83-2.83-12-12-12 12z"></path> </svg> </a> </div> </section> <footer class="minFoo"> <div class="container"> <div class="row"> <div class="col-md-12"> <ul class="menuBot"> <li> <a href="/p/privacy">Privacy</a></li> <li> <a href="/p/terms">Terms</a></li> <li> <a href="/p/cookies-policy">Cookies</a></li> <li> <a href="https://homegardensmart.com/">Homegardensmart</a> </li> <li> <a href="https://math.techqa.club/">Math</a> </li> <li> <a href="https://aftereffectstemplates.net/">Aftereffectstemplates</a> </li> </ul> </div> </div> </div> </footer> <div class="hide"><input name="_requesttoken" id="requesttoken" type="hidden" value="LZACBSEX6X7aney7SlBOHROvZzXiW8jLao6tbc6u"/></div> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script src="https://www.techqa.club/js/hljs.js"></script> </script> </body> </html>