Rendering of django-bootstrap-datepicker-plus widget on pythonanywhere












0















I wrote a very simple django application and uploaded it to pythonanywhere. Through this form (and its base template) I'd like to allow the user to setting date and time using django-bootstrap-datepicker-plus (and django-bootstrap3).



The date-picker widget works fine on my localhost in debugging mode (see a detail of my [local] webpage in this figure), i.e. I can click on the calendar icon to display the calendar widget. My problem is that on the pythonanywhere server the widget cannot be displayed (i.e., the calendar icon is missing and when I click on the rightmost part of the date-time entry field, nothing happens).



I am using the same source code (pulling the latest versions of my github repository). Moreover, the virtual environment on pythonanywhere is set through a requirement.txt file obtained by [pip] freezing my local environment (thus, I am also using the same python packages).










share|improve this question

























  • Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

    – Maurice
    Jan 2 at 15:08











  • Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

    – ruggero.devita
    Jan 2 at 16:38
















0















I wrote a very simple django application and uploaded it to pythonanywhere. Through this form (and its base template) I'd like to allow the user to setting date and time using django-bootstrap-datepicker-plus (and django-bootstrap3).



The date-picker widget works fine on my localhost in debugging mode (see a detail of my [local] webpage in this figure), i.e. I can click on the calendar icon to display the calendar widget. My problem is that on the pythonanywhere server the widget cannot be displayed (i.e., the calendar icon is missing and when I click on the rightmost part of the date-time entry field, nothing happens).



I am using the same source code (pulling the latest versions of my github repository). Moreover, the virtual environment on pythonanywhere is set through a requirement.txt file obtained by [pip] freezing my local environment (thus, I am also using the same python packages).










share|improve this question

























  • Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

    – Maurice
    Jan 2 at 15:08











  • Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

    – ruggero.devita
    Jan 2 at 16:38














0












0








0








I wrote a very simple django application and uploaded it to pythonanywhere. Through this form (and its base template) I'd like to allow the user to setting date and time using django-bootstrap-datepicker-plus (and django-bootstrap3).



The date-picker widget works fine on my localhost in debugging mode (see a detail of my [local] webpage in this figure), i.e. I can click on the calendar icon to display the calendar widget. My problem is that on the pythonanywhere server the widget cannot be displayed (i.e., the calendar icon is missing and when I click on the rightmost part of the date-time entry field, nothing happens).



I am using the same source code (pulling the latest versions of my github repository). Moreover, the virtual environment on pythonanywhere is set through a requirement.txt file obtained by [pip] freezing my local environment (thus, I am also using the same python packages).










share|improve this question
















I wrote a very simple django application and uploaded it to pythonanywhere. Through this form (and its base template) I'd like to allow the user to setting date and time using django-bootstrap-datepicker-plus (and django-bootstrap3).



The date-picker widget works fine on my localhost in debugging mode (see a detail of my [local] webpage in this figure), i.e. I can click on the calendar icon to display the calendar widget. My problem is that on the pythonanywhere server the widget cannot be displayed (i.e., the calendar icon is missing and when I click on the rightmost part of the date-time entry field, nothing happens).



I am using the same source code (pulling the latest versions of my github repository). Moreover, the virtual environment on pythonanywhere is set through a requirement.txt file obtained by [pip] freezing my local environment (thus, I am also using the same python packages).







python django django-forms bootstrap-datepicker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 16:27







ruggero.devita

















asked Jan 2 at 14:48









ruggero.devitaruggero.devita

33




33













  • Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

    – Maurice
    Jan 2 at 15:08











  • Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

    – ruggero.devita
    Jan 2 at 16:38



















  • Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

    – Maurice
    Jan 2 at 15:08











  • Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

    – ruggero.devita
    Jan 2 at 16:38

















Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

– Maurice
Jan 2 at 15:08





Hey ruggero, please have a look at the Help Center in order to help us help you. Right now you require people who'd like to help you to visit multiple websites and the link to pythonanywhere leads to a login page. Please include a Minimal, Complete and Verifieable example.

– Maurice
Jan 2 at 15:08













Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

– ruggero.devita
Jan 2 at 16:38





Thanks @Maurice, I forgot that the webpage needed a logged-in user. I updated my question trying to describe the problem with more details.

– ruggero.devita
Jan 2 at 16:38












1 Answer
1






active

oldest

votes


















0














The most likely issue is that you're not serving the static files that are necessary for the widget to work. Check your browser requests in the developer tools to see if you're getting 404s for any resources that may be used by the widget. If they are 404ing, have a look at the PythonAnywhere and Django docs for how to properly serve static resources.






share|improve this answer
























  • Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

    – ruggero.devita
    Jan 2 at 23:18











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%2f54008381%2frendering-of-django-bootstrap-datepicker-plus-widget-on-pythonanywhere%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














The most likely issue is that you're not serving the static files that are necessary for the widget to work. Check your browser requests in the developer tools to see if you're getting 404s for any resources that may be used by the widget. If they are 404ing, have a look at the PythonAnywhere and Django docs for how to properly serve static resources.






share|improve this answer
























  • Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

    – ruggero.devita
    Jan 2 at 23:18
















0














The most likely issue is that you're not serving the static files that are necessary for the widget to work. Check your browser requests in the developer tools to see if you're getting 404s for any resources that may be used by the widget. If they are 404ing, have a look at the PythonAnywhere and Django docs for how to properly serve static resources.






share|improve this answer
























  • Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

    – ruggero.devita
    Jan 2 at 23:18














0












0








0







The most likely issue is that you're not serving the static files that are necessary for the widget to work. Check your browser requests in the developer tools to see if you're getting 404s for any resources that may be used by the widget. If they are 404ing, have a look at the PythonAnywhere and Django docs for how to properly serve static resources.






share|improve this answer













The most likely issue is that you're not serving the static files that are necessary for the widget to work. Check your browser requests in the developer tools to see if you're getting 404s for any resources that may be used by the widget. If they are 404ing, have a look at the PythonAnywhere and Django docs for how to properly serve static resources.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 17:59









GlennGlenn

4,78111321




4,78111321













  • Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

    – ruggero.devita
    Jan 2 at 23:18



















  • Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

    – ruggero.devita
    Jan 2 at 23:18

















Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

– ruggero.devita
Jan 2 at 23:18





Thanks @Glenn for your help. The problem was related to the static files of bootstrap_datepicker_plus. In pythonanywhere I need to specify the static files path manually. Thus, I used "/static/bootstrap_datepicker_plus/" as URL and something like to "/home/<my_username>/.virtualenvs/python3/lib/python3.7/site-packages/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus" as Directory. This solved my problem

– ruggero.devita
Jan 2 at 23:18




















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%2f54008381%2frendering-of-django-bootstrap-datepicker-plus-widget-on-pythonanywhere%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

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas