Skip to content

Jew-Yeah/Django-test

Repository files navigation

This is a simple news feed web app.

  • Tech: Django, Django Forms, SQLite (file-based DB per request).
  • Features: Create news items with title, publication date & time, body text, and optional multiple images.
  • Feed: Paginated with adjustable page size (10, 20, 50).
  • Display: All news fields displayed, including image gallery.

Note: The original test mentions MySQL/PostgreSQL. This build uses SQLite for local development as requested. Switching to MySQL/PostgreSQL requires only changing DATABASES in newsfeed/settings.py and installing the appropriate driver.

Quick start

  1. Python 3.9+ recommended. Create & activate a virtualenv.
  2. Install deps:
    pip install -r requirements.txt
  3. Apply migrations and run the server:
    python manage.py migrate
    python manage.py runserver
  4. Open http://127.0.0.1:8000/ — create news and browse the feed.
  5. Uploaded images are stored under media/.

Pagination controls

Use the drop-down at the bottom (10 / 20 / 50). The value is passed via ?per_page= query param.

Project layout

newsfeed_project/
├─ manage.py
├─ requirements.txt
├─ README.md
├─ db.sqlite3             # created after running migrations
├─ media/                 # uploaded images
├─ static/                # static assets
├─ templates/             # base templates
├─ newsfeed/              # project configs
└─ news/                  # app with models/forms/views/templates

About

Реализация тестового задания по Django.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors