If your project involves user management where by some admins can create
custom users and grant them permissions I think it is better for you to use
Groups where by admins create a group e.g Librarian and then grant it
custom permissions and after that when admins create a new user he/she can
just
If you are using custom user, you can write methods which return booleans and
which can be seen by the template. I wrote aasmall utility method
is_member(groupname) which returns the boolean. I make liberal use of groups
which work very well for me. In my custom user I can easily add a method
Hi,
I would love to know more about the advantages / disadvantages of using
groups for permission management.
Currently my project uses Booleans for is_workspace_owner (True or False)
and consequently does not allow to show certain links via template
if-checks as well as some
Hi I want help creating an investment site with django; I want to know how
to make deposits and withdrawals for each client, to subscribe to a
specific package for a specific number, to bring in the daily profits for
each package,and add the bonus to the client, and how to use Skrill with
Follow up to my own message. I found a way of testing this that I think
everyone should look at:
$ ./manage.py shell
Python 3.8.5 (default, Jul 21 2020, 10:48:26)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
HI Olivier -
Django typically has separate settings files for each environment. You can
also use different environment variables to use when starting the app.
RE: models, here's an example of serialization that could be helpful to
show how to serialize/deserialize models with foreign keys
:
I have checkboxes in my css grid and there is name, type=chekbox", etc. In
may view django I have captured the value of the check template with
valor_xx = request.POST.get(str(xx)) # valor del check directamente
desde template
in POST method.
But, all of this in my view based in function.
Hello,
I have got two checkboxes in a Form on Django 3.1, with which everything
works fine, but unchecking them.
I use a class derived from UpdateView and in its post() method I check
for if my form has changed. This works fine for an initial empty form
and checking form.has_changed(); after
8 matches
Mail list logo