From ed59b0d61c0a0d1a4cdd5cbf5f7670e04e8fd4cf Mon Sep 17 00:00:00 2001 From: 95ych Date: Mon, 1 Jun 2020 00:58:00 +0530 Subject: [PATCH 1/2] updated readme and makefile --- src/README.md | 35 ++++++++++++++++++++++++++--------- src/makefile | 9 ++++++--- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/README.md b/src/README.md index 8e9e0c63..9df455ee 100644 --- a/src/README.md +++ b/src/README.md @@ -1,17 +1,34 @@ # Source -Will contain the backend and front end pieces +Will contain the backend and front end pieces ------------- # art-club-website -Art Club website at IIIT-H
-virtual env can be activated by
+Art Club website at IIIT-H
+ +I have kept all the project files in ./src directory
+project name: webpage
+app name : webapp
+ +to get started +```console +foo@bar:~/art-club-website/src$ make +``` +this installs requirements and takes you to virtual env +
+
+```console +foo@bar:~/art-club-website/src$ python3 ./mange.py runserver +``` +gets the server running
+
+#### Advanced: +For only activating virtual env: ```console -foo@bar:~/art-club-website/src$ source bin/activate +foo@bar:~/art-club-website/src$ make activate ``` -or you can simply install by running +for only installing required packages: ```console -foo@bar:~/art-club-website/src$ make +foo@bar:~/art-club-website/src$ make install ``` -I have kept all the project files in ./src directory
-project name: webpage
-app name : webapp
+for exiting virtual env: +```deactivate``` diff --git a/src/makefile b/src/makefile index 3e30052d..773cb3b9 100644 --- a/src/makefile +++ b/src/makefile @@ -1,4 +1,7 @@ -all: a - -a: +all: pip3 install -r requirements.txt + source bin/activate +install: + pip3 install -r requirements.txt +env: + source bin/activate From 95e561dcf785136cb9012a89b0fec3206ce41435 Mon Sep 17 00:00:00 2001 From: 95ych Date: Mon, 1 Jun 2020 01:27:40 +0530 Subject: [PATCH 2/2] updated readme and makefile --- src/README.md | 14 ++++++++++++-- .../__pycache__/__init__.cpython-38.pyc | Bin 181 -> 181 bytes src/webapp/__pycache__/admin.cpython-38.pyc | Bin 222 -> 222 bytes src/webapp/__pycache__/models.cpython-38.pyc | Bin 219 -> 219 bytes src/webapp/__pycache__/views.cpython-38.pyc | Bin 378 -> 378 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 192 -> 192 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 182 -> 182 bytes .../__pycache__/settings.cpython-38.pyc | Bin 2333 -> 2344 bytes src/webpage/__pycache__/urls.cpython-38.pyc | Bin 1083 -> 1083 bytes src/webpage/__pycache__/wsgi.cpython-38.pyc | Bin 585 -> 585 bytes src/webpage/settings.py | 2 +- 11 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/README.md b/src/README.md index 9df455ee..d9cfabd6 100644 --- a/src/README.md +++ b/src/README.md @@ -18,7 +18,7 @@ this installs requirements and takes you to virtual env ```console foo@bar:~/art-club-website/src$ python3 ./mange.py runserver ``` -gets the server running
+gets the server running on localhost ie. http://127.0.0.1:8000/

#### Advanced: For only activating virtual env: @@ -31,4 +31,14 @@ for only installing required packages: foo@bar:~/art-club-website/src$ make install ``` for exiting virtual env: -```deactivate``` +`deactivate` +
+for changing the server's port +```console +foo@bar:~/art-club-website/src$ python3 ./mange.py runserver +``` +If you want to change the server’s IP, pass it along with the port +
(make sure to add it in ALLOWED_HOSTS in /art-club-website/src/webpage/settings.py) +```console +foo@bar:~/art-club-website/src$ python3 ./mange.py runserver : +``` diff --git a/src/webapp/__pycache__/__init__.cpython-38.pyc b/src/webapp/__pycache__/__init__.cpython-38.pyc index 1d09fc59bc3748e0b999df688a6d4a6cfd47b84a..20127f5d8fa948ce0bf843f97d7c3f46a367f96a 100644 GIT binary patch delta 19 ZcmdnWxRsGRl$V!_0SL}9T$#wd3IHoU1la%p delta 19 ZcmdnWxRsGRl$V!_0SFxT9Gl3!3IHo)1o{8~ diff --git a/src/webapp/__pycache__/admin.cpython-38.pyc b/src/webapp/__pycache__/admin.cpython-38.pyc index 5a8a53be613ae31fb4fef50eda90ec34d55f7ea8..8a42690d6e93109e55041adefbd555117bbb2191 100644 GIT binary patch delta 19 Zcmcb|c#n}gl$V!_0SL}9T$#vy82~XW1yle4 delta 19 Zcmcb|c#n}gl$V!_0SFxT9Gl2}82~X+1$6)b diff --git a/src/webapp/__pycache__/models.cpython-38.pyc b/src/webapp/__pycache__/models.cpython-38.pyc index dc254612e936a3b36ab7b3b97fd8c2e15d34ff08..ef6f09e383c1faecf20b0b3c437916a7c5a4c3e0 100644 GIT binary patch delta 19 Zcmcc3c$<+sl$V!_0SL}9T$#vy0RS+(1xo+` delta 19 Zcmcc3c$<+sl$V!_0SFxT9Gl2}0RS-K1#AES diff --git a/src/webapp/__pycache__/views.cpython-38.pyc b/src/webapp/__pycache__/views.cpython-38.pyc index 53fe056b2e430b7e2d9acdbf969d477978853037..6cb2c9fed7ea2086f5f1f51e21e6394d0dd1ded5 100644 GIT binary patch delta 20 acmeyx^oxl*l$V!_0SL}9T-nH-&j+Jcg$agyE%VLQFh`YvSf#xcW#t8qeSv2wO;W=T^A~E05!X z&QztoMWs^v^gFdr)+T{hKlyvU-PnOTZtfmFC^;o%LLy?yBvh!nND?eH>NIGQ((+A( zwp8i307I7^ea<*{CRbeSjQ_A)N{s>+6u=mu9rnxsnDMW53Lp6r2{E<;rD7 pn#?8TT3Q%s`*eJ|+(-|-3Kol>|92Hf_shbE7yTHjaQhp-od84*F_{1W delta 201 zcmW-XyG{Z@7)Ey{;{prAWw{B+O%yPezJxuo`3tKW~B?P?y delta 20 acmX@fa*~BRl$V!_0SHRhAKS=n#{>X0iUkD# diff --git a/src/webpage/settings.py b/src/webpage/settings.py index 99d8c252..c7484a2b 100644 --- a/src/webpage/settings.py +++ b/src/webpage/settings.py @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['0.0.0.0'] # Application definition