{"id":13507989,"url":"https://github.com/nicksanders/exdjango","last_synced_at":"2026-02-27T18:31:52.196Z","repository":{"id":35696420,"uuid":"39973486","full_name":"nicksanders/exdjango","owner":"nicksanders","description":"A few elixir libraries for working with django","archived":false,"fork":false,"pushed_at":"2017-04-19T13:42:12.000Z","size":37,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-15T20:51:34.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicksanders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-30T21:34:10.000Z","updated_at":"2024-11-23T21:16:25.000Z","dependencies_parsed_at":"2022-09-08T14:20:57.939Z","dependency_job_id":null,"html_url":"https://github.com/nicksanders/exdjango","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/nicksanders/exdjango","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksanders%2Fexdjango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksanders%2Fexdjango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksanders%2Fexdjango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksanders%2Fexdjango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicksanders","download_url":"https://codeload.github.com/nicksanders/exdjango/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksanders%2Fexdjango/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29907762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:45.058Z","updated_at":"2026-02-27T18:31:52.175Z","avatar_url":"https://github.com/nicksanders.png","language":"Elixir","funding_links":[],"categories":["Framework Components"],"sub_categories":[],"readme":"# ExDjango\n\n[![Travis](https://img.shields.io/travis/nicksanders/exdjango.svg?style=flat-square)](https://travis-ci.org/nicksanders/exdjango)\n[![Hex.pm](https://img.shields.io/hexpm/v/exdjango.svg?style=flat-square)](https://hex.pm/packages/exdjango)\n[![Hex.pm](https://img.shields.io/hexpm/dt/exdjango.svg?style=flat-square)](https://hex.pm/packages/exdjango)\n\nAn elixir library for working with django\n\nWarning: This is Alpha software and subject to breaking changes.\n\n## Features\n\n* Django cookie-based sessions\n* Django redis cache sessions\n* Django pbkdf2_sha256 passwords\n\n## Installation\n\nAdd ex_django to your `mix.exs` dependencies other dependencies are optional depending on what features you want to use.\n\n```elixir\ndefp deps do\n[ {:exdjango, \"~\u003e 0.4.0\"} ]\nend\n```\n\nIf you need sessions you need to add poison\n\n```elixir\n{:poison, \"~\u003e 3.0\"},\n```\n\nIf you need to read/write django passwords you need to add comeonin\n\n```elixir\n{:comeonin, \"~\u003e 3.0\"},\n```\n\n## Django sessions\nAdd secret_key to config.exs and add either Cookie or Redis to endpoint.ex Plug config\n\n```elixir\n# config.exs\nconfig :exdjango, :config,\n  secret_key: \"django-secret-key\"\n\n# endpoint.ex\nplug Plug.Session,\n  store: ExDjango.Session.Cookie,\n  key: \"sessionid\"\n```\n\nor\n\n```elixir\n# config.exs\nconfig :exdjango, :config,\n  secret_key: \"django-secret-key\"\n  redis_pool: MyApp.RedixPool\n\n# endpoint.ex\nplug Plug.Session,\n  store: ExDjango.Session.Redis,\n  key: \"sessionid\"\n```\n\nTo use Redis session you need a redis connection pool see https://github.com/whatyouhide/redix for more information.\n\nSet user / get user_id (\"_auth_user_id\" from django session)\n\n```elixir\nconn\n |\u003e ExDjango.Session.put_user(user)\n\nconn\n |\u003e ExDjango.Session.get_user_id()\n```\n\n\n## Django passwords\n\n```elixir\nExDjango.Pbkdf2.checkpw(password, user.password)\n\nchangeset\n|\u003e put_change(:password, ExDjango.Pbkdf2.hashpwsalt(changeset.params[\"plaintext_password\"]))\n|\u003e repo.insert()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksanders%2Fexdjango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicksanders%2Fexdjango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksanders%2Fexdjango/lists"}