These are chat archives for django/django

31st
Jul 2018
Luke-VideoLibre
@LukeVideo
Jul 31 2018 07:22
i'm adding a unique field to a model. Is there a way during the make migration to make the existing object just use a incrementing placeholder.
Luke-VideoLibre
@LukeVideo
Jul 31 2018 08:48
Ok so i did an empty migration and added a function that turns PK into name for migration purpose.
Now i want to add a save() method to add the pk as name if the name field is left empty. What would that value be "None"?
Luke-VideoLibre
@LukeVideo
Jul 31 2018 15:10
Me again. Is there a way to determine if a user can add user. The user has to be staff but doesn't have the right to add user by default. Is there an easy way to determine this in a template like {% if request.user.can_add_user %} ?
Diego Castro
@diegocastrum
Jul 31 2018 19:06
I try to find a solution, but I think that I need to write an new widget to solve this, Ideas are welcome!
image.png
dev0257
@Shubham0257
Jul 31 2018 22:12
Django How to let a user to enter or Simply Post as Much as Values can in a single Field (Allowing user to enter multiple choices )