Gamers Hub — (Django Project)

Gamershub Preview

After months of learning AngularJS frontend technologies and Python Flask backend data manipulation, it was time for the final challenge: Stream 3 of the Code Institute diploma. This was where everything would come together in a full-stack Django application that needed to demonstrate not just technical competence, but real-world functionality.

Gamers Hub became my digital love letter to the gaming community that had shaped so much of my life.

The Vision: More Than Just Another Website

When I sat down to plan my final project, I knew it had to be something I genuinely cared about. Gaming had been a constant throughout my life - from childhood console sessions to discovering the vibrant communities that formed around shared digital experiences.

The idea of creating a platform where gamers could connect, share opinions, and even purchase gaming gear felt like the perfect intersection of personal passion and technical challenge.

Gamers Hub wasn't going to be just another blog or e-commerce site. I envisioned a comprehensive community platform with user-generated content, interactive discussions, personalised profiles, and a fully functional online store.

It was ambitious - perhaps overly so for a final project - but that ambition would drive me to push beyond my comfort zone in ways I hadn't expected.

Django: My Introduction to "Batteries Included" Development

Coming from Flask's minimalist approach in the previous stream, Django felt like stepping into a fully equipped workshop after working with basic hand tools. The framework's "batteries included" philosophy meant that features like user authentication, admin interfaces, and ORM relationships were already there, waiting to be configured rather than built from scratch.

My first Django project structure looked intimidating:

Project Structure
gamershub/
├── accounts/
├── blog/
├── cart/
├── checkout/
├── products/
├── templates/
├── static/
└── manage.py

Each app had its own models, views, and templates. The separation of concerns that Django enforced felt restrictive at first, but as the project grew, I began to appreciate how this structure prevented the kind of monolithic mess that can emerge in smaller frameworks.

User Authentication: The Foundation of Community

Before users could share opinions or purchase products, they needed accounts. Django's built-in authentication system provided the foundation, but creating a seamless user experience required careful attention to the entire registration and login flow.

The Registration Journey

I wanted new users to feel welcome from the moment they decided to join. The registration process needed to be straightforward - just a few essential fields and they'd be in. But behind that simplicity lay considerations I hadn't anticipated: email validation, password strength requirements, and the delicate balance between security and usability.

Implementing the "forgotten password" functionality taught me about Django's email backends and the importance of clear user communication. There's something both technical and empathetic about crafting the perfect password reset email - it needs to be secure, trustworthy, and helpful all at once.

Profile Management: Making It Personal

Once users could create accounts, they needed ways to make those accounts their own. The profile system I built allowed users to upload avatars, set basic information, and manage their content. Integrating Solr Thumbnail for image resizing was my first encounter with Django's powerful package ecosystem.

The profile page became a central hub where users could change passwords, edit personal details, or jump into creating blog posts. Seeing this functionality come together - where a user could seamlessly navigate from reading content to creating their own - felt like witnessing the birth of a real community platform.

Content Creation: Blogs and Community Interaction

Building the Blog System

The blog functionality needed to balance simplicity with sophistication. Users should be able to create rich content without feeling overwhelmed by options. Django's admin interface provided a starting point, but the public-facing blog creation needed to be much more user-friendly.

I implemented a system where users could create, edit, and manage their own blog posts, but only after logging in. Anonymous visitors could read content, but participation required commitment through registration. This approach encouraged community building while maintaining quality control.

Django-Disqus Integration: Fostering Discussion

Adding comments through Django-Disqus was my solution for enabling community discussion without building a complex comment system from scratch. The integration process taught me about third-party service APIs and the trade-offs between building custom functionality versus leveraging external platforms.

Watching the first real discussions emerge in the comments sections was incredibly satisfying. The platform wasn't just displaying content - it was facilitating genuine community interaction.

Most Viewed Posts: Understanding User Engagement

Implementing the "most viewed" blog posts feature required thinking about user analytics in a privacy-conscious way. I needed to track engagement without being intrusive, creating a system that could identify trending content while respecting user privacy.

This feature became a window into user behaviour that informed other design decisions throughout the project.

E-commerce Integration: From Concept to Purchase

Building the Store

The e-commerce functionality represented my first serious attempt at handling real financial transactions. The product catalogue needed to be flexible enough to handle different types of gaming merchandise while maintaining a clean, intuitive shopping experience.

Creating the shopping cart system taught me about session management and state persistence. Users needed to be able to add items, modify quantities, and maintain their cart across different browsing sessions - functionality that seems simple until you start considering all the edge cases.

PayPal Integration: The Nervous Excitement of Real Payments

Integrating PayPal through Django-PayPal was simultaneously thrilling and terrifying. This wasn't just moving data around anymore - this was handling real money, real transactions, with real consequences if something went wrong.

The first successful test transaction felt like a milestone. Seeing the complete flow from product selection to payment processing to user redirect back to the site demonstrated that I'd built something genuinely functional, not just an academic exercise.

I decided to keep the payment processing simple, relying on PayPal's infrastructure for receipts and transaction management rather than building custom solutions. Sometimes the best technical decision is knowing when not to reinvent the wheel.

The Testing Reality Check

Chrome Developer Tools: My Constant Companion

Throughout development, Chrome's developer tools became an extension of my coding environment. The ability to inspect elements, debug JavaScript issues, and test responsive layouts in real-time accelerated the development process immeasurably.

The console became particularly valuable for tracking down JavaScript errors and monitoring network requests during PayPal integration testing.

Device Testing: The Real-World Wake-Up Call

Testing across actual devices revealed the harsh reality of cross-platform web development. What looked perfect on my development machine broke in subtle and not-so-subtle ways on different devices and browsers.

  • Apple devices performed flawlessly - the site looked and functioned exactly as intended across different iOS devices and Safari versions.
  • Android devices presented more challenges. The most bizarre issue involved Amazon-branded tablets that stubbornly insisted on rendering the desktop version regardless of screen size. The only solution was clearing browser history completely, and even then, issues would resurface after new deployments.
  • Windows Phone testing revealed responsive design problems I hadn't anticipated. Blog post URLs would overflow the screen boundaries, and weird margin issues appeared that didn't manifest on other platforms. These platform-specific quirks taught me that responsive design requires testing on actual devices, not just browser emulation.

I'll admit upfront: testing was probably the weakest aspect of this project. I struggled to conceptualise what kinds of tests would be most valuable, and time constraints meant I focused more on building features than comprehensively testing them.

The eight tests I did write focused primarily on the accounts app, covering user authentication flows and basic page rendering. Looking back, I should have implemented a more systematic testing approach from the beginning, particularly for the e-commerce functionality where bugs could have real financial implications.

The Community Testing Heroes

The Code Institute Slack community proved invaluable during the testing phase. Fellow students brought fresh eyes and different devices to test the platform, discovering issues I would never have found on my own.

  • Andy (mormoran) discovered a critical security flaw that allowed any registered user to edit any other user's blog posts. This was a wake-up call about the importance of proper authorisation checks, not just authentication. His fix suggestion and layout improvement recommendations (switching from container-fluid to container to prevent neck strain from excessive horizontal scrolling) demonstrated how valuable fresh perspectives can be.
  • Robin (robinz) and Simen (eventyret) provided ongoing support throughout the development process, helping troubleshoot issues and offering encouragement when challenges seemed insurmountable.

Deployment Adventures: From Local to Production

The Heroku Learning Curve

Deploying to Heroku marked my first real experience with production web hosting. The platform-as-a-service approach was both liberating and constraining - I didn't need to manage server infrastructure, but I also had less control over the deployment environment.

The most significant challenge involved static file management. Heroku's ephemeral filesystem meant that uploaded images would disappear whenever dynos restarted. This led to my first experience with Amazon AWS S3 for static storage - a solution that proved much more reliable than trying to store media files on the application server.

Git Workflow Mistakes

One of my biggest regrets from this project was my poor Git workflow. Instead of using feature branches and proper version control practices, I pushed every change directly to the master branch. The result was a messy commit history with an embarrassingly high commit count.

This experience taught me the importance of proper Git workflows, especially when deploying to production environments where every commit might trigger a new deployment.

Database Migration Challenges

Using ClearDB for MySQL hosting on Heroku introduced me to the complexities of database migrations in production environments. Moving data from local development to hosted production required careful planning and testing to avoid data loss or corruption.

Technical Challenges That Shaped My Understanding

The jQuery Document Ready Conflict

There was one particularly puzzling technical issue that involved conflicting JavaScript files. When using the $(document).ready, only the first linked JavaScript file would function properly. After extensive debugging, I discovered this was related to how Django renders templates and handles template inheritance.

The solution - removing the $(document).ready) wrapper - was simple, but the debugging process taught me valuable lessons about Django's template system and JavaScript execution order in server-rendered applications.

CSS Validation and Browser Compatibility

The CSS validation warnings I encountered highlighted the challenge of writing standards-compliant code while using cutting-edge features. Many warnings related to CSS4 properties that weren't yet fully standardised, and webkit-specific scrollbar customisations that were necessary for the desired user experience.

These validation issues taught me to balance standards compliance with practical functionality - sometimes you need to use vendor-specific properties to achieve the user experience you want.

The Theme Switching Feature

Implementing the ability for users to switch between light and dark themes required careful CSS architecture and state management. This feature, while not originally planned, became one of the most satisfying additions to the platform - giving users control over their visual experience.

Production Issues and Real-World Lessons

Heroku Platform Quirks

Running a production application revealed platform-specific issues that never manifested during local development. Occasional MySQL connection errors and Django template warnings about undefined variables were reminders that production environments have their own unique challenges.

Many of these issues turned out to be common problems with known solutions, but experiencing them firsthand taught me the importance of production monitoring and error handling.

The Bootstrap Forms Warnings

Django Bootstrap Forms occasionally generated warnings about undefined template variables - a common issue that experienced developers learn to recognise as harmless. These warnings taught me to distinguish between critical errors and minor template processing issues.

Technical Architecture Worth Exploring

The final project architecture demonstrated several Django concepts that were new to me:

  • Django Apps Structure: Breaking functionality into discrete apps (accounts, blog, cart, checkout, products) created maintainable, reusable code modules.
  • Model Relationships: User profiles, blog posts, products, and orders all connected through Django's ORM relationships, creating a coherent data model.
  • Template Inheritance: The base template system allowed consistent styling and navigation across the entire platform while enabling page-specific customisation.
  • Static Files Management: Integrating AWS S3 for static and media files taught me about cloud storage and CDN concepts.
  • Third-Party Package Integration: Using packages like Django-Paypal, Django-Disqus, and Sorl-thumbnail demonstrated the power of Django's ecosystem.

Security Lessons Learned

The security vulnerability discovered by Andy was an important learning moment. The ability for any user to edit any other user's content highlighted the importance of proper authorisation checks:

Improper Authorisation Check
# Wrong approach - checking if user is authenticated
if request.user.is_authenticated:
    # Allow editing
 
# Correct approach - checking if user owns the content
if request.user.is_authenticated and blog_post.author == request.user:
    # Allow editing

This experience taught me that security isn't just about preventing unauthorised access - it's about making sure that authorised users can only access their own data.

The Community Response

Watching fellow students and mentors interact with the platform provided invaluable feedback about user experience and functionality. Their suggestions shaped not just the final product, but my understanding of how to build applications that serve real user needs.

The collaborative debugging sessions in Slack demonstrated that software development is rarely a solo activity - community support and diverse perspectives make projects better.

Running Gamers Hub Today

Since the original Heroku hosting is no longer available, I've documented the complete setup process for anyone interested in exploring the codebase or learning from the implementation.

Updated Installation Process

Originally, Gamershub was set up using Python 2.7 and older Django dependencies. However, since Python 2.7 reached its end of life in January 2020, the old instructions are now obsolete.

This updated installation guide has been rewritten for Python 3.6 to maintain compatibility with the project's Django 1.11 setup.

Also, please note that the live Heroku demo is no longer available, as Heroku discontinued free plans and removed older projects. To explore Gamershub, you'll need to run it locally using the updated setup steps below.

Key Setup Steps

  1. Python 3.6 Installation: Required for compatibility with the Django 1.11 and older package versions used in the project.

  2. Virtual Environment Creation: Isolating dependencies to avoid conflicts with other Python projects.

  3. Package Installation: Using the provided requirements files to install all necessary dependencies, including some packages that will automatically downgrade to maintain compatibility.

  4. Database Migration: Setting up the local database schema using Django's migration system.

  5. Development Server: Running the local development server to explore the full functionality.

Clone the Repository

Clone the Repository
git clone https://github.com/gunnerjnr/stream-three-final-project.git
cd stream-three-final-project

Install Python 3.6

The project depends on packages that are not compatible with the latest Python versions. Download and install Python 3.6.8 for Windows, or use your package manager on macOS/Linux.

Verify the installation:

Verify Python Installation
py -3.6 --version

Create and Activate a Virtual Environment

Create and Activate a Virtual Environment
py -3.6 -m venv venv
.\venv\Scripts\Activate.ps1   # On Windows PowerShell
# Or, on macOS/Linux:
# source venv/bin/activate

Upgrade Pip and Setuptools

Older versions of these tools can cause dependency conflicts. Upgrade them to stable versions compatible with Django 1.11:

Upgrade Pip and Setuptools
python -m pip install -U "pip==21.3.1" "setuptools==58.5.3" wheel

Install Project Requirements

There are two requirement files to install:

Install Project Requirements
pip install -r requirements/base.txt
pip install -r requirements/dev.txt

Some libraries will automatically downgrade to older versions — this is intentional to maintain compatibility.

Apply Database Migrations

Set up the database schema with:

Apply Database Migrations
python manage.py migrate

Run the Development Server

By default, Django uses port 8000. However, if it's blocked or in use, you can specify another port like this:

Run the Development Server
python manage.py runserver 127.0.0.1:8081

Now, open the local server at http://127.0.0.1:8081 in your browser to view the site locally.

Troubleshooting

  • WinError 10013: If you get a socket permissions error on port 8000, switch to another port as shown above.
  • Dependency Conflicts: If installation downgrades packages like pytz or requests, this is expected and required.
  • Template Warnings: You may see Django admin warnings in the console — these are harmless.

Exploring the Codebase

  •   Gamers Hub


    You can examine the complete source code and documentation in the GitHub repository, including detailed setup instructions for running the project locally.

The project structure provides several learning opportunities:

  • Django App Architecture: Each major feature area (accounts, blog, checkout, etc.) is implemented as a separate Django app, demonstrating proper separation of concerns.
  • Template System: The template hierarchy shows how Django's inheritance system enables consistent design with page-specific customisation.
  • Model Relationships: The database models demonstrate various Django ORM relationship types and how they connect different aspects of the application.
  • Payment Integration: The PayPal integration code shows how to handle third-party payment processing in a Django application.
  • User Authentication Flow: The accounts app provides examples of custom user registration, profile management, and authentication workflows.

Learning from the Code

The repository serves as a time capsule of my learning journey through Django development. The commit history shows the evolution of features, the debugging process for various issues, and the iterative improvement of the codebase.

Future Django developers can see not just what the final product looked like, but how it evolved through development challenges and community feedback.

Reflections on the Full-Stack Journey

Building Gamers Hub marked the culmination of my transformation from someone curious about web development to a developer capable of building production-ready applications. The project brought together everything I'd learned about frontend design, backend logic, database management, and deployment strategies.

Technical Growth

The complexity of coordinating user authentication, content management, e-commerce functionality, and third-party integrations demonstrated how far I'd progressed from creating simple static websites. Each feature required not just implementation, but consideration of how it would interact with other parts of the system.

Problem-Solving Evolution

My approach to debugging and problem-solving had evolved significantly. Instead of getting stuck on issues, I'd developed systematic approaches to identifying root causes, researching solutions, and implementing fixes. The jQuery conflict resolution and security vulnerability patches showed this growth in action.

Community Appreciation

The collaborative aspect of this project reinforced how valuable community support is in software development. From initial concept feedback to final testing and bug reports, the input from fellow developers made the final product significantly better than what I could have created in isolation.

The Gaming Community Impact

While Gamers Hub was a diploma project, creating it deepened my appreciation for the gaming communities that had influenced my life. The platform wasn't just a technical exercise - it was an attempt to give back to the community that had taught me about collaboration, problem-solving, and shared passion for digital experiences.

The blog system became a space for gaming opinions and reviews. The store provided access to gaming merchandise. The user profiles allowed community members to connect with like-minded individuals. Each feature served the broader goal of bringing people together around shared interests.

Looking Forward: Django and Beyond

Completing Gamers Hub provided a solid foundation in Django development, but more importantly, it demonstrated the difference between learning programming concepts and building applications that solve real problems for real users.

The project taught me to think about user experience, security implications, performance considerations, and maintenance requirements - skills that extend beyond any particular framework or technology.

The confidence gained from successfully building and deploying a full-stack application with real-world functionality opened doors to more complex projects and deeper specialisation in web development.

Credits

  • Code Institute - For the lessons on Full Stack Development.
  • The Slack Community, its been a pleasure! Special thanks go to Yoni Lavi, Nakita, Niel and Tiffany Snell for being the best mentors/helpers out there.
Author

About the Author

David Gunner (Jnr) is an SEO executive, digital marketer, and hobbyist developer with years of experience. I even hold a Full Stack Software Development Diploma. You can learn more about my journey in this blog post and you can view my diploma certificate here.

Passionate about helping beginners learn to code and sharing practical insights, knowledge, and resources.