Giter VIP home page Giter VIP logo

lawyer_site's Introduction

Legal Agency

This Django project implements a site for a legal agency. It allows users to view blog posts, create new posts, read reviews, and schedule appointments. The site also includes user registration and login functionality. Registered users can leave comments and they will be published after a moderator approve them.

Table of Contents

Project Structure

The project's main components are organized as follows:

  • blog app: Contains models, forms, views, and templates for the blog functionality.
  • users app: Handles user registration and authentication.
  • Templates: HTML templates for rendering pages.

Models

Post

  • title: The title of the blog post.
  • content: The content of the blog post.
  • publish: A boolean field indicating whether the post is published.
  • date_added: The date and time when the post was created.

BlogComment

  • article: A field linking an article with comments.
  • user_name: The nickname of the person leaving the comment.
  • comment: A text of the comment.
  • date_added: A description of the problem or reason for the appointment.
  • status: A boolean field indicating whether the comment is published.

Review

  • name: The name of the reviewer.
  • phone: The phone number of the reviewer.
  • content: The content of the review.
  • publish: A boolean field indicating whether the review is published.
  • date_added: The date and time when the review was created.
  • grade: The grade or rating given by the reviewer.

Appointment

  • name: The name of the person scheduling the appointment.
  • phone: The phone number of the person scheduling the appointment.
  • email: The email address of the person scheduling the appointment.
  • problem: A description of the problem or reason for the appointment.

Forms

  • PostForm: Form for creating and editing blog posts.
  • ReviewForm: Form for creating and editing reviews.
  • AppointmentForm: Form for scheduling appointments.
  • CommentForm: Form for creating and editing blog comments.

Views

The project includes views for the following functionality:

  • Home view
  • Prices view
  • List reviews view
  • Create review view
  • Posts view
  • New post view
  • Appointment view
  • User registration and authentication views

URLs

The project defines URL patterns for routing requests to the appropriate views.

Installation

  1. Clone this repository to your local machine.
  2. Create a virtual environment: python -m venv venv.
  3. Activate the virtual environment:
    • On Windows: venv\Scripts\activate
    • On macOS and Linux: source venv/bin/activate
  4. Install the required packages: pip install -r requirements.txt.
  5. Run migrations: python manage.py migrate.

Usage

  1. Start the development server: python manage.py runserver.
  2. Access the application in your web browser at http://localhost:8000.

lawyer_site's People

Contributors

alexlightbringer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.