Dharmil
In the creation of form i give the action to form in the action i give my php file but when i click on the submit button it shows coding of the php file can't get the data into the database
Kronos
Michael
I'm trying to deploy my Django with heroku but I kept on getting this error (Whitehouse.storage.MissingFileError: )
Can anyone help me on how to fix this or suggest an easier option to deploy my project
Thank you
DamnSon
Has anyone used the Argon2id for password hashing ?
Bekhruz
Bekhruz
Michael
Whitenoise .storage .MissingFileError:
Salim
Hello guys. I am developing minisupermarket in and out product. I can't save out(sold) product from users in postgres it just display on url. Pls help me
Xavier
Anonymous
https://smokedebian1.blogspot.com/
Salim
Here is my views
def sell(request )
Item1=Inventory.objects.get(id=1)
item1q=item1.quantity
item1p=item1.price
If request.method=='POST'
If 'item' in request.POST
item=request.get['item']
quantity=request.POST['quantity']
price=request.POST['price']
while item:
if item==item1:
item1q-=quantity
item1p =price
item1.save()
Salim
Xavier
Salim
Bekhruz
Fitri
Hi everyone, I'm currently working on an inventory management system in IT laboratory that stores so many kind of tools and equipments. My question is what is the best way to create a model of the tools and equipment that have different attributes, such as PC's, DSLR Camera, CCTV hardware, software licenses, etc. It has approximately hundreds of different tools/equipments category.
Each the of the attributes need to be saved. Is it possible to use JSonField/HStoreField or are any other approach that could solve those problem.
Root
Root
Please
Kronos
I want to make a feature in Django.. where if a user uses it once , he has to wait for another 12 hours to use it again..how can i do this? := thanks
TheSingletonDev
Kronos
How to calculate (currenttime + 12 hours) , so that i can store that in db.. i am confused with the time module
Kronos
Kronos
I figured that out
Kronos
Now i have a different problem... There are multiple such features which require this kind of cooldown, so how do i store cooldowns of each feature per user without making a mess
Kronos
Each User is connected to this Feature Model with a ManytoMany Field
TheSingletonDev
With many to many relation give relation/instance a unique key... And use the timedelta to cooldown store it in db
₹
Hello.....i created a blog application. And it has news staff group who post the news articles with django admin. But problem is staff user who doesn't create post also can delete the post..so i want that who author create the post that have permission to delete and edit and other have permission to see the post....i want this functionality to add in django admin ....anyone have clue how to do this...plzz
Kronos
Kronos
Sorry for wasting your time..
TheSingletonDev
I defined a very generalised approach to take.. You have to adapt this idea and make modifications accordingly.. For me to work on it.. I would have to go through the complete end to end understanding of your code.. Which is not possible..
Kronos
Kronos
Kronos
Is there a way to have data which is specific to the manytomany relationship? i.e it stores information regarding the relation itself
Kronos
What i am trying to achieve is..
TheSingletonDev
TheSingletonDev
I hope you are doing OOP programing for this?
Kronos
If a user has a cooldown for a particular feature , it should't be on cooldown for everyone else AND a user can have cooldown for a feature doesn't mean that he can't use other features too.., so the cool down should be specific to the relation itself , Not the user or the feature.
Kronos
TheSingletonDev
saran
Hii.. Is it save to use sessions??
saran
Like passing a value to another view.
Anonymous
Hello new with Django can someone help me with a good book or tutorial to code with Django?
Anonymous
Thank you
Kronos
There are many resources on YouTube , But the best one you can follow is the official doc.
Kronos
Django doc is really good..
kancharla
Can any one help to know either the user has logged in or not
If user logged in I have to do something
If not I just have to redirect to login page
TheSingletonDev
Volvo
👍👍👍👍
TheSingletonDev
cj
kancharla
Ok bro
kancharla
Gokul Nath
How to highlight the searched words?
Gokul Nath
views.py: def search(request):
query = request.GET.get('user_search_input')
if query:
results = Post.objects.filter(Q(title__icontains=query) | Q(content__icontains=query))
else:
return HttpResponse("Access denied")
context={
'results' : results,
'search_word' : query
}
return render(request, 'blog/search.html', context)
Gokul Nath
i searched in stackoverflow but couldn't understand that
aashu
Can anyone tell how to make live video stream app in django?
Masud
https://hasteb.in/yolacilu.sql
Masud
can anyone view the problem and help me to solve the problem
Masud
new user who just sign up can not create new post
Ahmet
probably when you create from admin panel, you are checking is_active true
Masud
?
Ahmet
but at sign up form you are not activeting the user.
Ahmet
proper way to do it is sending an activation mail or you can make is_active true after user object created
Ahmet
search for activation mail on djangp
Ahmet
is_active = models.BooleanField(
_('active'),
default=True,
help_text=_(
'Designates whether this user should be treated as active. '
'Unselect this instead of deleting accounts.'
),
)
Ahmet
this is from AbstractUser model at django/contrrib/auth/models.py
Masud
Masud
i just need to add him to AuthorProfile model as a reference when he sign up