Skip to content

callback-demons/callback-news-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Callback News API

Callback-News.com is an online technology newspaper that gets its news through external newspapers.

Callback-News.com has the news updated daily so you do not miss your dose of tech.

The newspaper is managed by an admin panel in Python, gets the news automatically and has its frontend in NextJs (React).

🚀 Links

🛠 Installation

  1. First, clone this repo with git clone.
  2. Create enviroment file .env.dev hat satifies the emty values below:
DEBUG=1
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=callback_news
SQL_USER=admin
SQL_PASSWORD=890306
SQL_HOST=postgres
SQL_PORT=5432
DJANGO_SETTINGS_MODULE=api.settings.dev
BUCKET_NAME=bucket
GS_CREDENTIALS_FILE_LOCATION=
GS_PROJECT_ID=
EMAIL_HOST=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_PORT=
EMAIL_USE_TLS=
  • If you want to set your own values for pgadmin, change them in the docker.compose.yml, in the pgadmin section.
  1. To set minio server add 127.0.0.1 minio to your /etc/hosts file or equivalent in your OS.
  2. Enter to http://minio:9000
  • Credentials are:
    • MINIO_ACCESS_KEY: access_key
    • MINIO_SECRET_KEY: secret_key
  1. Create bucket in Minio and name it bucket

create_bucket_in_minio

  1. Click on edit policy from the bucket.

Edit bucket's policies in Minio

7.then set prefix to * and set to select read and write

Set bucket's policies in Minio

  1. Build the container with docker-compose build (Make sure you have docker and docker compose installed in you machine)
  2. Once docker image is installed, turn it on with docker-compose up.
  3. Run migration of the models set with docker-compose exec django python manage.py makemigrations.
  4. Then run docker-compose exec django python manage.py migrate to complete the migration process.
  5. Set you user in django administration IDE with docker-compose exec django python manage.py createsuperuser
  6. Set values and the go to localhost/8080/admin to access.
  7. To sing in the pgadmin IDE go to localhost/8000/admin and join with your credentials..

🖥 Execution

Development Environment

This project runs on http://localhost:8080 Production Environment

🛠️ Technologies

  • Python
  • Django
  • PostgreSQL

✒️ Authors

If you want to know about the insights click here!

🎁 Contribute

Feel free to contribute to the project!

About

API for the Callback News Site Developed with Django REST Framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •