91👍
✅
When using buildout I have following in .gitignore
(along with *.pyo
and *.pyc
):
.installed.cfg
bin
develop-eggs
dist
downloads
eggs
parts
src/*.egg-info
lib
lib64
Thanks to Jacob Kaplan-Moss
Also I tend to put .svn
in since we use several SCM-s where I work.
504👍
Github has a great boilerplate .gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Rope
.ropeproject
# Django stuff:
*.log
*.pot
# Sphinx documentation
docs/_build/
- [Django]-Github issues api 401, why? (django)
- [Django]-How to solve "Page not found (404)" error in Django?
- [Django]-How to customize activate_url on django-allauth?
42👍
Covers most of the general stuff –
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
Reference: python .gitignore
- [Django]-No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model
- [Django]-How to pass information using an HTTP redirect (in Django)
- [Django]-Folder Structure for Python Django-REST-framework and Angularjs
- [Django]-Django substr / substring in templates
- [Django]-Getting the SQL from a Django QuerySet
- [Django]-Removing 'Sites' from Django admin page
7👍
One question is if you also want to use git for the deploment of your projects. If so you probably would like to exclude your local sqlite file from the repository, same probably applies to file uploads (mostly in your media folder). (I’m talking about django now, since your question is also tagged with django)
- [Django]-How to test Django's UpdateView?
- [Django]-How to pass django rest framework response to html?
- [Django]-Is it bad to have my virtualenv directory inside my git repository?
- [Django]-Django – "Incorrect type. Expected pk value, received str" error
- [Django]-Django FileField upload is not working for me
- [Django]-Why is factory_boy superior to using the ORM directly in tests?
Source:stackexchange.com