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

PLAT-5595: Modularize the scaffolds - Django Scaffold #248

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions {{cookiecutter.project_slug}}/.gitignore

This file was deleted.

82 changes: 62 additions & 20 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
# {{cookiecutter.project_slug}}

This is a repository for a web application developed with Django, built with [Crowdbotics](https://crowdbotics.com)
Welcome to your new Crowdbotics app. This is a repository for a web application developed with Django, built with [Crowdbotics](https://crowdbotics.com)

## What is Crowdbotics?

Crowdbotics is an easy way to build software applications of all kinds. You can build production, high-caliber software applications in minutes, rather than weeks or months, even if you're not a software developer.

The reason this works is that most software applications and features we want to build are similar to applications that have been built before. We've crawled hundreds of thousands of public code repositories to teach the Crowdbotics engine how to create software.

As a result, Crowdbotics can generate new applications automatically in a standardized way.
## Table of Contents

1. [Project Structure](#project-structure)
2. [Features](#features)
3. [Getting Started: Backend](#getting-started-backend)
- [Docker Setup (recommended)](#docker-setup-recommended)
- [Local Setup](#local-setup-alternative-to-docker)
4. [Usage](#usage)
- [Admin Panel](#admin-panel)
- [API Documentation](#api-documentation)
- [{{cookiecutter.project_slug}}](#cookiecutterproject_slug)
- [What is Crowdbotics?](#what-is-crowdbotics)
- [Table of Contents](#table-of-contents)
- [Useful Links](#useful-links)
- [Project Description](#project-description)
- [Project Structure](#project-structure)
- [Features](#features)
- [Getting Started: Backend](#getting-started-backend)
- [Docker Setup (Recommended)](#docker-setup-recommended)
- [Local Setup (Alternative to Docker)](#local-setup-alternative-to-docker)
- [Installation](#installation)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Admin Panel](#admin-panel)
- [API Documentation](#api-documentation)
- [License](#license)

### Useful Links

- [App Dashboard](https://app.crowdbotics.com/)
- [Knowledgebase](https://knowledge.crowdbotics.com/)
- [Developer Training](https://knowledge.crowdbotics.com/crowdbotics-developer-training)
- [Forum](https://discuss.crowdbotics.com/)
- [Tech Support](https://crowdbotics.slack.com/archives/CGSAV319V)

## Project Description

{{cookiecutter.project_description}}

## Project Structure

..
├── home # Starter home app
├── modules # Crowdbotics Modules app
├── {{cookiecutter.project_slug}} # Django project configurations
├── static # Static assets
├── users # Starter users app
├── web_build # React Native Web build
├── ...
.
├── .github
│   └── dependabot.yml
├── README.md
└── ...
├── backend
│   ├── .env.example
│   ├── Dockerfile
│   ├── Pipfile
│   ├── docker-compose.override.yml
│   ├── docker-compose.yml
│   ├── home # Starter home app
│   ├── manage.py
│   ├── modules # Crowdbotics Modules app
│   ├── static # Static assets
│   ├── users # Starter users app
│   ├── web_build # React Native Web build
│   └── {{cookiecutter.project_slug}} # Django project configurations
└── heroku.yml


## Features

Expand All @@ -50,7 +86,7 @@ This project is set up to run using [Docker Compose](https://docs.docker.com/com
1. Install Docker:
- Linux - [get.docker.com](https://get.docker.com/)
- Windows or MacOS - [Docker Desktop](https://www.docker.com/products/docker-desktop)
1. Clone this repo and `cd {{cookiecutter.project_slug}}`
1. Clone this repo and `cd {{cookiecutter.project_slug}}/backend`
1. Make sure `Pipfile.lock` exists. If it doesn't, generate it with:
```sh
$ docker run -it --rm -v "$PWD":/django -w /django python:3.7 pip3 install --no-cache-dir -q pipenv && pipenv lock
Expand Down Expand Up @@ -90,7 +126,7 @@ This project is set up to run using [Docker Compose](https://docs.docker.com/com
### Installation

1. Install [pipenv](https://pypi.org/project/pipenv/)
2. Clone this repo and `cd {{cookiecutter.project_slug}}`
2. Clone this repo and `cd {{cookiecutter.project_slug}}/backend`
3. Run `pip install --user --upgrade pipenv` to get the latest pipenv version.
4. Run `pipenv --python 3.6`
5. Run `pipenv install`
Expand All @@ -114,3 +150,9 @@ Admin Panel can be accessed through http://localhost:8000/admin/. If you are the
## API Documentation

API Documentation is generated automatically and can be access through http://localhost:8000/api-docs/. Please make sure you are signed in to the admin panel before navigating to this page.

# License

The use of code in this repository is governed by Crowdbotics [Terms and Conditions](https://www.crowdbotics.com/terms-of-service).

Created with ❤️ by [Crowdbotics](https://www.crowdbotics.com/)
11 changes: 11 additions & 0 deletions {{cookiecutter.project_slug}}/backend/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf

# Normalize line endings to avoid spurious failures in the core test suite on Windows.
*html text eol=lf
*css text eol=lf
*js text eol=lf
tests/staticfiles_tests/apps/test/static/test/*txt text eol=lf
tests/staticfiles_tests/project/documents/test/*txt text eol=lf
docs/releases/*.txt merge=union
187 changes: 187 additions & 0 deletions {{cookiecutter.project_slug}}/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/

# -----------------------------------------------------------------------------
# Python and Django gitignore
# -----------------------------------------------------------------------------


# 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/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.terraform

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
tests/.coverage
tests/report/
tests/coverage_html/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
staticfiles/

# Postgress DB
postgres-data/

# Sphinx documentation
docs/_build/
docs/locale/

# PyBuilder
.pybuilder/
target/

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/heroku.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build:
docker:
web: Dockerfile
web: ./backend/Dockerfile
config:
DEBUG_COLLECTSTATIC: 1
SECRET_KEY: build
Expand Down