I am just flummoxed. I started the web having just 1 single view in my views.py page, with one line to see if everything was working, namely:
from django.http import HttpResponse
def home(request): return HttpResponse(‘Hello, World!’)
so a few days after I return, I delete that code and paste a different one
def home(request):
return render(request, ‘home.html’, name=‘home’)
and now that home.html page is located in a directory called templates, and has just an html table and yes, I have modified settings.py to indicate where that templates directory is
DIRS’: [ os.path.join(BASE_DIR, ‘templates’) ],
Well, when I go the webpage,I am still seeing the hello world, and is a code that does not exist anymore.
Of course, nothing to do with cookies or browser cache, because apart from having deleted all browsing data, I tried different computers, different browsers, I even shot up Tor that I had never used before.
I am still seeing the hello world. This is incredible.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello
Thank you.
What it turned out to be is that gunicorn stays with the latest look of the website until you restart it. So no matter what I did, everything stayed like when I last left it on the 4th of November. When I restarted it, then I could see changes.
But I imagine this is not the way it is supposed to be. As far as I know, systemd should take care of enforcing the changes at runtime.
If I work on my laptop, push my changes to github, what follows?
a) are the server and github so connected that the changes are pulled from the server?
b) do I have to manually pull them from the server?
Hello,
It sounds like that you might be editing the files in another document root. Can you share your Nginx config file here and also confirm the path to the views.py file that you are editing?
Also do you have multiple server blocks in your Nginx? If so you could share them here so that I could try to advise you further.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.