Skip to content

Commit bcbe777

Browse files
README.md
A readme for the project
1 parent 94ec134 commit bcbe777

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Django startproject
2+
3+
A small shell script to start off you django app development. It rids you the hustle of repeating the same processes everytime you start a django project and gets you django application up and running within two strikes of a button. It automates:
4+
* Creation of the project folder
5+
* Creating and activating virtual enviroment
6+
* Updating pip to latest version
7+
* Starting django project *django-admin startproject *
8+
* Starting an app *python manage.py startapp *
9+
* Writing to settings.py, urls.py, views.py, tempalates
10+
* Making migrations and migrating them
11+
12+
13+
## Getting Started
14+
15+
To get started just clone the repo into your machine and get started. The script might not work out of the box, some tweaks and a little bit of hacking :wink: is required as explained in Prerequisites
16+
17+
### Prerequisites
18+
19+
The script works by relying on several bash aliases.
20+
First to make the script executable from any directory, create a bin directory in your /home folder.
21+
22+
```
23+
~$ mkdir bin
24+
```
25+
Place the djangostartproject script in the */home/USER/bin* folder and then add the path to it in the .bashrc file
26+
Add this line as the end of your .bashrc file **export PATH=$PATH:/home/USER/bin/** USER being the logged in user
27+
28+
Create a .bash_aliases file if you dont have one and add this line **alias djangostart='. djangostartproject'**.
29+
This is done so that the script can execute a cd command and actually cd into the folder. Not including the **.** and space in the djangostartproject alias will lead to the script not cd*ing* into a directory.
30+
Once that is done you are ready to go.
31+
32+
### Usage
33+
To use the scipt, cd to anywhere and run **djangostart** followed by the name you would like to give to your project folder.
34+
35+
```
36+
~$ djangostart djangoproject
37+
```
38+
##### Example
39+
![Example of django-startproject](https://github.com/coderjaymoh/django-startproject/blob/master/Peek%202019-10-24%2004-58.gif)
40+
41+
## Contributing
42+
To contribute just make a PR
43+

0 commit comments

Comments
 (0)