Re: foreign key is not working

2018-11-02 Thread ansh srivastav
Where is model codes?


[image: Mailtrack]

Sender
notified by
Mailtrack

11/02/18,
1:47:40 PM

On Fri, Nov 2, 2018 at 10:14 AM amit pant  wrote:

> i used all method which is on docs but still it's not working properly.
>  i am using django 2 with pyhton 3
>
>
> On Wed, Oct 31, 2018 at 5:28 PM Paras Patidar 
> wrote:
>
>> Use:
>> on_delete = models.CASCADE
>> In Foreign Key
>>
>> On Wed 31 Oct, 2018, 5:15 PM amit pant,  wrote:
>>
>>> i used foreign key for make relationship between two model class but it
>>> does not work properly, i used this for make subscription and on first
>>> model their is choices for subscription.
>>> help me why it is 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 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/ccb94b40-2c2d-4202-bfb9-37459770b99a%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/CAK-hKekN4hsqHexxoWww2Y%3DzsJukwx2PfH02D%2B%3DAF_qqfYQYyg%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/CAF2Ah_HxAmfDAVnJdFDRz548ouD-FiFOH7iXDKbCK%2Bh-C%2BKEOg%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/CAHMQ531%3DHB%2BXX2x8Dc%3D1tu6mhMe-D6dKY0pMLBLjfv8nRhQFPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use Email to Login With Django Auth

2018-11-01 Thread ansh srivastav
Your question is not clear, please be a bit specific.


[image: Mailtrack]

Sender
notified by
Mailtrack

11/01/18,
6:33:43 PM

On Thu, Nov 1, 2018 at 5:38 PM Ryan Shepard  wrote:

> How could i go about allowing people to also use their email to sign into
> Django instead of a username? I have done research my self and tried
> creating my own backend for it. But it doesn't work.
>
> --
> 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/d6046362-5149-4edf-adc8-273547213748%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/CAHMQ5337tAKwzT9_yh_4%3DYKP%3DJGkDAW9n8iiU1xZyt2X4KS4%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Create data from django models from .csv file using pandas library

2018-10-15 Thread ansh srivastav
Which database are you referring to?


[image: Mailtrack]

Sender
notified by
Mailtrack

10/15/18,
5:03:59 PM

On Mon, Oct 15, 2018 at 4:42 PM Mohammad Aqib 
wrote:

> I have multiple .csv files to create data from django models into a
> database using python pandas library. Can anyone suggest me how to do
> perform this task.
>
> import pandas as pd
>
> df = pd.read_csv(RESOURCE_ROOT + '/data_files/102018_core_business.csv')
>
> business_instance, created = 
> Business.objects.get_or_create(business_id=df['id'], business_name=df['name'])
>
>
> --
> Mohd Aqib
> Software Engineer
> 9873141865
>
> --
> 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/CAOh93neQTfW0CoepiyhQ57ziGDuw4fN0OTV6w-rJ%2BaXo0aUL%2Bg%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/CAHMQ5333D_uPvsK-WqJgZ83_aKBUAkxt-DWDEJqT7Z0BOszTzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread ansh srivastav
Use the following in urls.py:



  from django.conf.urls import include,url

On Sat, Aug 25, 2018 at 12:54 PM Aware Fun 
wrote:

