Showing proper data in django template

2019-09-16 Thread Abu Yusuf
Hello, I have two models here:

class Tender(models.Model):
  project = models.ForeignKey(Project, verbose_name=_("Select project"), 
on_delete=models.CASCADE)
  name = models.CharField(_("Tender name"), max_length=250)
  value = models.FloatField(_("Tender value"), default=0, null=True, blank=
True)
  est_cost = models.FloatField(default=0, null=True, blank=True)

  def __str__(self):
return self.name

class BillReceive(models.Model):
  tender = models.ForeignKey(Tender, verbose_name=_("Select tender"), 
on_delete=models.CASCADE)
  date = models.DateField(default=datetime.date.today)
  received_amount = models.FloatField(default=0)
  due_amount = models.FloatField(default=0, null=True, blank=True)
  total = models.FloatField(
blank=True,
null=True
  )

And the views here:

def bill_receive_of_tenders(request, pk):
  tender = get_object_or_404(Tender, pk=pk)
  bill_receive = BillReceive.objects.filter(tender=tender).order_by('date')
  ctx = {'tenders': tender, 'bill_receives': bill_receive}
  return render(request, 'boro_khata/bill_receive_of_tenders.html', ctx)

I would like to see the due_amount liked this:

[image: ss.png]


60, 40, 35

Can Anyone help me out here? 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5b7683e0-027d-4118-9c16-f1da24495298%40googlegroups.com.


Re: Showing proper data in django template

2019-09-16 Thread Abu Yusuf


On Monday, September 16, 2019 at 3:14:43 PM UTC+6, Abu Yusuf wrote:
>
> Hello, I have two models here:
>
> class Tender(models.Model):
>   project = models.ForeignKey(Project, verbose_name=_("Select project"), 
> on_delete=models.CASCADE)
>   name = models.CharField(_("Tender name"), max_length=250)
>   value = models.FloatField(_("Tender value"), default=0, null=True, blank
> =True)
>   est_cost = models.FloatField(default=0, null=True, blank=True)
>
>   def __str__(self):
> return self.name
>
> class BillReceive(models.Model):
>   tender = models.ForeignKey(Tender, verbose_name=_("Select tender"), 
> on_delete=models.CASCADE)
>   date = models.DateField(default=datetime.date.today)
>   received_amount = models.FloatField(default=0)
>   due_amount = models.FloatField(default=0, null=True, blank=True)
>   total = models.FloatField(
> blank=True,
> null=True
>   )
>
> And the views here:
>
> def bill_receive_of_tenders(request, pk):
>   tender = get_object_or_404(Tender, pk=pk)
>   bill_receive = BillReceive.objects.filter(tender=tender).order_by('date'
> )
>   ctx = {'tenders': tender, 'bill_receives': bill_receive}
>   return render(request, 'boro_khata/bill_receive_of_tenders.html', ctx)
>
> I would like to see the due_amount liked this:
>
> [image: ss.png]
>
>
> 60, 40, 35
>
> Can Anyone help me out here? 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/76cd925d-b092-43ba-8f28-ba0744a6fdfa%40googlegroups.com.


how to upload large files in django temp directory location ?

2019-09-16 Thread arvind yadav
def handle_uploaded_file(f):
with open('/home/arvind/Desktop/newupload/documents/'+f.name, 'wb') as 
destination:
filepath = destination.name
for chunk in f.chunks():
   #time.sleep(1)
   destination.write(chunk)
   #


def fileupload(request):
if request.method == 'POST':
files = request.FILES.getlist('uploadfile')
for f in files:
handle_uploaded_file(f)
return HttpResponse('add')
return HttpResponse("done")

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/79112945-255a-4536-81bf-113943c9132b%40googlegroups.com.


Re: Showing proper data in django template

2019-09-16 Thread Adesina Oluwaseun
On Mon, Sep 16, 2019 at 10:15 AM Abu Yusuf 
wrote:

