Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
no problem
Il 20 nov 2018, 18:38 +0100, Avitab Ayan Sarmah , ha 
scritto:
> Thanks for your support. I will check and fix it. Thanks
>
> > On 20-Nov-2018 11:06 PM, "matteo gassend (LanguageMatt)" 
> >  wrote:
> > > A ForeignKey requires an “on_delete” argument. This is the 
> > > function(kinda) that will be called when you decide to delete an instance 
> > > of said model.
> > >
> > > You can see it being used on the Django official tutorial,
> > > https://docs.djangoproject.com/en/dev/intro/tutorial02/#creating-models
> > > Il 20 nov 2018, 18:32 +0100, Avitab Ayan Sarmah , 
> > > ha scritto:
> > > > Hi matteo,
> > > >
> > > > Now it is showing as:
> > > >
> > > >  File 
> > > > "C:\Users\AVITABAYAN\Desktop\django_lectures\first_project\first_app\models.py",
> > > >  line 11, in webpage
> > > >     topic = models.ForeignKey(Topic)
> > > > TypeError: __init__() missing 1 required positional argument: 
> > > > 'on_delete'
> > > >
> > > > Please check :)
> > > >
> > > > On Tuesday, November 20, 2018 at 10:29:26 PM UTC+5:30, matteo gassend 
> > > > wrote:
> > > > > the k in ForeignKey is Capitalized
> > > > > Il 20 nov 2018, 17:57 +0100, Avitab Ayan Sarmah , 
> > > > > ha scritto:
> > > > > > Hi everyone,
> > > > > >
> > > > > > I have written a code in models.py inside my project folder. I have 
> > > > > > completed my code and whenever i execute "python manage.py 
> > > > > > makemigrations first_app", i get an error. The error is mentioned 
> > > > > > as "AttributeError: module 'django.db.models' has no attribute 
> > > > > > 'Foreignkey'".
> > > > > >
> > > > > > My code and my anaconda prompt error screenshot is attached below. 
> > > > > > Please check my code and give a resolution.
> > > > > > --
> > > > > > 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 post to this group, send email to django...@googlegroups.com.
> > > > > > Visit this group at https://groups.google.com/group/django-users.
> > > > > > To view this discussion on the web visit 
> > > > > > https://groups.google.com/d/msgid/django-users/78be7de9-f9c8-4501-a487-ad44e7824de9%40googlegroups.com.
> > > > > > For more options, visit https://groups.google.com/d/optout.
> > > > --
> > > > 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 post to this group, send email to django-users@googlegroups.com.
> > > > Visit this group at https://groups.google.com/group/django-users.
> > > > To view this discussion on the web visit 
> > > > https://groups.google.com/d/msgid/django-users/eb39fb67-22fe-4551-8603-9eac4cf65c7f%40googlegroups.com.
> > > > For more options, visit https://groups.google.com/d/optout.
> > > --
> > > 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/XXBDDSFsqIw/unsubscribe.
> > > To unsubscribe from this group and all its topics, send an email to 
> > > django-users+unsubscr...@googlegroups.com.
> > > To post to this group, send email to django-users@googlegroups.com.
> > > Visit this group at https://groups.google.com/group/django-users.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/django-users/8b351f8e-a2ed-4403-900a-8bb47bbc8452%40Spark.
> > >
> > > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAEx5wm70iveaT30ciZJk_H8_wC_YskgnQUiqJL0pK6fczQVT9w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3d926d6d-9071-49f9-80b3-c90425aad6be%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
A ForeignKey requires an “on_delete” argument. This is the function(kinda) that 
will be called when you decide to delete an instance of said model.

