Skip to content

hanzla-sib/DjangoApis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

DjangoApis Project

This project is a Django-based REST API for managing company-related data. It is structured as a Django project named companyapi with an api app that contains the main business logic, models, serializers, and views.

Project Structure

DjangoApis/
└── companyapi/
    ├── db.sqlite3                # SQLite database file
    ├── manage.py                 # Django management script
    ├── api/                      # Main app for API logic
    │   ├── models.py             # Database models
    │   ├── serializers.py        # Serializers for API
    │   ├── views.py              # API views
    │   ├── urls.py               # API URL routes
    │   ├── admin.py              # Admin site configuration
    │   ├── tests.py              # Unit tests
    │   └── migrations/           # Database migrations
    └── companyapi/               # Project settings
        ├── settings.py           # Django settings
        ├── urls.py               # Project URL routes
        ├── wsgi.py               # WSGI entry point
        └── asgi.py               # ASGI entry point

Requirements

  • Python 3.8+
  • Django (recommended: latest stable version)

Setup Instructions

  1. Clone the repository (if not already):

    git clone <your-repo-url>
    cd DjangoApis/companyapi
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    .\venv\Scripts\activate
  3. Install dependencies:

    pip install django
  4. Apply migrations:

    python manage.py migrate
  5. Run the development server:

    python manage.py runserver

    The API will be available at http://127.0.0.1:8000/.

  6. Create a superuser (optional, for admin access):

    python manage.py createsuperuser

Usage

  • Access the API endpoints as defined in api/urls.py.
  • Use the Django admin at http://127.0.0.1:8000/admin/ to manage data if you created a superuser.

Testing

To run tests:

python manage.py test

Notes

  • Modify api/models.py to change or add database models.
  • Update api/serializers.py and api/views.py to adjust API logic.
  • All configuration is in companyapi/settings.py.

For more information, see the Django documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages