Skip to main content

company-portfolio-package

A company/group site package for the Core boilerplate: a single Company profile (name, tagline, description, logo, contact info) plus its Members — each member is a Core User with their own public page (job title, department, tenure) whose bio/headline/skills/education/ certifications/social links come from the portfolio package, not a second copy of the same content here. It depends on core-package for auth, RBAC, and the shared User model, and on portfolio-package for that profile content — it never defines its own user/account model or duplicates portfolio's fields.

This package models one company/group (a singleton Company row, created automatically on first read — see services.get_company()), not a multi-tenant directory of many companies. If you need the latter, this package's Member model (drop its implicit "the one company" assumption and add a company FK) is the natural starting point, not a rewrite.

Company.tagline/description and Member.title are translatable via apps.core.models.TranslatableModel — a single translations JSON field per row, not a tagline_en/tagline_fa column per language. Add a language by calling PUT /translations/{language} or PUT /members/{id}/translations/{language}, no migration required.

Downloadable CVs

Both the company/group and each member expose GET .../cv:

  • If an admin (or, for a member, whoever has upload rights) has uploaded a CV file (Company.cv_file / Member.cv_file), it's served as-is.
  • Otherwise a CV is generated on the fly as a PDF (company/pdf.py, via reportlab) from the structured data already on hand: for a member, their Member fields plus their portfolio Profile/Skill/Education/ Certification/SocialLink rows; for the company, the Company row plus a directory of its active members. This always succeeds — there's no "no CV available" state — and stays in sync with profile edits without anyone re-uploading a file.

reportlab was chosen specifically because it's pure Python (no system libraries like Pango/Cairo that e.g. WeasyPrint needs), so this package installs the same way on every machine.

See Core's AGENT.md §10 ("Package architecture") for the full contract this package follows.

Install

pip install company-portfolio-package

Requires Python 3.10+ and Django 5.2 (via core-package). This also installs portfolio-package and blog-package.

Local development

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

Installing into a Core-based project

  1. Install it into the host project's venv:
    pip install company-portfolio-package
    
    This also pulls in core-package, portfolio-package and, transitively, blog-package automatically. You still need to do steps 2-4 for company itself (and, if not already done, for portfolio/ blog too) — Core's "no auto-discovery, explicit wiring" convention (§10) means the pip install is automatic, but INSTALLED_APPS/ router-mounting/migrate are not.
  2. Add it to INSTALLED_APPS in the host's config/settings/base.py, under the # site packages comment (after portfolio, since this package imports portfolio.models directly):
    # site packages
    "blog",
    "portfolio",
    "company",
    
  3. Mount its router in the host's config/api.py:
    from company.api import router as company_router
    ...
    api.add_router("/company", company_router)
    
  4. Migrate:
    python manage.py migrate
    
  5. Optional — add a nav entry under UNFOLD["SIDEBAR"]["navigation"] in the host's config/settings/base.py for Company/Member.

Endpoints

Mounted at whatever prefix the host chooses (/company in the example above). Reads are public; all writes are admin-only (require_role("admin"), from Core).

  • GET / — the company/group profile (public), optional ?lang=
  • GET /content — the whole landing-page document (public): brand, hero, about, services, projects, steps, stats, team, contact, socials, clients, testimonial, FAQ, values, timeline, posts, categories. Every text is {fa, en} (languages from COMPANY_CONTENT_LANGUAGES, default fa+en); services/projects come from portfolio, posts from blog, team from Member. Point the Puzzllium site's NEXT_PUBLIC_API_URL at .../company.
  • GET /content is public unless COMPANY_CONTENT_API_KEY is set in the host's settings; then it needs an X-API-Key: <key> header (401 otherwise).
  • GET /cv — download the company/group CV (public): the uploaded file if one exists, else an auto-generated PDF
  • GET /members — paginated list of active members (public), optional ?lang=
  • GET /members/{member_id} — a member's public page (public), optional ?lang= — merges Member with their portfolio Profile
  • GET /members/{member_id}/cv — download that member's CV (public): the uploaded file if one exists, else an auto-generated PDF
  • PATCH /, PUT /translations/{language} — update the company profile / its translations
  • POST /logo, POST /cv — upload the company logo / CV file (multipart)
  • POST /members, PATCH /members/{member_id}, DELETE /members/{member_id} — manage membership (links an existing user_id; does not create or delete the User itself)
  • PUT /members/{member_id}/translations/{language} — set a member's translated title
  • POST /members/{member_id}/cv — upload a member's CV file (multipart)

Seeding the landing-page content

python manage.py import_site_content puzzllium-content.json --owner-email you@example.com

Loads a site-content JSON into Company, the content blocks (steps, stats, values, timeline, FAQ, categories, socials, testimonial) and the owner's portfolio services/projects and blog posts (English in the base columns, other languages in translations). Team members are real accounts and are not created — add them as Members (with a name) and fill their portfolio Profile/skills. Images are uploaded in the admin. Requires blog in INSTALLED_APPS next to portfolio and company.

Metadata

Release files for company-portfolio-package 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for company-portfolio-package 0.1.0
File Size Uploaded Provenance Actions
company_portfolio_package-0.1.0.tar.gz 24.1 kB With provenance Details for company_portfolio_package-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for company-portfolio-package 0.1.0
File Interpreter ABI Platform Actions
company_portfolio_package-0.1.0-py3-none-any.whl Python 3 none any Details for company_portfolio_package-0.1.0-py3-none-any.whl

Total release size: 49.4 kB

Release files / company_portfolio_package-0.1.0.tar.gz

Download URL company_portfolio_package-0.1.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6aa8daf1092f2a4227e8ec5965ba6c7e2926166ec5776dae6a364505b720878f
BLAKE2b-256 checksum
How to use checksums
ae0c0b6f43f7d38865973cfd9fca4ffcab7389c8cdaa66aca1563dea84af4615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / company_portfolio_package-0.1.0-py3-none-any.whl

Download URL company_portfolio_package-0.1.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b040b5b4d6575568510ddb4d1bf590a096b563de6aa40885fc400c7c61f78ea3
BLAKE2b-256 checksum
How to use checksums
3f3226b81e7f83a86809ffb451c2cbd4c9b63aa4fc9c7bf58ad6d96dfad3c1f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for company-portfolio-package 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for company_portfolio_package-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page