>
>
> rahul
>
> On Fri, Aug 24, 2018, 3:17 AM herve kabore  wrote:
>
>> this is the urls.py
>>
>>
>> from django.conf.urls import include,url
>> from django.contrib import admin
>>
>> urlpatterns = [
>> url(r'^admin/', include(admin.site.urls)),
>>
>>  url(r'^$', 'blog.views.home', name='home'),
>> ]
>>
>>
>> this is the views
>>
>>
>> from django.shortcuts import render
>>
>> from django.http import HttpResponse
>>
>> # Create your views here.
>>
>> def home(request):
>> return HttpResponse("Bonjour monde!")
>>
>>
>>
>> Unhandled exception in thread started by > check_errors..wrapper at 0x7f8f4a8afe18>
>> Traceback (most recent call last):
>>   File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line
>> 228, in wrapper
>> fn(*args, **kwargs)
>>   File
>> "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py",
>> line 124, in inner_run
>> self.check(display_num_errors=True)
>>   File "/usr/lib/python3/dist-packages/django/core/management/base.py",
>> line 359, in check
>> include_deployment_checks=include_deployment_checks,
>>   File "/usr/lib/python3/dist-packages/django/core/management/base.py",
>> line 346, in _run_checks
>> return checks.run_checks(**kwargs)
>>   File "/usr/lib/python3/dist-packages/django/core/checks/registry.py",
>> line 81, in run_checks
>> new_errors = check(app_configs=app_configs)
>>   File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line
>> 16, in check_url_config
>> return check_resolver(resolver)
>>   File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line
>> 26, in check_resolver
>> return check_method()
>>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
>> 256, in check
>> for pattern in self.url_patterns:
>>   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line
>> 35, in __get__
>> res = instance.__dict__[self.name] = self.func(instance)
>>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
>> 407, in url_patterns
>> patterns = getattr(self.urlconf_module, "urlpatterns",
>> self.urlconf_module)
>>   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line
>> 35, in __get__
>> res = instance.__dict__[self.name] = self.func(instance)
>>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
>> 400, in urlconf_module
>> return import_module(self.urlconf_name)
>>   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in
>> import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 994, in _gcd_import
>>   File "", line 971, in _find_and_load
>>   File "", line 955, in
>> _find_and_load_unlocked
>>   File "", line 665, in _load_unlocked
>>   File "", line 678, in exec_module
>>   File "", line 219, in
>> _call_with_frames_removed
>>   File "/home/herve/Bureau/mes_projets/eboutique/eboutique/urls.py", line
>> 20, in 
>> url(r'^$', 'backoffice.views.home', name='home'),
>>   File "/usr/lib/python3/dist-packages/django/conf/urls/__init__.py",
>> line 85, in url
>> raise TypeError('view must be a callable or a list/tuple in the case
>> of include().')
>> TypeError: view must be a callable or a list/tuple in the case of
>> include().
>>
>> --
>> 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/c20e08d2-2578-4430-963e-bb14df3a0ece%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/CA%2B8bEuQ%2BuF7YM7S9q-DSPD9QCOgeXrLKp_5M_XNEEJp_JKQG%3Dg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Go

Re: Message from a django beginner user

2018-05-16 Thread ansh srivastav
If you are interested in learn by streaming, then you can go through with
learncodeonline website by Hitesh Choudhary. Although it is a paid course
but it would be awesome to learn from there from scratch. The link is this:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwiJgq6EpIrbAhVHXn0KHWHfBQ0QFggoMAA&url=https%3A%2F%2Fwww.learncodeonline.in%2F&usg=AOvVaw0fTZtNDFG48GYRPAbnBVHk

On Wed, May 16, 2018 at 4:54 PM, Paolo Chilosi 
wrote:

> Dear Francis
>
> I also started studying Django since 7 weeks. I have been following in
> parallel the official tutorial of the Django site and the tutorial of
> thenewboston. I found also very useful the djangobook to reinforce the
> concepts. At first I had a lot of difficulties as I was introducing many
> typos in my tutorial code that where difficult to detect. My experience has
> changed since I invested in purchasing a license of PyCharm professional.
> This IDE help me in detecting the typos; it also help me in restating the
> tutorial from scratch when I reach a point where I am lost. I am sharing
> the notes that I have collected up to know.
>
> I will be glad you share with me your notes to help me in progressing in
> the knowledge of Django.
>
> Ciao.
>
>
>
>
>
>
>
> *From:* django-users@googlegroups.com [mailto:django-users@
> googlegroups.com] *On Behalf Of *James Farris
> *Sent:* Tuesday, May 15, 2018 9:33 PM
> *To:* django-users@googlegroups.com
> *Subject:* Re: Message from a django beginner user
>
>
>
> In addition to the Django docs, I recommend https://djangobook.com/ although
> it’s written for Django 1.11, a lot of concepts still apply.
>
>
>
> Another good website is https://tutorial.djangogirls.org/en/
>
> Sent from my mobile device
>
>
> On May 15, 2018, at 5:16 PM, Gerald Brown  wrote:
>
> The best way to learn it is o jump in and start using it.  Django has a
> good tutorial on-line @ https://docs.djangoproject.
> com/en/2.0/intro/tutorial01/.  When you have problems Google and this
> Group are your friends.
>
> Goo luck.
>
>
>
> On 05/16/2018 01:39 AM, Francis F. Massaquoi, Jr. wrote:
>
> Hi, I'm Francis F. Massaquoi, Jr. with great interest in learning django
> 2.0, which is the latest version, I have been searching on youtube for a
> channel that have the latest version tutorial, I have not really find one,
> can someone please help me with a pdf or website, where I can learn django
> to the best, I have been reading some pdf, I have the basic knowledge, but
> I need to advance my knowledge. Or if you can connect with me on skype,
> this is my skype username: francisfmassaquoijr, or if you have a skype
> group, you can please add me, or give me your skype username...
>
>
>
> Your urgent response will highly be appreciated.
>
>
>
> Thanks to the admin for accepting me..
>
>
>
> We do it the django way, because it's the best way to web app
> development.
>
> --
> 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/e22ff629-023d-41dc-bb08-7d0d0f87fd42%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/24c2685c-376f-d895-b51b-2447bbf77903%40gmail.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/39F98B08-C2C2-46AE-A8E3-8BF7A5674DCC%40gmail.com
> 

Re: A first time programmer

2018-04-07 Thread ansh srivastav
First check the version of python, then type :django-admin startproject
projectname.

On 7 Apr 2018 04:03, "Paul Baforh"  wrote:

Please programmers, how do I engage django because i get syntax error i
type in this code
- $ django-admin startproject mySite ---

-- 
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/8c30cd6f-0745-44cf-a782-3cac82762a75%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/CAHMQ532wOZ6UNdJL%3DZdWncPBDspEt0M%2B-U1pkPs173J6_4piBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: When to create a new app

2018-03-10 Thread ansh srivastav
Most amazing part about django is every stuff related to a new app!
Suppose you may want to create a game and in that first the user have to
intimate the move, so for that an app is created !


On 10 Mar 2018 21:40, "Cictani"  wrote:

>
> Hi Andréas,
>
> thank you. Currently I am working on a db app for ant species (
> https://github.com/Cictani/antkeeping_info). Each ant species can be
> native to several countries and other regions (states for example). I
> created a separate regions up which contains the models for Country and
> Region .
> It also contains views to query ants native to a specific regions. However
> now I am thinking if it actually all belonged into the ants app... Since in
> the ants it is all too related.
>
> --
> 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/4c36c78e-ce13-4335-bd60-f34db1a4e1ce%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/CAHMQ530%2BG3LndzArG_pukT52Fjy%2BbozLe_GqJgPD-ZYTuRO7LQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.