Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 71e866f

Browse files
committed
Merge pull request #7 from armooo/non-root
Stop requiring root access to develop the site
2 parents 5a3fe15 + 17c88d8 commit 71e866f

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

README.md

+7-15
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ development machine so that it pretends to be
1717

1818
2. Create a new consumer, with these details:
1919

20-
Consumer Name: Boston Python Study Groups
21-
Application Website: http://dev-studygroup.bostonpython.com
22-
De-authorization URL: http://dev-studygroup.bostonpython.com/deauth
23-
Redirect URI: http://dev-studygroup.bostonpython.com/
20+
Consumer Name: Boston Python Study Groups (Dev)
21+
Redirect URI: http://localhost:8080/
2422

2523
3. Create a settings_local.py alongside settings.py, with details from the
2624
OAuth consumer you just created:
@@ -32,23 +30,17 @@ development machine so that it pretends to be
3230

3331
4. Create the database tables:
3432

35-
$ sudo python manage.py create_tables
33+
$ python manage.py create_tables
3634

37-
5. You have to be able to visit your dev machine using the domain name
38-
"dev-studygroup.bostonpython.com". The simplest way to do this is to edit
39-
/etc/hosts. Add this line to the file:
35+
5. Start the server:
4036

41-
127.0.0.1 dev-studygroup.bostonpython.com
37+
$ python run_server.py -p 8080
4238

43-
6. Start the server:
44-
45-
$ sudo python run_server.py
46-
47-
7. Visit the page in your browser using the URL http://dev-studygroup.bostonpython.com.
39+
6. Visit the page in your browser using the URL http://localhost:8080.
4840
You should see the Study Group page, and your server window should show
4941
URLs being served.
5042

51-
8. If you click the Sign In Now button, it should take you to meetup.com and
43+
7. If you click the Sign In Now button, it should take you to meetup.com and
5244
ask you to authorize Boston Python Study Groups.
5345

5446

run_server.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import argparse
2+
13
from studygroup.application import create_app
24

35

46
if __name__ == "__main__":
7+
parser = argparse.ArgumentParser(description='Runs a study group site.')
8+
parser.add_argument('--port', '-p', action='store', default=80, type=int)
9+
args = parser.parse_args()
10+
511
app = create_app(debug=True)
6-
app.run(debug=True, port=80)
12+
app.run(debug=True, port=args.port)

0 commit comments

Comments
 (0)