Skip to content

Commit 8085ef1

Browse files
committed
init
0 parents  commit 8085ef1

File tree

9,743 files changed

+809292
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,743 files changed

+809292
-0
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DEBUG=True
2+
CLOUDINARY_CLOUD_NAME = 'your_cloud_name'
3+
CLOUDINARY_API_KEY = 'your_api_key'
4+
CLOUDINARY_API_SECRET = 'your_api_secret'
5+
SECRET_KEY="your_secret_key"

.gitignore

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
*.pyc
2+
*.pyo
3+
*.db
4+
.DS_Store
5+
.coverage
6+
local_settings.py
7+
secrets.py
8+
#static/
9+
media/
10+
migrations/
11+
12+
# Byte-compiled / optimized / DLL files
13+
__pycache__/
14+
*.py[cod]
15+
*$py.class
16+
17+
# C extensions
18+
*.so
19+
20+
# Distribution / packaging
21+
.Python
22+
build/
23+
develop-eggs/
24+
#dist/
25+
downloads/
26+
eggs/
27+
.eggs/
28+
lib/
29+
lib64/
30+
parts/
31+
sdist/
32+
var/
33+
wheels/
34+
pip-wheel-metadata/
35+
share/python-wheels/
36+
*.egg-info/
37+
.installed.cfg
38+
*.egg
39+
MANIFEST
40+
41+
# PyInstaller
42+
# Usually these files are written by a python script from a template
43+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
44+
*.manifest
45+
*.spec
46+
47+
# Installer logs
48+
pip-log.txt
49+
pip-delete-this-directory.txt
50+
51+
# Unit test / coverage reports
52+
htmlcov/
53+
.tox/
54+
.nox/
55+
.coverage
56+
.coverage.*
57+
.cache
58+
nosetests.xml
59+
coverage.xml
60+
*.cover
61+
.hypothesis/
62+
.pytest_cache/
63+
64+
# Translations
65+
*.mo
66+
*.pot
67+
68+
# Django stuff:
69+
*.log
70+
local_settings.py
71+
db.sqlite3
72+
73+
# Flask stuff:
74+
instance/
75+
.webassets-cache
76+
77+
# Scrapy stuff:
78+
.scrapy
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# PyBuilder
84+
target/
85+
86+
# Jupyter Notebook
87+
.ipynb_checkpoints
88+
89+
# IPython
90+
profile_default/
91+
ipython_config.py
92+
93+
# pyenv
94+
.python-version
95+
96+
# celery beat schedule file
97+
celerybeat-schedule
98+
99+
# SageMath parsed files
100+
*.sage.py
101+
102+
# Environments
103+
.env
104+
.venv
105+
env/
106+
venv/
107+
ENV/
108+
env.bak/
109+
venv.bak/
110+
111+
# Spyder project settings
112+
.spyderproject
113+
.spyproject
114+
115+
# Rope project settings
116+
.ropeproject
117+
118+
# mkdocs documentation
119+
/site
120+
121+
# mypy
122+
.mypy_cache/
123+
.dmypy.json
124+
dmypy.json
125+
126+
# Pyre type checker
127+
.pyre/
128+
129+
# Secrets configuration
130+
secrets.py
131+
**/secrets.py