> Hello, I have two models here:
>
> class Tender(models.Model):
>   project = models.ForeignKey(Project, verbose_name=_("Select project"),
> on_delete=models.CASCADE)
>   name = models.CharField(_("Tender name"), max_length=250)
>   value = models.FloatField(_("Tender value"), default=0, null=True, blank
> =True)
>   est_cost = models.FloatField(default=0, null=True, blank=True)
>
>   def __str__(self):
> return self.name
>
> class BillReceive(models.Model):
>   tender = models.ForeignKey(Tender, verbose_name=_("Select tender"),
> on_delete=models.CASCADE)
>   date = models.DateField(default=datetime.date.today)
>   received_amount = models.FloatField(default=0)
>   due_amount = models.FloatField(default=0, null=True, blank=True)
>   total = models.FloatField(
> blank=True,
> null=True
>   )
>
> And the views here:
>
> def bill_receive_of_tenders(request, pk):
>   tender = get_object_or_404(Tender, pk=pk)
>   bill_receive = BillReceive.objects.filter(tender=tender).order_by('date'
> )
>   ctx = {'tenders': tender, 'bill_receives': bill_receive}
>   return render(request, 'boro_khata/bill_receive_of_tenders.html', ctx)
>
> I would like to see the due_amount liked this:
>
> [image: ss.png]
>
>
> 60, 40, 35
>
> Can Anyone help me out here?
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b7683e0-027d-4118-9c16-f1da24495298%40googlegroups.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHBkvW%3Dk8AcDxnzA8SEcQKHu1CKq8zqvYEVNdmh60OoJYQHd0A%40mail.gmail.com.


INDUSTRIAL BASED SUPERVISOR.docx
Description: MS-Word 2007 document


UNIVERSITY STAFF ASSESSMENT OF STUDENT.docx
Description: MS-Word 2007 document


SUPERVISOR'S LOG BOOK.docx
Description: MS-Word 2007 document


Re: ORM

2019-09-16 Thread Yann Mbella
Thanx for the information

Le ven. 13 sept. 2019 à 06:24, Jani Tiainen  a écrit :

> Hi.
>
> There exists django-extensions package that has management command to make
> UML diagram for your models.
>
>
> pe 13. syysk. 2019 klo 5.22 Yann Mbella 
> kirjoitti:
>
>> Got little problem is it possible to have a plugin which mapps or
>> reproduce my class diagrams drawn in an IDE of UML in my models app
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/13525e44-e176-409a-a55e-0595834c780f%40googlegroups.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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91odRe_26%3DuuAwCQOOapK_UeKPE1tOtmXQP-df8%3Dnxf4k3g%40mail.gmail.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEaFv0GFdjA-W9XTWjG6as9KYy%3Dj-xy_PBMBG5v69fG9cvE%2B2Q%40mail.gmail.com.


Sticky keyboard creating multiple objects from a create form

2019-09-16 Thread Anthony Goslar
Hey guys

I have a user who has a problem with his keyboard. When he's captured an 
expense from my form, it seems like his key was sticking and it created 
~50x objects in the database. Is there a post validation function I can use 
to raise an error with this type of problem?  Obviously *fix the keyboard* 
is a good idea but I'd prefer the server to throw an error and not create 
50 or 100 records that I have to manually delete from the shell.

Gunicorn log file readout is below. I'm not certain what the "Ignoring 
EPIPE" is referring in this context as I'm not sure where the piping is but 
I do note that the id numbers for the log [11242] and [11243] are repeated 
which makes me suspect its catching some type of exception but also 
creating the object in the database. Hopefully the exception could stop the 
save() method, throw a 500 error and re-route to the previous page? I'm 
using a class based view which is also provided below.



[2019-09-16 13:09:36 +0200] [11242] [DEBUG] GET 
/finances/student/uuid-replace-1/finances/profile/
[2019-09-16 13:09:59 +0200] [11243] [DEBUG] GET 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:09 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:10 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:10 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:11 +0200] [11243] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:11 +0200] [11243] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:11 +0200] [11242] [DEBUG] POST 
/finances/uuid-replace-1/expense_student/uuid-replace-2/create/
[2019-09-16 13:10:11 +0200] [11242] [DEBUG] Ignoring EPIPE
[2019-09-16 13:10:11 +0200]

how to copy one table content in to another table in database

