Find Jobs
Hire Freelancers

Print Object List with ManyToManyField

$10-50 USD

Slutfört
Publicerad nästan fem år sedan

$10-50 USD

Betalning vid leverans
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

Om projektet

3 anbud
Distansprojekt
Senaste aktivitet fem år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
Tilldelad till:
Använd 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 Om 1 dag
4,8 (10 omdömen)
4,3
4,3
3 frilansar lägger i genomsnitt anbud på $43 USD för detta uppdrag
Använd 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 Om 7 dagar
4,9 (8 omdömen)
4,0
4,0

Om kunden

Flagga för UNITED STATES
Oklahoma City, United States
0,0
0
Verifierad betalningsmetod
Medlem sedan juni 24, 2019

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.