CONTRIBUTING.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Contributing to the PyCon Africa Website
2+
3+
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
4+
- Reporting a bug
5+
- Discussing the current state of the code
6+
- Submitting a fix
7+
- Proposing new features
8+
- Becoming a maintainer
9+
10+
## Setting up locally with venv
11+
### 1. Create virtual environment
12+
```sh
13+
python -m venv .venv
14+
```
15+
### 2. Activate a virtual environment
16+
While in the root project directory, activate a virtual environment by executing the following command based on your operating system;
17+
- For Unix/macOS run:
18+
19+
```sh
20+
source .venv/bin/activate
21+
```
22+
- For windows run:
23+
```sh
24+
.venv/Scripts/activate
25+
```
26+
Install Requirements
27+
```sh
28+
pip install -r dev.requirements.txt
29+
```
30+
31+
### 3. Environment Variables
32+
Create a `secrets.py` inside the [pyconafrica](https://github.com/PyconUg/pycon-africa/tree/main/pyconafrica) Django app directory, in the same directory as `settings.py` file. The `secrets.py` file will hold all the environment variables. Below are the default environment variables.
33+
34+
```
35+
SCRETE_KEY='your_secret_key'
36+
CLOUDINARY_URL='your_cloudinary_url'
37+
CLOUDINARY_STORAGE = {
38+
'CLOUD_NAME': 'your_cloud_name',
39+
'API_KEY': 'your_api',
40+
'API_SECRET': 'your_api_secret'
41+
}
42+
SILENCED_SYSTEM_CHECKS = ['django_recaptcha.recaptcha_test_key_error']
43+
```
44+
45+
> Please reference, the [.env.example](https://github.com/PyconUg/pycon-africa/tree/main/.env.example) file for the expected environment variables.
46+
47+
### 4. Managing Database Migrations
48+
With an active virtual environment, run the command below while in the root project directory to apply the current migrations to your database. By default, the migrations will be applied to an SQLite Database that will be autocreated in your root project directory.
49+
50+
```sh
51+
python manage.py migrate
52+
```
53+
Create a superuser account
54+
```sh
55+
python manage.py createsuperuser
56+
```
57+
58+
### 4. Running the
59+
Run the server by executing the command below
60+
```sh
61+
python manage.py runserver
62+
```
63+
Log into the superuser account [http://localhost/accounts/login]
64+
Access the admin dashboard [http://127.0.0.1:8000/organizers/]
65+
Add an event year [http://127.0.0.1:8000/organizers/home/eventyear/]
66+
67+
## We Develop with Github
68+
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
69+
70+
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
71+
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
72+
73+
1. Fork the repo and create your branch from `master`.
74+
2. If you've added code that should be tested, add tests.
75+
3. If you've changed APIs, update the documentation.
76+
4. Ensure the test suite passes.
77+
5. Make sure your code lints.
78+
6. Issue that pull request!
79+
80+
## Any contributions you make will be under the MIT Software License
81+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](https://choosealicense.com/licenses/mit/) that covers the project.
82+
83+
## Report bugs using Github's [issues](https://github.com/PyConAfrica/pyconafrica-website/issues)
84+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/PyConAfrica/pyconafrica-website/issues/new); it's that easy!
85+
86+
## Write bug reports with detail, background, and sample code
87+
**Great Bug Reports** tend to have:
88+
- A quick summary and/or background
89+
- Steps to reproduce
90+
- Be specific!
91+
- Give sample code if you can.
92+
- What you expected would happen
93+
- What actually happens
94+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
95+
96+
People *love* thorough bug reports.
97+
98+
## License
99+
By contributing, you agree that your contributions will be licensed under its MIT License.
100+
101+
## References
102+
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md)
103+
104+
105+
python3 manage.py shell < seeder.py

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# [PyCon Africa](https://pycon.africa/)
2+
3+
This is the source code for the https://pycon.africa/ website.
4+
5+
## Running the site locally
6+
7+
1. Before you can run the site, you will need to install these requirements:
8+
9+
* [Python 3.11](https://python.org)
10+
* [Poetry](https://python-poetry.org/)
11+
12+
Once those are installed, you can do the following:
13+
14+
15+
2. Clone or fork the repo
16+
17+
Follow the guide on [GitHub Help - Fork a Repo](https://help.github.com/articles/fork-a-repo) to understand how to clone or fork a repo.
18+
19+
20+
3. Use poetry to install all the prerequisite Python packages
21+
22+
```
23+
poetry install
24+
```
25+
26+
4. Get your database set up
27+
28+
```
29+
# open a poetry shell. This activates the virtual environment associated with the project
30+
31+
poetry shell
32+
33+
# look at the shell prompt, it will look a little different. This means that the virtual environment is active
34+
35+
# Then run the migrations
36+
37+
python manage.py migrate
38+
```
39+
40+
5. Now everything is set up; you can run the application
41+
42+
```
43+
# If your virtual environment is not active, then activate it
44+
45+
poetry shell
46+
47+
# Run the server
48+
49+
python manage.py runserver
50+
51+
```
52+
53+
You'll see a whole lot of output in the terminal, it will look something like this:
54+
55+
```
56+
Watching for file changes with StatReloader
57+
Performing system checks...
58+
59+
System check identified no issues (0 silenced).
60+
April 12, 2024 - 06:16:26
61+
Django version 5.0.4, using settings 'pyconafrica.settings'
62+
Starting development server at http://127.0.0.1:8000/
63+
Quit the server with CONTROL-C.
64+
65+
```
66+
67+
Now open up a web browser and visit the url that was mentioned. It should be http://127.0.0.1:8000/
68+
69+
That's all. Now the site is running.

about/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)