Galazy News Radio
- django_heroku => Good for the peace of mind.
- Markdownx => integrates markdown in the posts; inside the admin.
- whitenoise => By default Django does not serve static files, so make use of this tool to do so, read more here
- Gunicorn => Python WSGI HTTP server for Unix.
- psycopg2 => PostgreSQL adaptor for python, since you need to add a postreSQL database on Heroku to plug to your app;read Heroku docs on how to deploy a django application.
- dj-database-url => allows you to set up an DATABASE_URL environment variable to configure your Django application
- bootsrap4 => bootsrap4 strapped without loading from the HTML doc, doc.
To run in development first make sure you install the necessary dependencies in your virtualenviroment.
pip install -r requirements.txt
- Admin Markdown for your posts and category indexing.
- You can see a list of all posts and categories, clicking in a category takes you to all the posts under that particular category.
for development you can set just insert this before DEBUG in settings.
Note: You will need to set up an environment variable as => SECRET_KEY so that the function in the settings can find it, this is required for production with Heroku,
You can make it whatever u want,
SECRET_KEY = 'whateveryouwant'
These commands are to migrate, run them or you wont get past an error.
$ python<version> manage.py makemigrations $ python<version> manage.py migrate
After running migrations create a superuser
$ python<version> manage.py createsuperuser
Then run the server with this command
python<version> manage.py runserver
To go to the admin use this url =>
Note => you can customize the url for the admin in the project/urls.py
Note => You will need to create a superuser to login into your blogs admin
In the project/urls you will see something like this
# change 'My blog' to your blogs name, this will make the admin show your title. admin.site.site_header = 'My news site' # same thing. admin.site.site_title = 'My news site'