(⌐■-■)
Hello all. I have a chat application and i have separate apps for messaging and notifications but to add the websocket_urlpatterns in asgi.py I am a bit confused.
application = ProtocolTypeRouter({
"http":get_asgi_application(),
"websocket":AuthMiddlewareStack(
URLRouter(
routes=rooms.routing.websocket_urlpatterns
)
)
})
How do i modify this to include my second app i.e. notifications app.
(⌐■-■)
शिवांजली
Where I can diploy my dynamic django website having sqlite database ?
(⌐■-■)
Arman
(⌐■-■)
vercel i guess. never used it tho. python anywhere also has some free package but not sure.
शिवांजली
शिवांजली
Not getting what is the problem
Nerd
I think for static files you need the collectstatic command
Rose
User Sanogo has 1/3 warnings; be careful!
Reason:
useless message (rule #3)
Rose
User Рита.А has 2/3 warnings; be careful!
Reason:
Speak English
(⌐■-■)
maybe try their help stuff
summit
Hello!
I'm using dango-rosetta to manage the translations. I have local file called "LOCALE" and inside I have another file for each language with .po and .mo files. How can I put this file in GCP bucket and make translations online?
pgirard
Shiny
Arman
Front-end too we can use django?
u can even use assembly - but there are areas and there are tools dedicated to them.... imho In nowadays we even don't use Django, instead drf
_untold_._mystery_
How to give page no in djago html print
Rose
User pgirard has 2/3 warnings; be careful!
Reason:
Read rule #10 to knoe where and how to publish job offers
Charly
Отабек
@admin.register(PS_Category)
class PS_CategoryAdmin(admin.ModelAdmin):
list_display=['title', 'price']
@admin.register(Other_Product)
class Other_ProductAdmin(admin.ModelAdmin):
list_display=['title', 'price']
@admin.register(Main_Panel)
class Main_PanelAdmin(admin.ModelAdmin):
list_display=['ordinal_number', 'progress']
change_list_template='admin/change_list.html'
Отабек
Manoj
✋ every one, I'm planning to learn django, but I'm scared to see about Devin AI. Should I learn or not?
Manoj
plz suggest me developer
_untold_._mystery_
How to give page no in djago html print
_untold_._mystery_
Give sample code
Charly
Charly
Sandeep
Hi, I have a running live django project, when I cloned it on local machine and tried to runserver, after collectstatic. It's not showing any static files. Any solution. I tried all solutions available on internet
Sandeep
Sandeep
And added absolute path to ot
Sandeep
It
summit
summit
Georg
hi! Is is possible to annotate field (as a subquery result) but not for SELECT, only for WHERE. So I don't need to SELECT the field but only to filter my queryset.
But if I print the query I see a subquery in the SELECT section and in the WHERE section the same
Georg
alias?
Georg
Oh yeah! Thanks))
Rose
User J. has 1/3 warnings; be careful!
Reason:
totally offtopic
Natalia
Hiii, has anyone created a drag and drop form builder in Django? 🤗🤔
Alison
@u_one23
is it running in daphne
Anonymous
How to send pdf or file In django channels
Krishna
py
Please gys help me,, I created customUser model and include AUTH_USER_MODEL = 'ase.CustomUser' in settings.py but it display the following error. Can't directly reference an abstract model so what shall I do ?
#Error
LookupError: App 'ase' doesn't have a 'CustomUser' model.
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'ase.CustomUser' that has not been installed
#1models.py
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class CustomUser(AbstractUser):#models.Model
email = models.EmailField( unique=True, null=True)
username = models.CharField( max_length=20,unique=True)
profile_photo = models.ImageField(null=True, default="avatar.svg" )
sex = models.CharField(max_length=10)
class Meta:
abstract = True
class Tutor(CustomUser):
experience = models.TextField(max_length=255)
self_description = models.TextField(max_length=255)
class Student(CustomUser):
pass
#2settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ase',
]
AUTH_USER_MODEL = 'ase.CustomUser'
Muhamad Nizar
Hi Everyone, is there any database connection pool that work well with Django ORM? For instance in Java spring we can use HikariCP
Mirco
Muhamad Nizar
Postgres
Postgres is a database, What I mean is the layer before database, for instance if the physical part we can use pgbouncer, and I want use connection pool library, if it possible?
Mirco
wlms
Hello, I have a url from my homepage that redirects to the product detail view, but I get this error whenever I run the server.
Reverse for 'product-detail' with arguments '('',)' not found. 1 pattern(s) tried: ['product/product/(?P<slug>[^/]+)$'].
Here is my the url:
<a href="{% url 'store:product-detail' product.slug %}">
Here is the url.py:
path('account/<slug>', product_detail_view, name='product-detail'
Mirco
Schroeder
Please can someone help me with a django dashboard?
wlms
Mirco
Rose
User Victor has 1/3 warnings; be careful!
Reason:
totally offtopic message
Shiny
Shiny
How will the UI look like while submitting word meanings?
Shiny
Because my dictionary has three scripts
Like this, I'm thinking about the font to be set default while submitting.
Shiny
Hmm I'm unable to upload screenshot 😕
Shiny
Maxim
AZAMAT 々
Is it correct?
<a href="{% provider_login_url 'google' %}?next=/">Login via google</a>
If yes, why I get an error like this:
"DoesNotExist at /
Site matching query does not exist.
error at line 17: <a href=" {% provider_login_url 'google' %} ?next=/">Login via google</a>"
Rose
User Shiny has 1/3 warnings; be careful!
Reason:
flooding for attention
Lucifer
Why won't the subtotal and total price change even though the console is safe and the code is safe? does anyone know the solution?
Amin
I have a form in the forms.py file and on my page when the user fills the form and the method is post, I fill the form class again, but I have an error here. I feel that the problem is in my inputs, should I modify init? what is your opinion?
Rose
User Amin has 1/3 warnings; be careful!
Reason:
Do not request DMs , help is provided in group
King David
Django .save () explain and types of method
عــمــر
A=Blog.objects.all()
A= A[:10]
Or
A = Blog.objects.all()[:10]
عــمــر
Which one is better?
Charly
Charly
David H
Which one is better?
Django queries are lazy, so they are not evaluated directly, so it's the same
pf
hi group. I'm wondering what is the go to alternative to jquery select2 in 2024 to work with django forms?
Anonymous
I can't access the verbose_name of a model that I passed to a template. What would be the correct way to obtain said data from the class?
Hussein
Hi can anyone tell me where and how I can learn django so fast...it seems the learning is taking forever