exdjango alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view exdjango alternatives based on common mentions on social networks and blogs.
-
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
plug_canonical_host
PlugCanonicalHost ensures that all requests are served by a single canonical host. -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of exdjango or a related project?
README
ExDjango
An elixir library for working with django
Warning: This is Alpha software and subject to breaking changes.
Features
- Django cookie-based sessions
- Django redis cache sessions
- Django pbkdf2_sha256 passwords
Installation
Add ex_django to your mix.exs
dependencies other dependencies are optional depending on what features you want to use.
defp deps do
[ {:exdjango, "~> 0.4.0"} ]
end
If you need sessions you need to add poison
{:poison, "~> 3.0"},
If you need to read/write django passwords you need to add comeonin
{:comeonin, "~> 3.0"},
Django sessions
Add secret_key to config.exs and add either Cookie or Redis to endpoint.ex Plug config
# config.exs
config :exdjango, :config,
secret_key: "django-secret-key"
# endpoint.ex
plug Plug.Session,
store: ExDjango.Session.Cookie,
key: "sessionid"
or
# config.exs
config :exdjango, :config,
secret_key: "django-secret-key"
redis_pool: MyApp.RedixPool
# endpoint.ex
plug Plug.Session,
store: ExDjango.Session.Redis,
key: "sessionid"
To use Redis session you need a redis connection pool see https://github.com/whatyouhide/redix for more information.
Set user / get user_id ("_auth_user_id" from django session)
conn
|> ExDjango.Session.put_user(user)
conn
|> ExDjango.Session.get_user_id()
Django passwords
ExDjango.Pbkdf2.checkpw(password, user.password)
changeset
|> put_change(:password, ExDjango.Pbkdf2.hashpwsalt(changeset.params["plaintext_password"]))
|> repo.insert()