Manoj
Guys how to add backend without using template for e-commerce site
Careful
Shiv kumar
I need some resources to learn AJAX crud functionality
Look for htmx, its so easy comparison to ajax. Visit here to know more- https://htmx.org/ And here docs- https://htmx.org/docs/
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.
𝙰𝚜𝚑𝚠𝚒𝚗
I removed the database and ran python manage.py runserver again.
python manage.py makemigrations python manage.py migrate
Lena
yes i did still the same error
𝙰𝚜𝚑𝚠𝚒𝚗
yes i did still the same error
Hm that's weird, are you sure you deleted the database?
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
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 ?
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?
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
Никита
https://bin.kv2.dev/~64907248e599576ea02cc70d
91 line what id variable store? And there is no framer_id atr in your model
𝐒𝐨𝐛𝐡𝐚𝐧
Hi everyone I want to start learn django how can i start?
Wh04m1SU
Hello i need help in django
Wh04m1SU
Whit formsets
Doragonsureiyā
Hello i need help in django
No one can help you until you explain your difficulties.
Doragonsureiyā
Hi everyone I want to start learn django how can i start?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Dilara
Hi everyone I want to start learn django how can i start?
Hello, you should read django's documentation and most importantly apply them yourself
Влад
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' } }
Илья
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' } }
CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "OPTIONS": { "CLIENT_CLASS": "django_redis.client.DefaultClient", } } } something like this
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
Влад
django-redis installed correctly?
Requirement already satisfied: django-redis in ./venv/lib/python3.10/site-packages (5.3.0)
Влад
django-redis installed correctly?
Requirement already satisfied: redis!=4.0.0,!=4.0.1,>=3 in ./venv/lib/python3.10/site-packages (from django-redis) (4.5.5)
Vijay
please study Python first
i didn't notice that i creating a class not a function
Vijay
thanks for telling me
Влад
@kataklizm88 look at this
thanks man, its working) i change ' into " in all settings and it works
Влад
stupid, but it works
Илья
thanks man, its working) i change ' into " in all settings and it works
👍 Its just because django use 'django.core.cache.backends.redis.RedisCache' from version 4. Up to version 4, django-redis is used. You probably opened the documentation for the 4th version and copied the settings from there.
Влад
👍 Its just because django use 'django.core.cache.backends.redis.RedisCache' from version 4. Up to version 4, django-redis is used. You probably opened the documentation for the 4th version and copied the settings from there.
You are right! The first i change the settings like yours, but it didnt work. Then a copy whole your settings, and it works. The difference was in apostrophe. I changed ' into ", and 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?
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
Just like this. [1,2,3] Here 1 2 3 are id.
Sod It does not work for me when i send a list for that it know that as a string
Arsalan
Just like this. [1,2,3] Here 1 2 3 are id.
it work for me when I send one id
부산
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
How?
부산
How?
try to learn render
Tamerlan
because this field is nullable
Yess i find this answer thanks
Tamerlan
Yess i find this answer thanks
But i have a quetsions that they have answers but in query some questions is none
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