Skip to content
Skeleton Django blog/news web app
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project
.gitignore
Procfile
README.md
requirements.txt
runtime.txt

README.md

Galazy News Radio


❗️ Ready for production with heroku. ~ For a blueprint of how to deploy a python app to Heroku go to this post


Dependencies

  • 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

Feats

  • 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.

Local Development

SETUP

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

TO RUN

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 =>

<your site>/login/no/so/fast/you

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


Customizing.

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'
You can’t perform that action at this time.