Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 151927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:31:55+00:00 2026-05-11T09:31:55+00:00

I have a simple blog application written in Python, using Django. I use Git

  • 0

I have a simple blog application written in Python, using Django. I use Git to version-control this website. The main content of the site is a blog. The blog entries are stored in a SQLite database (which is not version-controlled, but is backed up regularly); some entries contain images and other media (like PDFs).

I currently store this ‘blog media’ in the repository, alongside other media (such as external JavaScript code, and images used for layout purposes — all nicely organized, of course). It occurred to me, however, that this isn’t really a good strategy, for a few reasons:

  1. Whenever I post a new blog entry that contains an image or a link to a PDF, I have to add the image to the repo and then copy a new version to the production server — which seems like a lot of work just to add an image. It’d be easier just to upload the image to the server (and make a local backup, of course).
  2. Since this media is content rather than code, it doesn’t seem necessary to store it alongside the code (and related style media) itself.
  3. The repo contains a lot of binary files, which increase the overall size of the repo; and more importantly,
  4. I never really edit these images, so why keep them under version-control?

So I’m considering removing these files from the repo, and just copying them to a directory on the server outside of the directory containing the Python code, templates, style sheets, etc., for the website.

However, I wondered: Is there a ‘best practice’ for dealing with content images and other media in a website’s repo, as opposed to images, etc., that are actually used as part of the site’s layout and functionality?


Edit

To elaborate, I see a difference between keeping the code for the website in the repo, and also keeping the content of the site in the repo — I feel that perhaps the content should be stored separately from the code that actually provides the functionality of the site (especially since the content may change more frequently, and I don’t see a need to create new commits for ‘stuff’ that isn’t necessary for the functioning of the site itself).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:31:56+00:00Added an answer on May 11, 2026 at 9:31 am

    You are completely correct on two points.

    1. You are using Version Control for your code.
    2. You are backing up your live content database.

    You have come to the correct conclusion that the ‘content images’ are just that and have no business in your code’s Version Control.

    Backup your content images along with your database. You do not want to blur the lines between the two unless you want your ‘code’ to be just your own blog site.

    What if you wanted to start a completely different blog. Or your friends all wanted one.You wouldn’t be giving them a copy of your database with all your content. Nor would it be any use for them to have a copy with all your content images.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 114k
  • Answers 114k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The MultiFieldQueryParser class extends the QueryParser class. Perhaps you could… May 11, 2026 at 10:13 pm
  • Editorial Team
    Editorial Team added an answer What exact version of eclipse and Java are you running?… May 11, 2026 at 10:13 pm
  • Editorial Team
    Editorial Team added an answer It sounds like you simply need a hashtable. The HashSet<T>… May 11, 2026 at 10:13 pm

Related Questions

Let's say I have a simple ASP.NET MVC blog application and I want to
What would be the best way to port an existing Drupal site to a
I am building a simple blog which is viewed single-page (do not worry, it
i am working on a simple web app which has a user model and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.