Blogs for tech and beyond from DSC-IEM community. With the help of this project we hope to provide the students of this community a platform to share, showcase and help each other in their exciting journey of learning and building amazing things.
We are using Python 🐍 and Django for our blog server
virtualenv blogenvblogenv\Scripts\activatepip install -r requirements.txtpython manage.py collectstaticpython manage.py makemigrations dscblogpython manage.py migrate --run-syncdbpython manage.py runserver 0.0.0.0:8000(This will only work on linux)
gunicorn -b 0.0.0.0:80 dscblog.wsgiFor local setup, you can also use settings_dev.py file
DJ_SECRET_KEY: Django secret keyBASE_URL: Root url of the server. eg:https://example.comDATABASE_URL: eg:postgres://user:password@localhost/dbnameHOST: eg:example.com
optionals
EMAIL_HOST: eg:smtp.gmail.comEMAIL_HOST_USER: eg:test@gmail.comEMAIL_HOST_PASSWORD: Your email password
To be abe to access the admin page /admin you need a super user account.
python manage.py createsuperuserA few features needs to be configured first before they can be used
-
In Django Admin page
/admingo toSITESmake sure you have the domain name set properly. For local environment useDomain nameandDisplay nameashttp://localhost:8000 -
In Django Admin page
/admingo toSOCIAL ACCOUNTS > Social applicationsChoosegoogleas the provider and fill up the required info. Keepkeyfield blank. Follow the docs for more info.
Once you have written some blogs, its time to feature some of them in the home page.
To feature a blog, go to Django Admin page /admin, now go to DSCBLOG > Featureds
use ADD FEATURED button and fill up the form, you can keep Info field blank.
Note that your blog post must be public to actually show up in the featured section.

