Space app is a web site for astronomy classes. Link here.
On a main page added a picture of the day - NASA API project, which shows every day a picture (or video) and an explanation.
Also added posts, 4 on each page.
Pupils can register, login and add posts
with one added picture which is used as preview on a main page. Pupils can edit or delete their posts (only author can see links). Every post got views counter.
Pages got pagination
Pupils cannot change or delete their profiles, that's up to teaher. Every Monday at 8.30 each of those who added posts get statistic of views sent to email.
Before installing the package make sure you have Python version 3.8 or higher installed:
python --version
The project uses the Poetry dependency manager. To install Poetry use its official instruction.
PostgreSQL is used as the main database management system. You have to install it first. It can be downloaded from official website
git clone git@github.com:u-shev/space-app.git
cd space-app
python -m venv /path/to/new/virtual/environment
DATABASE_URL=postgresql://{username}:{password}@{host}:{port}/{databasename}
SECRET_KEY='{your secret key}'
EMAIL_HOST_USER='{your email adress, if you use different from mail.ru post, you should change EMAIL_HOST, EMAIL_PORT, EMAIL_USE_TLS, EMAIL_USE_SSL varaibles in settings.py}'
EMAIL_HOST_PASSWORD='{it's not your post password! you shoul get special password for application in settings of your post operator}'
make migrate
make start
By default, the server will be available at http://0.0.0.0:8000.
make run
The dev server will be at http://127.0.0.1:8000.
To use Celery you should open different terminals for:
- (global env) Redis with command
redis-server
- (virtual env) Celery worker with command
make worker
- (virtual env) Celery beat with command
make beat
starts linter check
starts tests