inchidi
Arnak
Arnak
class Isstaff(permissions.BasePermission):
def has_permission(self, request, view):
print(request.user.username)
return request.user.groups.filter(name='API')
nothing print
inchidi
Arnak
no
Arnak
only response 200 OK
Arnak
Django Bot
>> Links
- How to Generate A Free Wildcard SSL Certificate with Let’s Encrypt for Your
Luis
Guys, i have a question, can you recommend to me a good django-based ERP?
Pepeluqui
A good ide for developing?
Anonymous
Django Bot
>> Links
- Hosting Static Files - Guide to using Django with Zappa
Spear
Guys how do you serve static files in django2 ?
Anonymous
Anonymous
Use it
Anonymous
https:// docs.djangoproject.com/en/2.0/howto/static-files/
Spear
have included following in my main project's urls.py :
from django.contrib.staticfiles.url import staticfiles_urlpatterns
then have appended the urlpatterns list with staticfiles_urlpatterns()
in main project's settings .py i have
STATIC_URL = "/static/"
STATICFILES_DIR = (os.path.join(BASE_DIR,"assets"))
assets = the name of the folder where all static files are stored
finally in my common layout.html file i have :
<link rel="stylesheet" href="/static/background.css">
Spear
Spear
i am surely doing something wrong ...but exactly what , am not able to figure out
Anonymous
Do you have django.contrib.staticfiles in the installed apps?
Spear
yup
Anonymous
And you should use statics files like
{% load static %} <img src="{% static "my_app/example.jpg" %}" alt="My image"/>
Anonymous
Spear
Anonymous
Jimmies San
guys... a complete docker compose dev env [django + postgres + mailhog] ready-to-go
feedback are appreciated :)
https://github.com/gionniboy/djangazzo
Jimmies San
docker-compose up —build
Jimmies San
and you're ready to go, with zero ops overhead and start to code.
Luis
Jimmies San
ahahahaha :D
if this is only the problem you found i'm happy. thanks btw :)
Jimmies San
i'm not english. sorry =)
Jimmies San
Luis
Docker is love, docker is life
Luis
Hahahaha
Abhi
Luis
José Luis:
Guys, i have a question, can you recommend to me a good django-based ERP?
inchidi
inchidi
its mezzanine lol sorry
Luis
but mezzanine is a CMS, isn't it?
inchidi
Luis
I recommend wagtail
Jimmies San
i like odoo as erp. yes is python but not django :/
Mi
Luis
CMS
Mi
👍
Mi
Is it headless?
Luis
what?
Mi
Headless
Mi
I mean
Mi
If it provides a rest API
Django Bot
>> Links
- Django bootstrap project
Chetan
How can i make my requests HTTPS in Django?
Is it something internal of Django ?
I am using Django with Angular 4.
Django Bot
>> Blogs
- QuerySet Filters on Many-to-many Relations
>> Links
- QuerySet Filters on Many-to-many Relations
Anonymous
Anonymous
It receives them
Anonymous
If you want to make outgoing requests. Use requests module
Chetan
Okay. For HTTPS i have to configure the server right? Ngnix or apache with uswgi?
inchidi
Chetan
Okay, can you point me a tutorial to serve django with apache. I am having trouble finidng any relevant
inchidi
how about this one?
Chetan
Let me check.
DragonMachine
DragonMachine
Mouleswaran
I want sample django project other than blog site..any help?
inchidi
Mouleswaran
Basic form connected with db that submits could trigger some shell script
Abhi
Hey guys..
I wanted to know whether there are resources which provide tips on best django practices
Abhi
Also i want a cheat sheet for django 2
inchidi
inchidi
Mouleswaran
Spear
Guys need help !, i will be looking for django based jobs ...hence can someone throw some light on what kind of work do companies do using django ?
Anonymous
Anonymous