-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.md.bak
148 lines (110 loc) · 3.4 KB
/
README.md.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Project
This is a personal project based on django framework and react frontend
## Installation
Use the package manager [pip](https://pypi.org/project/pip/) all the packages for this project use.
```bash
You can use pipenv or Virtualenv or [Conda](https://www.anaconda.com/products/individual)
#to install pipenv package
pip install pipenv
```
```bash
#to install venv package
pip install venv
Create the virtual environment
To create a virtual environment, you must specify a path. For example to create one in the local directory called ‘mypython’, type the following:
virtualenv mypython
ot venv mypython
Activate the virtual environment
You can activate the python environment by running the following command:
Mac OS / Linux
source mypython/bin/activate
Windows
mypthon\Scripts\activate
Deactivate the virtual environment
To decativate the virtual environment and use your original Python environment, simply type ‘deactivate’.
deactivate
```
```bash
#to initialize pipenv's virtualenv
pipenv shell
#returns
warnings.warn(
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (e4eef2)!
Installing dependencies from Pipfile.lock (e4eef2)...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
```
## Versions
```python
Python 3.9.7
```
```node
Node 16.13.2(LTS)
```
## Usage
```python
#to install all packages
#for pipenv
pipenv install
#for others
pyth
```
```node
#to install react packages
npm install or npm i
```
## Run
```python
#checks any migrations
python .\myWebproject\manage.py makemigrations
```
```python
#apply any migrations
python .\myWebproject\manage.py migrate
#returns
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
```
```python
#run server
python .\mywebproject\manage.py runserver
#returns
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
January 17, 2022 - 10:17:24
Django version 4.0.1, using settings 'myWebproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
```
## React
```react
#to start the server
npm start
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[Apache](https://choosealicense.com/licenses/apache2.0/)