Python Tutorials
This is a Django web application that allows users to browse python tutorials categorized into various series. Users can register, log in, and manage their accounts. The project is connected to a PostgreSQL database hosted on Render.
- User authentication (registration, login, logout)
- Browse tutorials by categories and series
- Detailed tutorial pages
- User account management
- Error handling pages
- Python 3.7+
- Django
- PostgreSQL
- Render for hosting
- HTML, CSS for front-end
- Python 3.7+
- PostgreSQL
- Pip (Python package installer)
-
Clone the repository:
git clone https://github.com/senaditya/python-tutorials.git cd yourproject
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the database: Ensure you have PostgreSQL installed and create a new database. Update your
DATABASE_URL
environment variable with your database details in the format:postgres://USER:PASSWORD@HOST:PORT/DBNAME
-
Run database migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Collect static files:
python manage.py collectstatic
-
Start the development server:
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000
to see the application running.
To deploy this project to Render.com:
-
Create a new web service on Render.com and connect your GitHub repository.
-
Add environment variables in the Render.com dashboard:
DATABASE_URL
: Your PostgreSQL database URL- Any other necessary environment variables
-
Specify the build and start commands in the Render.com settings:
- Build Command:
pip install -r requirements.txt && python manage.py collectstatic --noinput && python manage.py migrate
- Start Command:
gunicorn yourproject.wsgi:application
- Build Command:
-
Deploy the service and Render.com will automatically build and start your application.
- Visit the homepage to see a list of tutorial categories.
- Click on a category to see the series within it.
- Click on a series to view the tutorials in that series.
- Register or log in to manage your account.
- Log out when you are done.
- Fork the repository.
- Create a new branch.
git checkout -b feature/your-feature
- Make your changes.
- Commit your changes.
git commit -m "Add your feature"
- Push to the branch.
git push origin feature/your-feature
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more details.
For any questions or feedback, please reach out to me or create an issue on GitHub.
Feel free to customize the above template according to your project's specific details and requirements.