Forums

Files changed after git pull, but site still old version?

I did a git pull on my changes to the repo. The files that were changed are updated when I view the "Files" tab in PA, and I've hit "reload" several times on the "Web" tab. I only have one app, so I'm not reloading the wrong one. When I load my main page and view source, the HTML is from the old version even though the template is the new version in the "Files" tab.

Why isn't it reloading properly?

Hi there, can you give me an example URL, and some content that you expect from the new template which is not appearing? If you give me permission, I can also take a look at your files?

Before we dive in though, it may be worth checking this isn't a browser cache issue?

The URL is unrelatedwaffle.pythonanywhere.com. It should have four simple blog entries on the first page, the first of which is

"published: Oct. 20, 2016, 10:09 a.m.

Post #1

Here I am, posting some junk, whee!"

I've emptied the browser cache, no dice.

Hi there, I wonder if this is a distinction between your code (in .py and .html files and so on) and your database (which is usually managed separately). If you're using sqlite, your database might still be contained in a file (often called something like "db.sqlite"), but usually, that's not something you would put into git. The theory is that your local database that you use for testing on your own machine is quite separate from your "production" database, that contains all the real data you want to show to the world... So even if you have exactly the same code on pythonanywhere and on your own machine, the data in the database can be different, so what actually gets displayed will be different...

The djangogirls tutorial discusses this briefly in their deploy chapter

Thanks, harry. I didn't realize the databases weren't syncing up. Duh! Thank you for your patient response.