git clone https://github.com/digitalashes/blog-with-post
cd blog-with-post
vagrant up
vagrant ssh
./manage.py runserver 0.0.0.0:8000
- open localhost:8000 in browser
git clone https://github.com/digitalashes/blog-with-post
cd blog-with-post
cp env.example ./config/.env
- open ./config/.env file
1 find and replace
DJANGO_DATABASE_URL=postgres:///blog
toDJANGO_DATABASE_URL=postgres://postgres:pg_pass@db:5432/postgres
docker-compose up --build
- open localhost:8000 in browser
For run tests, in docker or vagrant execute pytest
- admin
- url to admin panel -
http://localhost:8000/admin
- username =
admin
- password =
admin
- url to admin panel -
- user with verified email
- username =
ckelly
- password =
password
- username =
- user with unverified email:
- username =
tatejulia
- password =
password
- username =
-
Add users to the blog (users can create an account, they should have a username, email address and password).
-
Users should verify their email address via a token that is sent by email, upon clicking on the token the user should be verified.
-
Add comments to the blog (only logged-in users can place comments, everyone can see them though).
-
Add a migration that will create some test comments in DB (should be reversable).
-
Cover code with unit tests (hint: use
factory_boy
library) (a big plus). -
Every models should be manageable in admin.
- Blog should have REST API for creating users and retrieving posts implemented using Django REST Framework (Only registered users and with verified email can retrieve data from blog).
- Project can be running using Docker.