You can see it being used on the Django official tutorial,
https://docs.djangoproject.com/en/dev/intro/tutorial02/#creating-models
Il 20 nov 2018, 18:32 +0100, Avitab Ayan Sarmah , ha 
scritto:
> Hi matteo,
>
> Now it is showing as:
>
>  File 
> "C:\Users\AVITABAYAN\Desktop\django_lectures\first_project\first_app\models.py",
>  line 11, in webpage
>     topic = models.ForeignKey(Topic)
> TypeError: __init__() missing 1 required positional argument: 'on_delete'
>
> Please check :)
>
> On Tuesday, November 20, 2018 at 10:29:26 PM UTC+5:30, matteo gassend wrote:
> > the k in ForeignKey is Capitalized
> > Il 20 nov 2018, 17:57 +0100, Avitab Ayan Sarmah , ha 
> > scritto:
> > > Hi everyone,
> > >
> > > I have written a code in models.py inside my project folder. I have 
> > > completed my code and whenever i execute "python manage.py makemigrations 
> > > first_app", i get an error. The error is mentioned as "AttributeError: 
> > > module 'django.db.models' has no attribute 'Foreignkey'".
> > >
> > > My code and my anaconda prompt error screenshot is attached below. Please 
> > > check my code and give a resolution.
> > > --
> > > 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 post to this group, send email to django...@googlegroups.com.
> > > Visit this group at https://groups.google.com/group/django-users.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/django-users/78be7de9-f9c8-4501-a487-ad44e7824de9%40googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/eb39fb67-22fe-4551-8603-9eac4cf65c7f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8b351f8e-a2ed-4403-900a-8bb47bbc8452%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
the k in ForeignKey is Capitalized
Il 20 nov 2018, 17:57 +0100, Avitab Ayan Sarmah , ha 
scritto:
> Hi everyone,
>
> I have written a code in models.py inside my project folder. I have completed 
> my code and whenever i execute "python manage.py makemigrations first_app", i 
> get an error. The error is mentioned as "AttributeError: module 
> 'django.db.models' has no attribute 'Foreignkey'".
>
> My code and my anaconda prompt error screenshot is attached below. Please 
> check my code and give a resolution.
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/78be7de9-f9c8-4501-a487-ad44e7824de9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/977e3dac-20cc-43f7-8e99-113bcfd1c44d%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: How to add form field dynamically?

2018-09-26 Thread matteo gassend (LanguageMatt)
You could always mix jquery with formsets
Il 26 set 2018, 18:02 +0200, Joel Mathew , ha scritto:
> You would use jquery to create the button using the $(selector).html(code).
> Since this doesnt fall within the scope of this django group, I wont 
> elaborate. If you know basic javascript and jquery, it should be easy.
>
>
>
> > On Wed, 26 Sep 2018 at 19:25, Django Lover  wrote:
> > > Then What is the solution please let HELP ME?? I know that it will done 
> > > by Jquery but how? I dont Know
> > >
> > >
> > >
> > > On Wednesday, September 26, 2018 at 6:14:07 PM UTC+5:30, Joel wrote:
> > > > I don't think django alone can help you here. You need to do that with 
> > > > JavaScript.
> > > >
> > > > > On Wed 26 Sep, 2018, 6:01 PM Django Lover,  
> > > > > wrote:
> > > > > > Hi joel Thank for response.
> > > > > >
> > > > > > I want something like this-
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > 1- when I click on add row button a new Row (No-2) will create 
> > > > > > dynamically.
> > > > > > 2- In the select product/service its an options dropdown. the 
> > > > > > option should have related model data(from table product and 
> > > > > > service list)
> > > > > > 3-  when i save all records in the dynamic field save to the 
> > > > > > database.
> > > > > >
> > > > > >
> > > > > > I hope it clear to you. but if you need more information please let 
> > > > > > me know i am glad to discuss with you.
> > > > > >
> > > > > > :)
> > > > > >
> > > > > > --
> > > > > > 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 post to this group, send email to django...@googlegroups.com.
> > > > > > Visit this group at https://groups.google.com/group/django-users.
> > > > > > To view this discussion on the web visit 
> > > > > > https://groups.google.com/d/msgid/django-users/768d0fb2-4155-40c3-b0fc-fc4dbd2ad553%40googlegroups.com.
> > > > > > For more options, visit https://groups.google.com/d/optout.
> > > --
> > > 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 post to this group, send email to django-users@googlegroups.com.
> > > Visit this group at https://groups.google.com/group/django-users.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/django-users/2140d58d-fc8b-4dcf-9acd-d965afa46cbc%40googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAA%3Diw_8%3D6wQ7kg0TshMDHEBnD7hPfRq65nERkOMO%3D4XoDZ%2BjAg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ff9add3b-5d44-42a5-b8b2-cdf43476acdb%40Spark.
For more options, visit https://groups.google.com/d/optout.