Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated static and media files in django section #2464

Merged
merged 1 commit into from
Sep 21, 2017
Merged

updated static and media files in django section #2464

merged 1 commit into from
Sep 21, 2017

Conversation

renjithsraj
Copy link
Contributor

@renjithsraj renjithsraj commented Aug 29, 2017

the media, and static_storage files is not needed while pushed the items in the git, it will increase the memory usage.

@shiftkey
Copy link
Member

shiftkey commented Sep 9, 2017

@cadmus any links to StackOverflow discussions or other documentation about this change?

@renjithsraj
Copy link
Contributor Author

In the django project application files are uploaded into media folder,it's included into project root and once we make the collectstatic for the project it will create static_storage folder with all the static files (js,css,etc) but the same things is there in "static" folder . so both folders have "media" and "static_storage" raise the file size.

@shiftkey
Copy link
Member

@cadmus 👍

@shiftkey shiftkey merged commit 2ec038e into github:master Sep 21, 2017
@cyliang
Copy link
Contributor

cyliang commented Jan 5, 2018

Although I agree files in static folder and media folder shall be excluded from git repository, this pull request is not quite reasonable.

The paths of static folder and media folder are actually personal preferences and the ones added in this pull request are neither Django's default nor something suggested/illustrated in Django's documentation/tutorial. In fact, Django does not provide default values for these two paths.

There are other reasons these two paths shall not be included in the gitignore:

  1. Both folders are not necessary to be included in the project folder since files in both folders are not served by Django itself but instead a web server.
  2. Depending on deployment environment, Django may have permission problems in automatically creating these two folders. In case these folders are decided to be located in the project folder, include both folders in git repository, with ideal permission modes set, is often a simple way to prevent the folder creation problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants