Online Crime Reporting System Project in Django with Source Code

Online Crime Reporting System Project in Django with Source Code

A Online Crime Reporting System project in Django  is an easy project for beginners to learn how to build a web-based python Django project. We will provide you with the complete source code and database for the python project so that you can easily install it on your machine and learn how to program in Python Django. This project online reporting system for the crime related incidents that happened with you.

To start creating a Online Crime Reporting System Project in Python Django, makes sure that you have PyCharm Professional IDE Installed in your computer.

This Online Crime Reporting System in Django Framework, Also includes a Download Source Code for free, just find the downloadable source code below and click download now.

About ProjectProject DetailsDefinition
Project Name Online Crime Reporting System Project in DjangoThis Online Crime Reporting System Project in Django is a Python-based project. Using Python, Django, and SQLite3 Database, we built a Online Crime Reporting System portal which helps users to submit their complaint online easily.
Python version (Recommended)3.8 VersionPython 3.8 introduces some new syntax to the language, as well as a few small modifications to existing behavior and, most importantly, a slew of performance improvements, following in the footsteps of the previous 3.7 version.
Programming Language UsedPython Django LanguageDjango is a high-level Python web framework for building safe and maintainable websites quickly. Django is a web framework built by experienced developers that takes care of a lot of the heavy lifting so you can focus on developing your app instead of reinventing the wheel.
Developer Name itsourcecode.comFree projects containing source code in Java, PHP, Python, Django, VB.Net, Visual Basic, C, C++, C#, Javascript, and other languages are available on this website.
IDE Tool (Recommended)Sublime, Visual Studio, PyCharmSublime Text is a source code editor that is available for purchase. It comes with built-in support for a variety of programming and markup languages. Plugins, which are often community-built and maintained under free-software licenses, allow users to extend the functionality of the system. Sublime Text has a Python API to help with plugins.
Project Type Web ApplicationA web application, unlike computer-based software programs that operate locally on the device’s operating system, is application software that runs on a web server. The user uses a web browser with an active network connection to access web apps.
DatabaseSQLiteSQLite is a programming language that is used to create embedded software for devices such as televisions, cell phones, and cameras. It can handle HTTP requests with low to medium traffic. SQLite has the ability to compress files into smaller bundles with less metadata. SQLite is a temporary dataset that is used within an application to process data.
Online Crime Reporting System Project in Django overview

User Features of Online Crime Reporting System Project in Django

  • Manage User Profile– For the user profile, The user can update his/her information details.
  • Registration– For the registration, The user need to register first to create their own account.
  • Add Complaint– For the complaint, The user can view and add complaint through this website.
  • Login – By default the user need to login first to enable to access the system.

Online Crime Reporting System Project in Django Steps on How to Create a Project

Time needed: 5 minutes.

Here’s the step’s on how to create a Online Crime Reporting System Project in Django

  • Step 1: Open file.

    First , open “pycharm professional” after that click “file” and click “new project“.
    Create new Project for Online Crime Reporting System Project in Django with Source Code

  • Step 2: Choose Django.

    Next, after click “new project“, choose “Django” and click.
    choose django for Online Crime Reporting System Project in Django with Source Code

  • Step 3: Select file location.

    Then, select a file location wherever you want.
    Create Location Name for Online Crime Management System Project in Django with Source Code

  • Step 4: Create application name.

    After that, name your application.

  • Step 5: Click create.

    Lastly, finish creating project by clicking “create” button.
    Finish Creating Project Name for Online Crime Management System Project in Django with Source Code

  • Step 6: Start Coding.

    Finally, we will now start adding functionality to our Django Framework by adding some functional codes.

Functionality and Codes of the Online Crime Reporting System Project in Django

  • Create template for the login in form in Online Crime Reporting System Project in Django.

In this section, we will learn on how create a templates for the student form. To begin with, add the following code in your login.html under the folder of templates/accounts/.

{% extends 'base.html' %}

{% block header %}
    <title>User Login</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/register.css' %}">
{% endblock %}

{% block content %}
    {% load widget_tweaks %}
    {% if error_message %}
        <p>{{ error_message }}</p>
    {% endif %}

   <div class="w-50 mx-auto my-3">
   <h4 class="text-center mx-auto my-3">User Login</h4>
        <form method="post" action="{% url 'accounts:login' %}">
              {% csrf_token %}

              <div class="form-group">
                  <label for="username">Username:</label>
                  <input class="form-control" type="text" name="username" placeholder="Username">
              </div>

              <div class="form-group">
                  <label for="password">Password</label>
                  <input class="form-control" type="password" name="password" placeholder="Your Password">
              </div>

              <div class="container text-center">
                  <input type="submit" class="btn btn-danger col-md-4" name="" value="Login">
                  <button class="btn btn-success col-md-4"><a href="{% url 'accounts:register' %}" class="text-white">Register</a></button>
              </div>

        </form>
    </div>

{% endblock %}

  • Create template for the user registration in Online Crime Reporting System Project in Django.

In this section, we will learn on how create a templates for the user registration. To start with, add the following code in your register.html under the folder of templates/account.

{% extends 'base.html' %}
{% load static %}

{% block header %} <title>User Registration</title>
<link rel="stylesheet" href="{% static 'css/register.css' %}">
{% endblock %}



{% block content %}
    <div class="container w-50 mx-auto my-3">
        <h4 class="text-center">REGISTRATION FORM</h4>
        <form enctype="multipart/form-data" method="post">{% csrf_token %}
        {% load widget_tweaks %}

        {% if messages %}
            {% for message in messages %}
                <div class="alert-danger">{{ message }}</div>
            {% endfor %}
        {% endif %}

        <div class="form-group">
            <label for="{{ form.username_for_label }}">Choose Your Username:</label>
            {{ form.username|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.first_name_for_label }}">Your First Name:</label>
            {{ form.first_name|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.last_name_for_label }}">Your Last Name:</label>
            {{ form.last_name|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.email_for_label }}">Your Email:</label>
            {{ form.email|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.password1_for_label }}">Your Password:</label>
            {{ form.password1|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.password2_for_label }}">Confirm Your Password:</label>
            {{ form.password2|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.bio_for_label }}">Your Biography in Short:</label>
            {{ form.bio|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.profile_image_for_label }}">Upload Your Profile Picture:</label>
            {{ form.profile_image|add_class:"form-file-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.phone_no_for_label }}">Your Phone Number:</label>
            {{ form.phone_no|add_class:"form-control" }}
        </div>

        <div class="container text-center w-50">
            <input type="submit" class="btn-lg btn-success" value="REGISTER">
        </div>

    </form>
</div>
{% endblock %}

  • Create template for the new complaint form in Online Crime Reporting System Project in Django.

In this section, we will learn on how create a templates for the new complaint form. To start with, add the following code in your new_complaint.html under the folder of templates/complaints.

{% extends 'base.html' %}
{% load static %}

{% block header %} <title>Register a New Complaint</title>
<link rel="stylesheet" href="{% static 'css/register.css' %}">
{% endblock %}

{% block content %}
    <div class="container w-50 mx-auto my-3">
        <h4 class="text-center">COMPLAINTS FORM</h4>
        <form enctype="multipart/form-data" method="post">{% csrf_token %}
        {% load widget_tweaks %}

        {% if messages %}
            {% for message in messages %}
                <div class="alert-danger">{{ message }}</div>
            {% endfor %}
        {% endif %}

        <div class="form-group">
            <label for="{{ form.title_for_label }}">Complaint Title</label>
            {{ form.title|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.category_for_label }}">Category of Incident</label>
            {{ form.category|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.description_for_label }}">Please Describe What Happened With You?</label>
            {{ form.description|add_class:"form-control" }}
        </div>

        <div class="form-group">
            <label for="{{ form.location_for_label }}">Where did this happen?:</label>
            {{ form.location|add_class:"form-control" }}
        </div>

        <div class="container text-center w-50">
            <input type="submit" class="btn-lg btn-success" value="POST COMPLAIN">
        </div>

    </form>
</div>

    <script>
    $(document).ready(function() {
        let form_container = $('.container');
        form_container.hide();

        form_container.fadeIn(1000);
    });
    </script>
{% endblock %}

  • Create template for the complaint table form in Online Crime Reporting System Project in Django.

In this section, we will learn on how create a templates for the complaint table. To start with, add the following code in your all_complaints.html under the folder of templates/complaints.

<style>
    .complain-container {
        font-family: "Nunito", sans-serif;
        padding: 1rem;
        margin: 1rem;
    }
</style>

{% extends 'base.html' %}
{% load static %}

{% block header %} <title>All Registered Complaints</title>

{% endblock %}

{% block content %}
    <div class="container complain-container">
        <table class="table">
    <thead>
      <tr class="my-3">
        <th>Complain Title</th>
        <th>Submitted By</th>
        <th>View Details</th>
      </tr>
    </thead>
    <tbody>
    {% for each_object in object_list %}
        <tr>
            <td>{{ each_object.title }}</td>
            <td>{{ each_object.created_by }}</td>
            <td><a href="{% url 'complaints:detail_complain' pk=each_object.pk %}">View Details</a></td>
        </tr>
    {% endfor %}

    </tbody>
  </table>
    </div>
{% endblock %}

Downloadable Source Code Below.

Anyway, if you want to level up your programming knowledge, especially python, try this new article I’ve made for you Best Python Projects with source code for Beginners. But If you’re going to focus on web development using Django, you can download here from our list of Best Django Projects with source code based on real-world projects.

How To Run The Online Crime Reporting System Project in Django?

  • Step 1: Extract/unzip the file
  • Step 2: Go inside the project folder, open cmd and type the following commands to install Django Framework and run the webserver:
  • python manage.py migrate
  • python manage.py runserver
  • Step 3: Finally, open the browser and go to http://127.0.0.1:8000/

Summary

In summary, this 2022 Online Crime Reporting System Project in Django with Source Code can be useful to students or professional who wants to learn python programming language. This project can also be modified to fit your personal requirements. Hope this project will help you to improve your skills. Happy Coding!

Inquiries

If you have any questions or suggestions about Online Crime Reporting System Project in Django with Source Code, please feel free to leave a comment below.

1 thought on “Online Crime Reporting System Project in Django with Source Code”

Leave a Comment