2019-09-16 Thread Mahendhar Reddy
how to copy one table content in to another table in database

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/79ac7c5c-0b1c-4834-b824-bdc56d5b2b0b%40googlegroups.com.


Re: ORM

2019-09-16 Thread Yann Mbella
I needed the contrary having uml diagrams and generating models from
does diagram

Le lun. 16 sept. 2019 à 16:43, Yann Mbella  a
écrit :

> Thanx for the information
>
> Le ven. 13 sept. 2019 à 06:24, Jani Tiainen  a écrit :
>
>> Hi.
>>
>> There exists django-extensions package that has management command to
>> make UML diagram for your models.
>>
>>
>> pe 13. syysk. 2019 klo 5.22 Yann Mbella 
>> kirjoitti:
>>
>>> Got little problem is it possible to have a plugin which mapps or
>>> reproduce my class diagrams drawn in an IDE of UML in my models app
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/13525e44-e176-409a-a55e-0595834c780f%40googlegroups.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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHn91odRe_26%3DuuAwCQOOapK_UeKPE1tOtmXQP-df8%3Dnxf4k3g%40mail.gmail.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEaFv0FoE4D8_zNNv%2B3T3HUx1AzF%3DgGFPjUFLVL0sqQzc6Vtsg%40mail.gmail.com.


Re: Staticfiles on S3

2019-09-16 Thread Anthony Goslar
Try using Django-storages and follow the tutorial on
simpleisbetterthancomplex.com

This looks like a permissions issue.

I had similar issues with Google Buckets and sorted it out by reading the
django-storages methods for Google buckets in the source code and then
making sure all the settings were correct.

Anthony


On Mon, 16 Sep 2019, 22:01 Elias Coutinho,  wrote:

> It seems that one of the problems is occurring while downloading the files.
>
> See this error image:
>
> [image: image.png]
>
> If I go to Direct Link it usually downloads:
>
>
> https://gsm-gervas.s3.amazonaws.com/static/material/fonts/roboto/fonts/Roboto-Medium.woff2
>
> Em qua, 4 de set de 2019 às 23:35, sachinbg sachin <
> sachinbgsach...@gmail.com> escreveu:
>
>> Mention aws key value in setting
>>
>> On Thu, Sep 5, 2019, 2:06 AM mohammed habib  wrote:
>>
>>> Did you run python manage.py collectstatic
>>>
>>> Are you using static template tags to heed your html link href fields
>>>
>>> Sent from my iPhone
>>>
>>> On 4 Sep 2019, at 23:06, Elias Coutinho 
>>> wrote:
>>>
>>> Guys good afternoon,
>>>
>>> I managed to put my static folder in s3, the problem is that my effects
>>> already lost power. lol
>>>
>>> The staticfiles folder where the auxiliary applications are installed
>>> stop working, in my case it was django-material, select2 and others.
>>>
>>>
>>>
>>> If I comment this code
>>> 
>>> that is in the settings of my project it works but does not send anything
>>> to Amazon s3.
>>>
>>>
>>>
>>> Any suggestion?
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/70f224ee-f7a4-468f-9609-db2f8a0be161%40googlegroups.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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/D42D2706-9340-4450-BC92-35AB0D2C47DB%40gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/ainBAyaKDCc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAOs61rziOACLNEH8jhT95zOcJWX6uomoxSLiQAVuU6eb43rNkQ%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Elias Coutinho.
> Aprender sobre alguns assuntos é fundamental.
> Aprender sobre Deus é indiscutivelmente o melhor conteúdo.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALgom8pTgON%2B%3D0CJi_Pg%3D9ay-wJ%2B%3Db4SmWGb36Y-GuLQxGx75A%40mail.gmail.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM9cxcZbHUJNbcAk%2BysXRGgdvRsiEZi-OkjcE-0LURH-G8EjZA%40mail.gmail.com.


Re: Staticfiles on S3

2019-09-16 Thread Aldian Fazrihady
Elias, please set up the CORS policy of the S3 bucket:
https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-cors-configuration.html

On Tue, Sep 17, 2019 at 3:44 AM Anthony Goslar 
wrote:

