to make a wish list .

26 views
Skip to first unread message

Shubham Mishra

unread,
Oct 25, 2019, 7:56:42 AM10/25/19
to Django users
hello, 
I am Surendra Mishra , I am student currently i'm learning django.
I applied for internship , but they gave me a task if i complete then they will consider me . 
please help me to complete this task. 

mostly i have done but in the last section im fighting but i not getting exact thing .
i have some item and in under i have wishlist button ..... my requirement is when i click  the wishlist button for the particular item that item must be added in the wishlist page .

so what is the logic and what is the template page for that .


 
wishlistview.py

Lutalo Bbosa joseph

unread,
Oct 25, 2019, 8:06:53 AM10/25/19
to django...@googlegroups.com
 I havent written this yet but, think this works use a list, after clicking the button append the task to the list then call the list in context to  display all the items in the html template. try this and give me afeed back.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a4f2d8d4-a6f4-45ea-8022-538e91f1b124%40googlegroups.com.

Shubham Mishra

unread,
Oct 25, 2019, 10:11:36 AM10/25/19
to django...@googlegroups.com
thank you , 
But I'm not getting the actual logic , I tried so many times but it didn't work , so if you suggest me with some code . this will help me a lot . and also to get this internship.

Samiul Sk

unread,
Oct 25, 2019, 12:15:36 PM10/25/19
to django...@googlegroups.com

Tosin Ayoola

unread,
Oct 25, 2019, 12:15:49 PM10/25/19
to django...@googlegroups.com
Ohk cool I've done something similar to this,  but mine is a to-do list,  so the way I did my is I used a model and a Modelform the form ask the user to enter the lists and details of goals they want to achieve in a day,  then, in the view.py I check if the information entered is valid and cleaned data,  if it is I proceeded to saving it to the db, in the index.html file I use a for loop to display all the title in the db,  and when a particular title is selected,  it displays the details for that title ......  I feel if you do something similar to that you'll achieve your aim 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

Tosin Ayoola

unread,
Oct 25, 2019, 12:17:19 PM10/25/19
to django...@googlegroups.com
I could share u the link to the github repo for the project if you need it 

Shubham Mishra

unread,
Oct 25, 2019, 12:47:41 PM10/25/19
to django...@googlegroups.com
from django.db import models

# Create your models here.
class Item(models.Model):
Name_Item = models.CharField(max_length=20)
Date = models.DateField()

On Fri, Oct 25, 2019 at 9:46 PM Tosin Ayoola <tosina...@gmail.com> wrote:
I could share u the link to the github repo for the project if you need it 
On Oct 25, 2019 5:14 PM, "Tosin Ayoola" <tosina...@gmail.com> wrote:
Ohk cool I've done something similar to this,  but mine is a to-do list,  so the way I did my is I used a model and a Modelform the form ask the user to enter the lists and details of goals they want to achieve in a day,  then, in the view.py I check if the information entered is valid and cleaned data,  if it is I proceeded to saving it to the db, in the index.html file I use a for loop to display all the title in the db,  and when a particular title is selected,  it displays the details for that title ......  I feel if you do something similar to that you'll achieve your aim 
On Oct 25, 2019 12:55, "Shubham Mishra" <subhammi...@gmail.com> wrote:
hello, 
I am Surendra Mishra , I am student currently i'm learning django.
I applied for internship , but they gave me a task if i complete then they will consider me . 
please help me to complete this task. 

mostly i have done but in the last section im fighting but i not getting exact thing .
i have some item and in under i have wishlist button ..... my requirement is when i click  the wishlist button for the particular item that item must be added in the wishlist page .

so what is the logic and what is the template page for that .


 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn73KjBr_UMLreH_ptaEPOVUTZrFLHWx7%2BFR430Cp-MEaVQ%40mail.gmail.com.

Shubham Mishra

unread,
Oct 25, 2019, 12:48:28 PM10/25/19
to django...@googlegroups.com
actually i didn't wrote wishlist models.

Charles Jason Decena

unread,
Oct 28, 2019, 7:24:05 AM10/28/19
to Django users
Try putting foreign key to the wishlist model 
Reply all
Reply to author
Forward
0 new messages