Kori
Hey there. I have a non technical question Django related
Mirco
I have to generate custom permission class for each instance of auth.models.User, I guess
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-permissions Here you can see how to create custom permissions
Kori
Is there anyone who does both django development and data science. I'm a student and I find the two areas interesting. Is there a way to do both or will it be too tiresome?
Anonymous
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-permissions Here you can see how to create custom permissions
Yeah, I saw it, but I won't be able to declare there custom permission classes for all users
Anonymous
Is there anyone who does both django development and data science. I'm a student and I find the two areas interesting. Is there a way to do both or will it be too tiresome?
I could assume that data scientist might me profficient with python, so he could get a grasp on Django so that he could build a static website for himself maybe, but professionally: not so sure
Anonymous
At least i have never seen or heard about a person who does data science and web development)
Anonymous
I don't think there is a point to study both, it would be better to concentrate on one field and become a better specialist there
Anonymous
Just my piece of mind)
Anonymous
https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html
Anonymous
Seems like my case, gonna read it!
Mirco
Yeah, I saw it, but I won't be able to declare there custom permission classes for all users
And what about putting users into groups and give groups permissions ?
Mirco
Kori
I've done a lot of django and I was thinking of exploring other options just to see what's out there.
Anonymous
And what about putting users into groups and give groups permissions ?
Well, then one group would have only one user so it would be kinda pointless, I guess
Anonymous
Why only one ?
Well, because only one user can view instances owned by him)
Mirco
Anonymous
Welp, this article doesn't have what I need
Anonymous
Strange, this pattern must be a common one
Anonymous
Maybe I just cant google
inchidi
Well, because only one user can view instances owned by him)
in this case, when you filtering data model, for example Book, you do Book.objects.filter(owner=self.request.user) so user can only see book owned by itself. is that what you looking for?
Jimmies San
uwsgi sometime writes uploaded file with perm 600, sometime with 666 i don't understand why running as user with this options chmod-socket = 664 umask = 113
Carlos Jesús
Hi, I would like to start using django, what is the recommended env setup to start using the framework?
Carlos Jesús
Im using Ubuntu 18.04 and when I try to install packages and dependecies some of them always fail to install.
inchidi
Jimmies San
Jimmies San
i'm digging the docs now...
Carlos Jesús
I installed python3 but my problems start when I want to install pip and use the right version
inchidi
yep, umask for files written by uwsgi... for what I understood
hmm i never use that config (umask) what perm file used from the default (not set)?
Jimmies San
hmm i never use that config (umask) what perm file used from the default (not set)?
sometime 666 sometime 600, when 600 nginx throw error 'cause can't read the uploaded file
inchidi
I installed python3 but my problems start when I want to install pip and use the right version
i think simplest way to install pip is using get-pip.py https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
inchidi
sometime 666 sometime 600, when 600 nginx throw error 'cause can't read the uploaded file
hmm i never get this issue. you didnt run your uwsgi with sudo right?
Jimmies San
no! i'm not a fool :D no sudo, no root: as user in his env and app :)
inchidi
lol then sorry that was my best prediction
Jimmies San
yes i know, i seearched too in that direction ... well.. i will update here if i solve :D
Jimmies San
solved with FILE_UPLOAD_PERMISSIONS = 0o644 inside the settings
the dark
can any one help in my project
the dark
i want how can i make session for teacher and student login in my project
the dark
can send me a simple code that use session
None
can send me a simple code that use session
Object request has the attribute - session, you can google how to set session value or read documentation.
the dark
ok i all trying
None
ok i all trying
request.session['idempresa'] = profile.idempresa
None
Where list value is your custom value
None
request.session[“custom”]=“custom” your session(cookies) will live in 2 weeks on the default
None
Yes ...
Can you formulate a question ?
Vaibhav
I want to make a photo story just like instagram and whatsap stories in my website using django
None
I want to make a photo story just like instagram and whatsap stories in my website using django
Okay, You can create such service but how do you plan handle stories? You need a phone application and REST api service on your backend
None
Does anybody want to practice a django skills in a aggregator service?
Mirco
Yes ...
Good, so in addition to what @truemajor told you, I suggests you to study async tasks and Cron jobs with Django 'cause imho you'll need these ones
Mirco
Hey, that might work! Thank you!
It was simpler than I've understood Sorry man it was Saturday 😂
ibrahim süren
hello, I have a model includes 2 foreignkey. I want to delete any row with rest api's DestroyModelMixin, but i must use 2 lookup_field. For example delete row follower=1 and community=2 How can i use 2 lookup_fiels?
ibrahim süren
so i will send 2. parameter with kwargs?
Anonymous
the flow is your api view class get intance from get_object() then that intance deleted at perform_destroy()
Anonymous
if you want your view receive 2 param from url, then you should override get_object() too
Anonymous
you can try share how you want your url looks like, i think it will be easier for the next step
Mirco
Josuke good man 💪 it was easier lol 😂
None
Can anybody give a tutorial with celery ?
Mirco
Can anybody give a tutorial with celery ?
http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
Mirco
Thx
Yw 😀
Adonis
Saludos
Rajjix
hey guys
Rajjix
I’m fairly new to django
Rajjix
Is it hard to to turn a casual django website to have an api with all it’s applications , logging posting etc...
Rajjix
No
Is it a bad idea for a beginner to build a casual website and add the api later after the website is fully functional?