Manoj
Guys how to add backend without using template for e-commerce site
Careful
Donna
Lena
django.db.utils.OperationalError: table "accounts_profile" already exists
Lena
cant find any solution on this error after delete the migration files
Lena
I removed the database and ran python manage.py runserver again.
𝙰𝚜𝚑𝚠𝚒𝚗
Lena
yes i did still the same error
Lena
yes
Anonymous
Hello, everyone.
I need help regarding the django cron
If anyone is familiar with it, Pls let me know
setting.py file
CRON_CLASSES = [
'apps.utils.cron.add_team_quota_cron',
]
apps/utils/cron.py
class add_team_quota_cron(CronJobBase):
schedule = Schedule(run_every_mins=1)
# schedule = Schedule(run_at_times=['00:00'], monthly=1)
code = 'add_team_quota' # a unique code
def do(self):
teams = Team.objects.filter(subscription_status=SubscriptionStatus.ACTIVE.value)
for team in teams:
create_team_quota(team, team.subscription_plan.id)
when I run "python manage.py runcrons", cron job works only once...
I think, the cron job doesn't work every minute
Vikash
Fitzgerald
hello every one . i can't set a password for the creation of a user in my django project , what may be the cause ??
Fitzgerald
i mean that the console blog each time want to configure a password for the super user
Careful
How do you proceed?
Fitzgerald
How do you proceed?
the issue is that when creating a super user, on arriving on the password prompt the console block suddenly. i did some researches and came about that it may be due to the hashing algorithm in the django setting but am not sure and the problem still persist
Careful
is there any error message ?
Careful
are you using a custom authentication backend ?
Jan
Fitzgerald
Obaida Aljarjary
Hey guys
My project structure like this:
djrest/
        api/
        djrest/
        products/
And i have a model in products.models called Product
I wanna import the model in api.views
But i get this error:
    from ..products.models import Product
ImportError: attempted relative import beyond top-level package
And if i change it to:
from djrest.products.models import Product
I get :
ModuleNotFoundError: no module named 'djrest.products'
any solution guys?
Adi
Maya
Can anyone share a link to a Github repository with a good example of a Django project, preferably with user authentication implementation?
ㅤㅤㅤㅤ𝗹𝗼𝗿𝗱ㅤㅤㅤㅤㅤ
Obaida Aljarjary
乙乇刀尺Ծ刀
Is there any free course available for a beginner??
AISHWARYA
https://bin.kv2.dev/~64907248e599576ea02cc70d
AISHWARYA
can some one help me to solve this error
AISHWARYA
in django
𝐒𝐨𝐛𝐡𝐚𝐧
Hi everyone I want to start learn django how can i start?
Wh04m1SU
Hello i need help in django
Wh04m1SU
Whit formsets
Влад
Hello everybody, need help. I got such mistake "Could not find backend 'django.core.cache.backends.redis.RedisCache". Redis installed on ubuntu, django-redis installed in project, cache i wrote in settings. What should i do?
Илья
Влад
Django==3.2.12
Илья
Django==3.2.12
mb set this
"BACKEND": "django_redis.cache.RedisCache",
as i understand you use django redis which is accepted only from version 4
Влад
my settings: CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': 'redis://127.0.0.1:6379',
'OPTIONS': {
'CLIENT_CLASS': 'django.redis.client.DefaultClient'
},
'KEY_PREFIX': 'geekshop'
}
}
Илья
Влад
Илья
Vijay
views.py: from django.shortcuts import render
from .forms import StudentRegistration
# Create your views here.
class showformdata(request):
fm = StudentRegistration()
return render(request, 'enroll/userregistration.html', {'form':fm})
here i am getitng a syntaxError again and again the error is "return" outside function
Илья
Vijay
can somebody tell why i am getting this error
Maxim
Maxim
Илья
Vijay
thanks for telling me
Влад
stupid, but it works
Влад
Carlos
Hello, I have a billing and inventory SaaS platform and I want to add an online catalog for each tenant. I'm considering implementing it using subdomains, where customers of each tenant can view products in their respective catalogs. Could you provide any guidance on how I can securely and efficiently implement this?
R3fr4kt
Hello everyone!
Does anybody know where can i find more information about how to do unitary tests?
𝔸𝟙𝕕𝕪𝕟
I used JWT authentication method and for users it gives access tokens however when I try to get token for admin it says no account found with this credentials. Can someone faced similar problem?
Arsalan
Hey Everybody
how are you?
I Have a question about Django Rest Framework my question is now i have a project and two model that have a ManyToMany RelationShip together so I can create that in the restapi but I don't know when I send the data for this what should I send to Handle ManyToMany RelationShip here?
Arsalan
Erkaboy
Tamerlan
hello
`class Question(models.Model):
question_title = models.CharField(verbose_name='question', max_length=255)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
stage=models.ForeignKey('app.Stage', related_name = 'questions', on_delete=models.CASCADE)
question_dependens_on_answer = models.ForeignKey('app.Answer', related_name = 'questions', blank=True,null=True, on_delete=models.CASCADE)
question_type = models.CharField(max_length=50, blank=True, null=True)
class Meta:
verbose_name = 'Question'
verbose_name_plural = 'Questions'`
when i write qu = Question.objects.select_related('question_dependens_on_answer').all() this query django do LEFT OUTHER JOIN why?
Tamerlan
why doesn't inner join
Arsalan
부산
can anyone who has been used render.com to host its Djago application on there? My images in the project has not being diplayed in there
Muflone
부산
Muflone
How?
부산
Илья
UCHIHA
Suren
Hello! I have a list of products in the category and my pagination is working.
When in the template I use tours.count - it gives me a total product number of that page. How can I count all products from all pages.
Suren
Let's say I have a total of 20 products - so that it says me
Total: 20
instead of Total: 5 which it founded on 1 page which I look at