Find Jobs
Hire Freelancers

Print Object List with ManyToManyField

$10-50 USD

Completed
Posted almost 5 years ago

$10-50 USD

Paid on delivery
I am trying to create a project and I have two databases, linked by a ManyToManyField, but I cannot get the actual field value to print on the html form. It just says [login to view URL] no matter what I do. I need assistance completing my code. It is a tiny app, I just can't get past this one snag. Here is my Model: class Enrollment([login to view URL]): Enroll_Student = [login to view URL](Student) Put_Student_Here = [login to view URL](Course, on_delete=[login to view URL]) def get_delete_url(self): return f"/withdraw/{[login to view URL]}/delete" def __str__(self): return '%s %s' % (self.Put_Student_Here, self.Enroll_Student,) Here is my Form: class EnrollmentModelForm([login to view URL]): class Meta: model = Enrollment fields = ['Enroll_Student','Put_Student_Here'] labels = { 'Enroll_Student':'Student', 'Put_Student_Here':'Course', } Here is my view: def roster_list_view(request): qs = [login to view URL]() #list out objects, this is a search view template_name = '[login to view URL]' context = {'object_list': qs} return render (request, template_name, context) HTML Form: {% extends "[login to view URL]" %} {% block content %} Course Roster {% for object in object_list%} {% include '[login to view URL]'%} {% endfor %} {% endblock %} In-Line Form: {‌{object.Put_Student_Here}}, {‌{object.Enroll_Student}} Withdraw Student When I run this, the display on the screen says: History Kristen Disney, [login to view URL] As you can see, it's the "ManyToManyField(Student)" value that's not coming out on the list. The ForeignKey field is coming over just fine.
Project ID: 20092010

About the project

3 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, {‌{object.Enroll_Student}} is a queryset and not an object. I am a Python Backend Developer | DevOps Engineer | SRE. I am proficient with tools such as Docker, Kubernetes, Istio, Terraform, Gitlab CI/CD, Travis CI, Google Cloud Platform, IBM Cloud, AWS, etc I also have experience working on backend technologies such as Python, Django, Redis, celery, ActiveMQ, PostgreSQL, PostGIS, etc I am passionate about software development and learning about new technologies/skills in the same domain. I am self-motivated, diligent and a great team player. I focus on the following when working on projects: ● Following recommended standards. ● Proper logging and Exception Handling. ● Proper Documentation. ● Test Driven Development. etc I value the following, not just in software development but also all aspects of life: - Constant improvement. - Transparency and honesty. - Collaboration and friendliness. - Flexibility and open-mindedness. I am positive that I can bring the project many benefits with my experience, background, and forward thinking. I look forward to working with you. Sincerely, Samwel
$50 USD in 1 day
4.8 (10 reviews)
4.3
4.3
3 freelancers are bidding on average $43 USD for this job
User Avatar
Hi, I have 5+years Experience in Website/Software Design & Website Development. I'm an Expert in: -Frontend & Backend Development -Python -Data Science -Machine Learning -JVM technologies -Jquery, PHP -Ionic - Hybrid Mobile Applications -Angular, Node.js -Ruby on Rails -C++ Who Knows the value of time. Very hard working and always delivers the work on time. I will finish your tasks in a timely and efficient manner, I aspire to help others reach their goals through the use of my knowledge and experience, I am available 24 hours support. I am available for the weekend also. If you are looking for website design and development I am the right person for you.
$30 USD in 7 days
4.9 (8 reviews)
4.0
4.0

About the client

Flag of UNITED STATES
Oklahoma City, United States
0.0
0
Payment method verified
Member since Jun 24, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.