Girish
How exactly do want to be helped?😊
I want to create 2 tables which consists 2 user where One user books a table and other user for Restaurant owners to manage the bookings. But I don't want to use admin user. I'm a beginner, it would help if you explain in detail or refer me something.
José
i think that is almost what you need.
Girish
Thankyou
Anonymous
def fetch_data(request): if request.method == 'POST': form = SlipInputForm(request.POST) if form.is_valid(): form.save(commit=True) return redirect('slip-index') please help me i am unable to validate the form data it works well untill POST validation but after that I am unable to validate the data and save to database
Anonymous
if request.method == 'POST': until this
R
Class slipInputForm(forms.ModelForm)
Anonymous
https://pastebin.pl/view/ed3685b4 here is link for form
Anonymous
Class slipInputForm(forms.ModelForm)
That I've done import is like this From django.forms import ModelForm
Anonymous
here is link for full models.py https://pastebin.pl/view/43b08fc6
Shreehari
#NeedHelp I have a user table and a trial table How can i get the list of users who have not created a single object in trial table.
R
here is link for full models.py https://pastebin.pl/view/43b08fc6
form = GeeksForm(request.POST or None, request.FILES or None) You need to check for files also
Sunny
#NeedHelp Hello, I have one requirement to add reminders into the application, I am using Django-background-task to implement it. Things were going fine but now requirement is to implement reminder for two days or three days in every week.
Place
hello everyone, while building my app (django-admin) , i got this error : admin | <class '{}'.admin.Author Admin'>: (admin.E130) _name_ attributes of actions defined in <class '{}.admin.Author Admin'> must be unique. (in the {} is the name of my project) ! so they asking me to do inheritance, but i was here to ask if inheritance is something we "had" to do in the admin.py for each class ? (to follow the norms) or what is exactly the problem
Place
because actually i was doing a admin.ModelAdmin in every class but it seems to not please to django (even if the project was working perfectly in my local)
Sunny
Use Celery ( with celery beat ) or Django Q Otherwise the classic cron
Thanks for your response man i will look into it 😊
Doragonsureiyā
Place
Inheritance has no guilt, it's perfect to inherit from ModelAdmin
but when i make inheritance, i got all the list_display on my 2nd classAdmin who is inherited but i don't want it, even if i defined it everytime they only took the one inherited
Doragonsureiyā
Okay Thank you
You're welcome! 😊
~Ronnie
Hello there everyone. I hope you're all fairing on well. I'm new to Django. I'm doing my first project and I'm kind of stuck I want to make my Postgresql database live without connecting it to AWS. I have done research and I have established that one can use Heroku Postgresql dj-database url. Anyone who can give a good resource that I can use to understand it very well?
Nirupam
Django.db.utils.programmingError:('4200').Either the parameter @objectname is ambiguous orr the claimed @objtype(column) is wrong
~Ronnie
Okay I get it it's more efficient to use AWS for everything. But I just want to use the free Heroku Postgresql 😂😂
Nirupam
I am getting the bug when m trying to modify the fields in model.and while doing migrate i am getting this issue
Nirupam
I am getting the bug when m trying to modify the fields in model.and while doing migrate i am getting this issue
Django.db.utils.programmingError:('4200').Either the parameter @objectname is ambiguous orr the claimed @objtype(column) is wrong
Nirupam
Guys, any idea, how to resolve.i tried everything from deleting migration file to pycache..nothing worked ut
Nirupam
There is no same column no ambiguous
Nirupam
Sending pic is allowed in the group chat ?? I wish i could send
Doragonsureiyā
Sending pic is allowed in the group chat ?? I wish i could send
Read the rules before any activity: @PythonRules
Doragonsureiyā
Sending pic is allowed in the group chat ?? I wish i could send
To share code or error tracebacks, be considerate and use an online pasting service - here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you post a wall of text message (many lines), delete it quick or you may get a warn strike.
Nirupam
Ok Thanks
Bhashkar
Hey anyone can help ROLE_CHOICES = [ (STUDENT, 'students'), (TEACHER, 'teacher'), (SECRETARY, 'secretary'), (SUPERVISOR,'supervisor'), (ADMIN, 'admin'), ] As i am using choices for model field so we need to create master table for these choices or we can use from here?
Mirco
!search
Doragonsureiyā
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 first results
Mirco
It exists to help who is blocked with bugs, errors and after he/she has spent some time to look for the issue by him/herself before dropping here
Mirco
Because your answer is too much generic and a search engine can answer you better then us
Mirco
It's the same
Mirco
For Django is famous select2
Mirco
Try to type in Google django autocomplete search You will find n-thousands articles with the answer
ThunderCore Community
How to write ORM query for Select * from employee Please help me
ThunderCore Community
How to select records, name start from A letter
Mirco
How to select records, name start from A letter
Studying the documentation is hard ?
Mirco
The ORM has values() to select some columns only
ThunderCore Community
No OK thanks
Doragonsureiyā
No OK thanks
You're welcome! 😊
Akash
Are there any free alternatives of S3 ? I have to save/retrieve PDFs inside my application.
Mirco
js is your friend in that scenario
King Phyte 🐍
Is there a way to make django evaluate template tags from normal text/string? Eg: The string here says {% lorem 2 w random %} Output (on rendering): The string here says lorem ipsum
Anonymous
ah wait, i don't think that is what you want
King Phyte 🐍
ah wait, i don't think that is what you want
Yes I want to be able to evaluate template tags in strings instead
Anonymous
Yes I want to be able to evaluate template tags in strings instead
perhaps this will lead you there, found this little snippet in the docs. from django.template import engines django_engine = engines['django'] template = django_engine.from_string("Hello {{ name }}!")
Anonymous
i guess then you can use that template object and then work with it
King Phyte 🐍
Lemme try it
King Phyte 🐍
Close but not necessarily what I'm looking for
Anonymous
That should be enough information for you to go about digging i reckon
Akash
Nah every cloud storage has a cost
How about Using Google drive API to fetch/store files ?
King Phyte 🐍
Akash
Google is not free
Ohh I didn't noticed those api are not free
Mirco
W
Hi guys, How r u all with last days of the year? Hope doing ok Im working a iot project and I want to develop a panell of control with django. ¿Whats is the best or possible way to connect django to mqtt broker? Thanks in advance, Regards,