Yash
0xAllan
I am building an app with two types of users and want to enable a feature where one user type can see the profile info of the other user type and contact him/her.Any ideas on how I should go about this(I'm planning on using elastisearch as the frontend search engine and pusher for p2p chat)
S
Add one flag like "is_admin" and based on that you can identify that this user is able to make contact.
S
Use null filter (provided by Django backend filter) so can get list of those user.
0xAllan
where exactly should I place "is_admin" in the model class?
S
User model
S
Make it Boolean field and set default=false
Manik
0xAllan
Ok thanks, and is it a good idea to use a REST API to query and interact with the specific user?
Anonymous
Hello plz help me out ,
Can i use Inbuilt User model for my social web site where i don't want to create forms.py file , i want to use my html form for signup and login .
Muhammed Enes
hi I'm trying to publish my django application. nginx saw Media folder but not static folder
Muhammed Enes
pls help me
0xAllan
Anonymous
What is meaning of name parameter in path function in django???
Muflone
Anonymous
How
Muflone
in templates you use reverse('name')
Anonymous
How can it help
Muflone
to avoid to hardcode the paths
Muflone
<a href="{% reverse('home') %}">Go to home</a>
Ghorz
Ghorz
Raad
Hello guys, I have about 7 users for my project and I would like to get advice about how to add them in the database and how I would control the permissions
None
Raad
In production environment!!
None
Same way
Raad
My question is how I would add these types of users 8n the table, should I use is_housekeeper for example is a flag?
None
I don't think I got you properly but if you have database in prod env you just can create users via shell and add custom permission during creating new objects with users in the database.
Anonymous
https://pastebin.com/WQds260h
someone can help ?
i try use axios, but post empty
Anonymous
i print request.POST
Anonymous
i get <QueryDict: {}>
Anonymous
what is wrong ?
None
did you try curl?
Anonymous
not yet
Anonymous
curl better than axios ?
None
I didn't use axios
Mirco
None
I think your declaration of the request is wrong. Just try via curl
Anonymous
Anonymous
hi guys, i have a question for all of you ! if you want pass the course answer my question, HELPPPP
Now, i created digitalocean django 1.1.1.blah.blah on Ubuntu 18.04 droplet VPS Server.
Default python 2.7 ( i did change it to 3.6.8)
I deleted default django project and deployed my django project
changed nginx conf, gunicorn configuration, all configuration blah blah blah...
But i get disallowed host error .(Like 'You may need to add 'www.xxxxxx.com' to ALLOWED_HOSTS.')
No no no. do not tell me 'you must add servername to ALLOWED_HOST in setting.py". I did try over and over again.
Did you help me pleaseeee, thank you :)
Anonymous
curl is library javascript ?
None
Дмитрий
hi, can give me advice i have models city and street and caffee in caffee street and city are foreignkeys. What should i do in admin.py to choose streets only related to chose city?
None
Muhammed Enes
how can i change the django admin
None
Ghorz
chicoMTZ
How can I extended the permission table?
fieldBruce
a django website can be hosted with any provider?
fieldBruce
I know that python is not the best language for asynchronous code. How is that affect a django website?
Anonymous
Anonymous
Anonymous
<ul class="ulClassname">
{% for item in list %}
<li class="liClassname">{{item}}</li>
{% endfor %}
</ul>
Then in your CSS file you use the ulClassname and liClassname to style it
Ram
How do save images in db using blob?
Mirco
Ram
Then?
Mirco
Mirco
Use ImageField and go on
Yash
Hey i have profile database where have skills object and and second app i have post project modle where also have skill object so i want develop see only that project where having same skills so how i do it
Anonymous
Inside style.css file...
ul.ulClassname{
liststyle:none;
width:150px;
}
li.liClassname{
margin-top:10px;
font-size:16px;
Color:green;
}
Tommaso
Hi, what does it mean if I read in admin.py, as error underlined by VS studio code:
Unable to import 'import_export'
referred to the line
from import_export import resources
Mirco
Mirco
open a django shell, try to import it and see if everything goes well
if so, you have just misconfigured virtualenv detection into VSCode
Mirco
Mirco
point to it correctly and you won't see any underlined import
Mirco
what error do u have ?
Mirco
work into a virtualenv
Mirco
not at system level
Mirco
it's not related to Linux
you should always work in a virtualenv with python projects, to easily isolate per-project dependencies
Anonymous
It helps
Anonymous
Maintains pip packages
The Summer
If u wanna work on two different projects at a time
Anonymous
I'm curious. So if you want to continue working on Django on a different laptop/machine, how do you reuse the same packages?
Anonymous
I guess. But without a Pipfile or requirements.txt file, its difficult to work together really.