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
Dharmil
How is this related to django!
Not but i asked if any one has solution i can't ask ?? I m new so i dont know
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 ?
Michael
Are you sure it's Whitehouse? It could be whitenoise
Sorry it's whitenoise I made a mistake while type it
Michael
Whitenoise .storage .MissingFileError:
Bekhruz
Whitenoise .storage .MissingFileError:
http://whitenoise.evans.io/en/stable/django.html read this well, make sure your settings are configured as stated in this link.
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
Bekhruz
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
sorry your question is not clear. Django itself handles saving items to the database, you just have to write correct functions in your views.py file. Is your database setting configured properly?
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()
Michael
http://whitenoise.evans.io/en/stable/django.html read this well, make sure your settings are configured as stated in this link.
I did everything as stated but still getting the same error Let me write it out in full whitenoise.storage.MissingFileError: The file 'coinlarny/fron4/fonts/Flaticon.ttf' could not be found with <whitenoise.storage.compressedManifestStaticFilesStorahe object at 0x7f94b2352dd8
Salim
add another field Sold=models.BooleanField(default=False) and query according to that
10Qs. But Does users click sold button every time when they sold?
Xavier
10Qs. But Does users click sold button every time when they sold?
not necessarily if product_available <= 0 then sold= True
Bekhruz
I did everything as stated but still getting the same error Let me write it out in full whitenoise.storage.MissingFileError: The file 'coinlarny/fron4/fonts/Flaticon.ttf' could not be found with <whitenoise.storage.compressedManifestStaticFilesStorahe object at 0x7f94b2352dd8
Is Flaticon.ttf inside the "fonts" folder? Are you sure the path to that file (Flaticon.ttf) is correctly given (static tag used?)? Also try running py manage.py collectstatic manually.
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
Please
Root
Thanks you i see..and how will i get the key values when admin verified it
On download page keep a check that key contains a value which is equivalent to all admin verified key value
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
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
With many to many relation give relation/instance a unique key... And use the timedelta to cooldown store it in db
Can you point me to some resource regarding this or something that can gimme a better insight @TheCodeHealer #Healmycode
TheSingletonDev
Can you point me to some resource regarding this or something that can gimme a better insight @TheCodeHealer #Healmycode
I don't think there would be any specific resource as this is a very specified problem.. But i will look up.. If something comes up I will forward..
Kronos
With many to many relation give relation/instance a unique key... And use the timedelta to cooldown store it in db
Or can you provide a simple example code, which demonstrates how to do this. @TheCodeHealer
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..
TheSingletonDev
Sorry for wasting your time..
No problem.. You are not wasting my time.. I am wasting my life..
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
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
I hope you are doing OOP programing for this?
Yes. I am.. It' s django Models
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?
Doragonsureiyā
Hello new with Django can someone help me with a good book or tutorial to code with Django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
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..
Volvo
Yes.. Got it.. So when a relationship is generated between a specific user and a feature.. Give that relation a unique key and store it with the current time
Ok this is new thing Iearnt today will have to search it though. But can we do With two foreign keys In user/account model Active features Inactive features
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
Volvo
👍👍👍👍
kancharla
Ok bro
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?
Doragonsureiyā
Can anyone tell how to make live video stream app in django?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box write down the same words you asked here Step 4: Read the firsts results
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
this is from AbstractUser model at django/contrrib/auth/models.py
the user who just sign up already a active user
Masud
i just need to add him to AuthorProfile model as a reference when he sign up