> Try using Django-storages and follow the tutorial on
> simpleisbetterthancomplex.com
>
> This looks like a permissions issue.
>
> I had similar issues with Google Buckets and sorted it out by reading the
> django-storages methods for Google buckets in the source code and then
> making sure all the settings were correct.
>
> Anthony
>
>
> On Mon, 16 Sep 2019, 22:01 Elias Coutinho, 
> wrote:
>
>> It seems that one of the problems is occurring while downloading the
>> files.
>>
>> See this error image:
>>
>> [image: image.png]
>>
>> If I go to Direct Link it usually downloads:
>>
>>
>> https://gsm-gervas.s3.amazonaws.com/static/material/fonts/roboto/fonts/Roboto-Medium.woff2
>>
>> Em qua, 4 de set de 2019 às 23:35, sachinbg sachin <
>> sachinbgsach...@gmail.com> escreveu:
>>
>>> Mention aws key value in setting
>>>
>>> On Thu, Sep 5, 2019, 2:06 AM mohammed habib 
>>> wrote:
>>>
 Did you run python manage.py collectstatic

 Are you using static template tags to heed your html link href fields

 Sent from my iPhone

 On 4 Sep 2019, at 23:06, Elias Coutinho 
 wrote:

 Guys good afternoon,

 I managed to put my static folder in s3, the problem is that my effects
 already lost power. lol

 The staticfiles folder where the auxiliary applications are installed
 stop working, in my case it was django-material, select2 and others.



 If I comment this code
 
 that is in the settings of my project it works but does not send anything
 to Amazon s3.



 Any suggestion?

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/70f224ee-f7a4-468f-9609-db2f8a0be161%40googlegroups.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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/D42D2706-9340-4450-BC92-35AB0D2C47DB%40gmail.com
 
 .

>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/ainBAyaKDCc/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAOs61rziOACLNEH8jhT95zOcJWX6uomoxSLiQAVuU6eb43rNkQ%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Elias Coutinho.
>> Aprender sobre alguns assuntos é fundamental.
>> Aprender sobre Deus é indiscutivelmente o melhor conteúdo.
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALgom8pTgON%2B%3D0CJi_Pg%3D9ay-wJ%2B%3Db4SmWGb36Y-GuLQxGx75A%40mail.gmail.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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAM9cxcZbHUJNbcAk%2BysXRGgdvRsiEZi-OkjcE-0LURH-G8EjZA%40mail.gmail.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://ald

Re: Django Post request error

2019-09-16 Thread Ruturaj Singare
Thank you for your response
It works for me.
I have forgeted to close form tag.
Thank you so much.

Thanks & Regards
Ruturaj

On Fri, 13 Sep, 2019, 8:14 PM Nelson Varela, 
wrote:

> You have to close your first form.
>
> So put  somewhere before the second form
>
> Op vrijdag 13 september 2019 15:53:48 UTC+2 schreef Ruturaj Singare:
>>
>> Hi Everyone I got one problem I have 2 form in index.html but having its
>> own url pattern but both forms redirects to on e url using post request can
>> you please help me.
>>
>> I am your regular subscriber on youtube
>> Please help
>>
>> My url patterns :
>>
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('', views.index, name='index'),
>> path('home', views.index, name='index'),
>> path('paid', views.paid, name='paid')
>> ]
>>
>>
>> My index.html form section
>>
>>  
>> 
>> {% csrf_token %}
>> 
>> 
>>
>>   
>>   
>> 
>>   Sr. No
>>   Menu Items
>>   Quantity
>> 
>>   
>>   
>>  {% for order in orderList %}
>> 
>>   {{ forloop.counter }}
>>   {{ order.MenuItem }}
>>   {{ order.Qty }}
>> 
>> {% endfor %}
>>   
>> 
>>  
>>   {% csrf_token %}
>>   
>>   
>>  
>>   
>>
>>
>>
>> 
>>
>> I think all ok but not working
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9052b0d8-576b-48f6-bf22-3d657316c762%40googlegroups.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhU20f1wnC_0JxwWCEt%3Dg%3DqTLGBcLmdnsFg3JjUn2ZP9LMt8Q%40mail.gmail.com.