Skip to content
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Django MyProject

This is a boilerplate for a scalable Django project. To use it, just download the source code and globally replace "myproject" with a meaningful project name. Then start building your apps.
This is a boilerplate for a scalable Django project. To use it, just download the source code.

* Create a virtualenv
```python
python3 -m venv myprojectvenv
```
* Globally replace "myproject" with a meaningful project name.

* Modify manage.py to use the right setting file
```python
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings.production')
```

* Install postgresql from official site, download latest version. Default port 5432
* Log into postgresql shell
```
CREATE DATABASE myproject;
CREATE USER myprojectuser WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE myproject TO myprojectuser;
```
* Create secrets.json in settings directory
```python
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())
```

* Run python migration
* Ready to go with http://127.0.0.1:8000/
8 changes: 4 additions & 4 deletions requirements/_base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django~=3.0.0
psycopg2-binary==2.8.3
pytz==2019.2
sqlparse==0.3.0
Django==3.1.2
psycopg2-binary==2.8.6
pytz==2020.1
sqlparse==0.4.1