was away from django development for close to a decade, decided to jump in for a smallish project. don’t wanna use my preferred IDE from way back when (pycharm) and am trying to use vscodium.
with the standard python and django extensions, the autocompletion/suggestion is… uh, lacking. what else do I need? a search in the marketplace nets tons of suggestions, don’t know which are superfluous, overlapping, deprecated…
was away from django development for close to a decade, decided to jump in for a smallish project. don’t wanna use my preferred IDE from way back when (pycharm) and am trying to use vscodium.
with the standard python and django extensions, the autocompletion/suggestion is… uh, lacking. what else do I need? a search in the marketplace nets tons of suggestions, don’t know which are superfluous, overlapping, deprecated…
Django VTasks is a faster and asyncio-friendly django.tasks extension supporting ORM and valkey/redis backends. Scheduler, unique, batch, and prioritize tasks embedded in your ASGI app or as a standalone worker.
4x faster than celery. I made this because I wanted a more ergonomic and faster task framework for GlitchTip.
Django VTasks is a faster and asyncio-friendly django.tasks extension supporting ORM and valkey/redis backends. Scheduler, unique, batch, and prioritize tasks embedded in your ASGI app or as a standalone worker.
4x faster than celery. I made this because I wanted a more ergonomic and faster task framework for GlitchTip.
Announcing a project I’ve been working on. django-vcache is an asyncio-friendly and fast Django cache backend for Valkey/Redis. Uses the Rust redis crate and a Python bridge to achieve high performance. Let me know what questions you have about it.
Announcing a project I’ve been working on. django-vcache is an asyncio-friendly and fast Django cache backend for Valkey/Redis. Uses the Rust redis crate and a Python bridge to achieve high performance. Let me know what questions you have about it.
I build my own UserModel with email instead of username and now the PasswordResetConfirmView does not render the form for setting a new password. Form is None and Title “Password reset unsuccessful”. All other forms are working correct.
I am using the standard “django.contrib.auth”.
My user-class:
class MyUser(AbstractUser):
username=None
email=models.EmailField(_('email address'),unique=True)
USERNAME_FIELD='email'
REQUIRED_FIELDS=[]
My urls.py
from django.urls import path, include
from django.contrib.auth import views as auth_views
urlpatterns = [
path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password_reset.html', html_email_template_name='password_reset_email.html'), name='password_reset'),
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
path('password_reset/confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'),name='password_reset_confirm'),
path('password_reset/complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'),name='password_reset_complete'),
]
The reset link in console looks a bit wired:
Please go to the following page and choose a new password:
http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/d4khhw-79d3d64161aaf=
78fe9f0542f1883e48c/
Also, there is no redirect to:
http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/set-password/
I tried clicking the link, copying it. Nothing works. What am I missing here. Some tips would be appreciated.
Hi,
I build my own UserModel with email instead of username and now the PasswordResetConfirmView does not render the form for setting a new password. Form is None and Title “Password reset unsuccessful”. All other forms are working correct.
I am using the standard “django.contrib.auth”.
My user-class:
class MyUser(AbstractUser):
username=None
email=models.EmailField(_('email address'),unique=True)
USERNAME_FIELD='email'
REQUIRED_FIELDS=[]
My urls.py
from django.urls import path, include
from django.contrib.auth import views as auth_views
urlpatterns = [
path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password_reset.html', html_email_template_name='password_reset_email.html'), name='password_reset'),
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
path('password_reset/confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'),name='password_reset_confirm'),
path('password_reset/complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'),name='password_reset_complete'),
]
The reset link in console looks a bit wired:
Please go to the following page and choose a new password:
http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/d4khhw-79d3d64161aaf=
78fe9f0542f1883e48c/
Also, there is no redirect to:
http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/set-password/
I tried clicking the link, copying it. Nothing works. What am I missing here. Some tips would be appreciated.
In a general push for removing Microsoft, Google and any US or other non-EU dependency, the French government has been rapidly creating an open source set of productivity tools called “LaSuite”, in collaboration with the Netherlands & Germany.
LaSuite is allegedly being developed using Django.
In a general push for removing Microsoft, Google and any US or other non-EU dependency, the French government has been rapidly creating an open source set of productivity tools called “LaSuite”, in collaboration with the Netherlands & Germany.
LaSuite is allegedly being developed using Django.
i’m completely new to the django eco system, coming from flask.
what i want (and don’t know how to accomplish) is to put some restrictions to a set of urls: x/<uuid>/imagesx/<uuid>/imageupload and others should only work, if uuid can be found in the database and is still valid.
in flask i would probably use a blueprint, but this concept does not seem to exist in django, right?
what i like about the blueprint concept is, that it’s not possible to add a url under the x/<uuid> “namespace” and forgetting about the auth mechanism, as this is handled for all urls in the blueprint.
how would you handle this in django?
i’ve already learned about apps and a custom middleware, but this looks quite complicated on first sight? as the middleware always intercepts all requests, and i would have to check on my own if this is a request to x/<uuid>?
i’ve also looked at existing apps, and django-rq uses the statt_member_required decorator for each view. i will probably build something like that, but i would be more confident if i could apply this to the whole app, instead of having to decorate each function.
i’m completely new to the django eco system, coming from flask.
what i want (and don’t know how to accomplish) is to put some restrictions to a set of urls: x/<uuid>/imagesx/<uuid>/imageupload and others should only work, if uuid can be found in the database and is still valid.
in flask i would probably use a blueprint, but this concept does not seem to exist in django, right?
what i like about the blueprint concept is, that it’s not possible to add a url under the x/<uuid> “namespace” and forgetting about the auth mechanism, as this is handled for all urls in the blueprint.
how would you handle this in django?
i’ve already learned about apps and a custom middleware, but this looks quite complicated on first sight? as the middleware always intercepts all requests, and i would have to check on my own if this is a request to x/<uuid>?
i’ve also looked at existing apps, and django-rq uses the statt_member_required decorator for each view. i will probably build something like that, but i would be more confident if i could apply this to the whole app, instead of having to decorate each function.
For those who have been following or been involved with recent development of Ninja, you’ll notice that for about a year, almost all development has come to a halt. About 50 PRs have built up on the GitHub repository, many of which fix crucial issues, but are not getting any feedback and have no path forward to getting them merged. PRs that fix documentation will get merged in a day, but most PRs that touch code are left out to dry. Among these PRs include performance improvements, the validation vs. serialization split, my own fix for aliases, and much more. It’s getting desperate enough that people are posting monkeypatches in the PRs.
I have spoken with Ninja’s maintainer a bit about the issue and I think it’s mostly just a split in priorities between him and myself. That’s totally reasonable and respectable, its his project. But as a user of the library, I can’t really say that I feel supported by this direction, and I would assume from the many repeated requests for review from the PR submitters that most in the community aren’t too happy either. Most of these existing issues aren’t complete showstoppers, but they are annoying and frustrating to work with, especially if you are using the library at scale.
So I’m forking the library under the new name, Django Shinobi, here. github.com/pmdevita/django-shinobi. I plan to lead the library for the longterm future as my job currently depends on it. Docs are sort of up but still need the workflow ironed out, and PyPI will be up later.
There aren’t any current plans to hard fork. Ninja does still get some minor changes here and there, and I plan to pull them downstream when possible. We may drift from full compatibility over time, especially as some of the larger scale changes are made, but that will be gradual. I’m not looking to separate from Ninja as much as provide some kind of solution for its current problems.
Of course, my end goal is to merge this project back upstream with Ninja. I believe Ninja still has the same end goals as we do, so it really makes the most sense to have one library. But, I think it’s clear that one library isn’t working right now, and a fork is necessary if we want to see things get fixed.
For now, if you have any PRs currently to Ninja that you want merged, or wanted to open any PRs but were discouraged from doing so, please open a PR to Shinobi! I’m also going to be starting another discussion for the project’s roadmap so jump in there if you’d like to add your interest for a feature or fix, or suggest another.
I’d like to also recruit a few more core maintainers to help get eyes on things and make decisions, so reach out if that’s something your interested in.
For those who have been following or been involved with recent development of Ninja, you’ll notice that for about a year, almost all development has come to a halt. About 50 PRs have built up on the GitHub repository, many of which fix crucial issues, but are not getting any feedback and have no path forward to getting them merged. PRs that fix documentation will get merged in a day, but most PRs that touch code are left out to dry. Among these PRs include performance improvements, the validation vs. serialization split, my own fix for aliases, and much more. It’s getting desperate enough that people are posting monkeypatches in the PRs.
I have spoken with Ninja’s maintainer a bit about the issue and I think it’s mostly just a split in priorities between him and myself. That’s totally reasonable and respectable, its his project. But as a user of the library, I can’t really say that I feel supported by this direction, and I would assume from the many repeated requests for review from the PR submitters that most in the community aren’t too happy either. Most of these existing issues aren’t complete showstoppers, but they are annoying and frustrating to work with, especially if you are using the library at scale.
So I’m forking the library under the new name, Django Shinobi, here. github.com/pmdevita/django-shinobi. I plan to lead the library for the longterm future as my job currently depends on it. Docs are sort of up but still need the workflow ironed out, and PyPI will be up later.
There aren’t any current plans to hard fork. Ninja does still get some minor changes here and there, and I plan to pull them downstream when possible. We may drift from full compatibility over time, especially as some of the larger scale changes are made, but that will be gradual. I’m not looking to separate from Ninja as much as provide some kind of solution for its current problems.
Of course, my end goal is to merge this project back upstream with Ninja. I believe Ninja still has the same end goals as we do, so it really makes the most sense to have one library. But, I think it’s clear that one library isn’t working right now, and a fork is necessary if we want to see things get fixed.
For now, if you have any PRs currently to Ninja that you want merged, or wanted to open any PRs but were discouraged from doing so, please open a PR to Shinobi! I’m also going to be starting another discussion for the project’s roadmap so jump in there if you’d like to add your interest for a feature or fix, or suggest another.
I’d like to also recruit a few more core maintainers to help get eyes on things and make decisions, so reach out if that’s something your interested in.