Re: convert python 3 to python2

2019-09-25 Thread Derek
Agreed - Mike's suggestion is a very sensible one.  In the short term, 
supporting 2 and 3 could be very useful, until you have the option to drop 
support for 2.

https://six.readthedocs.io/


On Wednesday, 25 September 2019 01:00:44 UTC+2, Mike Dewhirst wrote:
>
> I think the original question was around backwards conversion of 3.x 
> code to 2.7. 
>
> I don't know of course because all my efforts have been forwards but I 
> believe the six module would be the easiest way backwards. 
>
> And I imagine you would simply run your unit tests in 2.7 and use the 
> six utilities to correct errors. With a little luck that would 
> simultaneously keep the codebase compatible with 3.x for the inevitable 
> forward upgrade. 
>
> Just a thought 
>
> Mike 
>
> On 24/09/2019 10:00 pm, Larry Martell wrote: 
> > On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne 
> > > wrote: 
> >> Official access isn't denied - and python 2 will probably be available. 
> The problem is that you don't get any security fixes or any updates at all. 
> That in itself is a major problem. If someone is saying that you need to 
> use python 2, I would strongly recommend them to not even think about it. 
> All code that is written will be useless in a couple of years time, and 
> need to be updated or even worse thrown away. 
> > This is totally untrue. Yes, all code should be converted to py3, but 
> > that is simply not happing at many companies. They will continue to 
> > use their py2 apps, and either support them internally or purchase py2 
> > support from one of the many companies offering it. Is that a good 
> > idea? No, but it's a reality. 
> > 
>
>

-- 
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/dca5a92a-42c3-4740-9b7c-6bb7fa812d96%40googlegroups.com.


Re: convert python 3 to python2

2019-09-25 Thread Aldian Fazrihady
Ankita, why would a new project be forced to use Python 2 by a (probably
old)  package? A well-maintained package must already have its Python 3
version.
Why can't we find an alternative package that uses Python 3? I am curious
about what package that is.

On Sun, Sep 22, 2019 at 12:32 AM Ankita Gupta 
wrote:

> Not related to Django, I have a project made in python3 but due to some
> package installation, i need to convert my project to python2. Is there any
> method or package to solve this?
>
> --
> 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/875549f9-5bca-4280-88fd-db197ca577dc%40googlegroups.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAaiCDsrd3hURY9kb_h%2BA7aMU24aoZk1Dw8oHLAVfkbKTw%40mail.gmail.com.


Re: Virtual Environment error

2019-09-25 Thread fclinux nova
The simple way is creating new virtualenv and reinstall the package and
recorgine them in requirements.txt for next installation. This is very
basic and checking google is better than mail in this group. Thanks

On Wed, Sep 25, 2019, 13:30 Deep Sukhwani  wrote:

> Depending on how you installed *virtualenv* package and what you are
> using to create and activate virtualenv you can determine the currently
> present virtualenvs on your computer.
>
>
>- If you used *virtualenvwrapper* - use *lsvirtualenv*
>- Additionally, you can look in your Home Directory and search for a
>directory named .virtualenvs (Note there's a dot before virtualenvs)
>to see the list of all present virtualenvs
>- Finally, you can always just go ahead and create a new one -
>shouldn't take too much time
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Wed, 25 Sep 2019 at 08:44, yasar arafath Kajamydeen 
> wrote:
>
>> Dear All,
>>
>> Actually i forget my virtual environment name. So when i run  --  python
>> manage.py  runserver   command its showing   error like this  .
>>
>>
>> ImportError: Couldn't import Django. Are you sure it's installed and
>> available on your PYTHONPATH environment variable? Did you forget to
>> activate a virtual environment?
>>
>>
>>
>>
>> Thanks in Advance.
>>
>>
>> Regards,
>> Yasar Arafath K
>>
>> --
>> 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/198d3480-4f3b-4cf3-971d-ce6c7ec19080%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/CAEMqiPfagZtyvNC%2BLzzmTvasK2HXFcdLnDLqyxJirBq4-miCgQ%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/CAGggS5tjbR0B88Bi-zVG_peXe-jj%3DEdavKjsYHL6KNh51Sxh7A%40mail.gmail.com.


Looking for online shop project

2019-09-25 Thread Ram mohan
Hi everyone,


I am looking for online shop shop app if anyone has please share the code.


Thanks in advance
RamamohanReddy

-- 
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/CAERvz%2BhC%2Bwr8R7ZTsDe%3DtEAVwPaWq5YyZFMURf4ZRV__HWnNCw%40mail.gmail.com.


Regarding to file stronge.

2019-09-25 Thread ANIL UMARANE
Hi guys,
How to store the multiple files in  Json format to  store the  database .
Easily retrieve and delete.

And how set the path

Regards..
Anil.K
Mob:9019094199

-- 
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/CAKfwX9wvcE909kbu79xFt1bcWzfS3u8L%3D6v-5iRQLjYQBk%3D9cw%40mail.gmail.com.


where is the error in pagination?

2019-09-25 Thread leb dev
i have a django project  and it includes pagination i do not know where is 
the error in my code but once i tired to go to the next or previous page it 
crash and display the below error :

> can only concatenate str(not ""NoneType) to str

query=request.GET.get("search")
paginator = Paginator(queryset_list, 5) 
page_request_var = "page"
print("page_request_var===>",page_request_var)
page = request.GET.get(page_request_var)
print("page===>",page)
queryset = paginator.get_page(page)
print("queryset===>",queryset)

When i print **page** it display None


 In the browser it suppose to display **page=2&search=sam**
but instead 
it display **/?=2&20search%20=%20sam**

-- 
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/82e3fe0e-e872-4a49-b869-2b67001e3270%40googlegroups.com.


RE: where is the error in pagination?

2019-09-25 Thread laya
Hi,
Do you use Class Based View ?


Sent from Mail for Windows 10

From: leb dev
Sent: Wednesday, September 25, 2019 2:32 PM
To: Django users
Subject: where is the error in pagination?

i have a django project  and it includes pagination i do not know where is the 
error in my code but once i tired to go to the next or previous page it crash 
and display the below error :

> can only concatenate str(not ""NoneType) to str

            query=request.GET.get("search")
            paginator = Paginator(queryset_list, 5) 
            page_request_var = "page"
            print("page_request_var===>",page_request_var)
            page = request.GET.get(page_request_var)
            print("page===>",page)
            queryset = paginator.get_page(page)
            print("queryset===>",queryset)

When i print **page** it display None


 In the browser it suppose to display **page=2&search=sam**
but instead 
it display **/?=2&20search%20=%20sam**
-- 
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/82e3fe0e-e872-4a49-b869-2b67001e3270%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/5d8b498a.1c69fb81.2757b.7648%40mx.google.com.


Re: where is the error in pagination?

2019-09-25 Thread leb dev
no i am using function based views

-- 
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/bf45aef0-f237-43b4-b7fd-49bea6673b36%40googlegroups.com.


RE: where is the error in pagination?

2019-09-25 Thread laya
Try this one :
paginator = Paginator(queryset_list,8)  # Show 25 contacts per page
page_request_var = "page"
page = request.GET.get(page_request_var)
try:
queryset = paginator.page(page)
except PageNotAnInteger:
# If page is not an integer, deliver first page.
queryset = paginator.page(1)
except EmptyPage:
# If page is out of range (e.g. ), deliver last page of results.
queryset = paginator.page(paginator.num_pages)


Sent from Mail for Windows 10

From: leb dev
Sent: Wednesday, September 25, 2019 2:32 PM
To: Django users
Subject: where is the error in pagination?

i have a django project  and it includes pagination i do not know where is the 
error in my code but once i tired to go to the next or previous page it crash 
and display the below error :

> can only concatenate str(not ""NoneType) to str

            query=request.GET.get("search")
            paginator = Paginator(queryset_list, 5) 
            page_request_var = "page"
            print("page_request_var===>",page_request_var)
            page = request.GET.get(page_request_var)
            print("page===>",page)
            queryset = paginator.get_page(page)
            print("queryset===>",queryset)

When i print **page** it display None


 In the browser it suppose to display **page=2&search=sam**
but instead 
it display **/?=2&20search%20=%20sam**
-- 
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/82e3fe0e-e872-4a49-b869-2b67001e3270%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/5d8b4c32.1c69fb81.58d02.1858%40mx.google.com.


Re: Virtual Environment error

2019-09-25 Thread Tosin Ayoola
CD  into the directory in which u created ur virtualenv the  type source ➕
tab key twice it should give you the list of all the virtual environment u
have created in that directory

On Sep 25, 2019 04:13, "yasar arafath Kajamydeen" 
wrote:

Dear All,

Actually i forget my virtual environment name. So when i run  --  python
manage.py  runserver   command its showing   error like this  .


ImportError: Couldn't import Django. Are you sure it's installed and
available on your PYTHONPATH environment variable? Did you forget to
activate a virtual environment?




Thanks in Advance.


Regards,
Yasar Arafath K

-- 
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/198d3480-4f3b-4cf3-971d-ce6c7ec19080%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/CAHLKn73FXOkSHmc7hWA-dhW%2BGVpJ7eKfr5Os2Ewq7FjMyDQ_BQ%40mail.gmail.com.


Re: Virtual Environment error

2019-09-25 Thread laya Mahmoudi
You os is linux pr windows?

در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹،‏ ۶:۴۴ yasar arafath Kajamydeen <
yasar...@gmail.com> نوشت:

> Dear All,
>
> Actually i forget my virtual environment name. So when i run  --  python
> manage.py  runserver   command its showing   error like this  .
>
>
> ImportError: Couldn't import Django. Are you sure it's installed and
> available on your PYTHONPATH environment variable? Did you forget to
> activate a virtual environment?
>
>
>
>
> Thanks in Advance.
>
>
> Regards,
> Yasar Arafath K
>
> --
> 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/198d3480-4f3b-4cf3-971d-ce6c7ec19080%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/CABL_bk2ORPKBboTCmSWvywm0pboLYw_-n2_JrrfL44TfpPu63Q%40mail.gmail.com.


Re: where is the error in pagination?

2019-09-25 Thread leb dev
i tried your answer and display an error :

That page number is not an integer

-- 
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/0323b126-726e-4889-beee-b68988b1a3f1%40googlegroups.com.


Re: where is the error in pagination?

2019-09-25 Thread laya Mahmoudi
Would you send your html codes relating to pagination

در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹،‏ ۱۵:۰۳ leb dev 
نوشت:

> i tried your answer and display an error :
>
> That page number is not an integer
>
> --
> 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/0323b126-726e-4889-beee-b68988b1a3f1%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/CABL_bk0%2BFNJzKA%2BbsESdz5g%3D6HODB8LiwxXiJFQ%2BOPnHtw6v1Q%40mail.gmail.com.


Re: where is the error in pagination?

2019-09-25 Thread leb dev

>
> 
>>
>> 
>>
>> {% if object_list.has_previous %}
>>
>> « first
>>
>> previous
>>
>> {% endif %}
>>
>>
>>> 
>>
>> Page {{ object_list.number }} of {{ 
>>> object_list.paginator.num_pages }}.
>>
>> 
>>
>>
>>> {% if object_list.has_next %}
>>
>> next
>>
>> last »
>>
>> {% endif %}
>>
>> 
>>
>> 
>>
>>
On Wednesday, September 25, 2019 at 2:39:16 PM UTC+3, laya Mahmoudi wrote:
>
> Would you send your html codes relating to pagination
>
> در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹،‏ ۱۵:۰۳ leb dev  
> نوشت:
>
>> i tried your answer and display an error :
>>
>> That page number is not an integer
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/0323b126-726e-4889-beee-b68988b1a3f1%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/0ad0f775-92f0-4621-b491-5d97a7f9270a%40googlegroups.com.


Re: regarding adding data into database using faker library

2019-09-25 Thread Cornelis Poppema
You almost had it! You're already setting DJANGO_SETTINGS_MODULE before you 
call django.setup() inside your main function. However, you also call 
django.setup() on line 4. You need to set DJANGO_SETTINGS_MODULE before the 
first django.setup().

On Wednesday, 25 September 2019 13:04:10 UTC+2, Sahil Sharma wrote:
>
> So I was adding data into the user model that is create using faker 
> library  but i am facing certain error 
>
>  my populatescript screenshot is inserted
>
> [image: 2019-09-24-1569346732_screenshot_1920x1080.jpg]
>   
> here is my user model class
>
> from django.db import models
>
> # Create your models here.
>
> class user(models.Model):
> firstname=models.CharField(max_length=250,unique=False)
> lastname=models.CharField(max_length=250,unique=False)
> emailid=models.CharField(max_length=500,unique=True)
> def __str__(self):
>
> return self.emailid
>
>
>
>
>
>

-- 
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/3ec98288-706a-4038-8e24-3dba76e83c67%40googlegroups.com.


Re: Looking for online shop project

2019-09-25 Thread Tosin Ayoola
Halo I do

On Sep 25, 2019 11:52, "Ram mohan"  wrote:

> Hi everyone,
>
>
> I am looking for online shop shop app if anyone has please share the code.
>
>
> Thanks in advance
> RamamohanReddy
>
> --
> 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/CAERvz%2BhC%2Bwr8R7ZTsDe%3DtEAVwPaWq5YyZFMURf4ZRV__
> HWnNCw%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/CAHLKn71MSXQrEY2eDkv4w%3DB%2BBR5BoHnV%2BBQ6NLU5jUqH-Z0aBw%40mail.gmail.com.


Re: Looking for online shop project

2019-09-25 Thread Andréas Kühne
Hi,

Try this:
http://oscarcommerce.com/

Regards,

Andréas


Den ons 25 sep. 2019 kl 12:52 skrev Ram mohan :

> Hi everyone,
>
>
> I am looking for online shop shop app if anyone has please share the code.
>
>
> Thanks in advance
> RamamohanReddy
>
> --
> 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/CAERvz%2BhC%2Bwr8R7ZTsDe%3DtEAVwPaWq5YyZFMURf4ZRV__HWnNCw%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/CAK4qSCfWJyTAQ%2BzYc8rizpEetvMd%2B-8QXa-1d9H%2BC%3DDwduQNAA%40mail.gmail.com.


Re: Looking for online shop project

2019-09-25 Thread Ram mohan
Can you do it for in sublime text editor


Thanks & regards,
RamamohanReddy.
8524053939

On Wed, 25 Sep, 2019, 6:46 PM Tosin Ayoola,  wrote:

> Halo I do
>
> On Sep 25, 2019 11:52, "Ram mohan"  wrote:
>
>> Hi everyone,
>>
>>
>> I am looking for online shop shop app if anyone has please share the code.
>>
>>
>> Thanks in advance
>> RamamohanReddy
>>
>> --
>> 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/CAERvz%2BhC%2Bwr8R7ZTsDe%3DtEAVwPaWq5YyZFMURf4ZRV__HWnNCw%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/CAHLKn71MSXQrEY2eDkv4w%3DB%2BBR5BoHnV%2BBQ6NLU5jUqH-Z0aBw%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/CAERvz%2BgUwcTixrCVk%3DonuvofBX08bjR6-xW-4Hv1Nfxt%3DD%2BTdA%40mail.gmail.com.


Re: Digest for django-users@googlegroups.com - 25 updates in 10 topics

2019-09-25 Thread Fahad Ahmed
Is there a way to create a thumbnail of video file?

On Wed, 25 Sep 2019, 08:38 ,  wrote:

> django-users@googlegroups.com
> 
>  Google
> Groups
> 
> 
> Topic digest
> View all topics
> 
>
>- Help for building recommendation system in django
><#m_-2971063904977140006_group_thread_0> - 2 Updates
>- list records of another app in another app
><#m_-2971063904977140006_group_thread_1> - 3 Updates
>- Why my replies won't work <#m_-2971063904977140006_group_thread_2> - 1
>Update
>- Virtual Environment error <#m_-2971063904977140006_group_thread_3> - 1
>Update
>- adding data into database <#m_-2971063904977140006_group_thread_4> - 3
>Updates
>- how to use django pagination with sql query and not ORM
><#m_-2971063904977140006_group_thread_5> - 2 Updates
>- convert python 3 to python2 <#m_-2971063904977140006_group_thread_6>
>- 8 Updates
>- [No Subject] <#m_-2971063904977140006_group_thread_7> - 2 Updates
>- Django developer server auto quit when iterate QuerySet in template
><#m_-2971063904977140006_group_thread_8> - 2 Updates
>- django.contrib.auth: Confusion about
>AuthenticationForm.confirm_login_allowed
><#m_-2971063904977140006_group_thread_9> - 1 Update
>
> Help for building recommendation system in django
> 
> TruZillah : Sep 24 07:57PM -0700
>
> try using aws... go to aws.com and sign-up for a free account and used
> the
> Amazon Personalize service... or your can google it and it will take you
> right there
>
> On Monday, September 23, 2019 at 11:48:12 PM UTC-4, Gabriel Araya Garcia
> wrote:
> TruZillah : Sep 24 08:03PM -0700
>
> aws offers a good solution google Amazon Personalize... that will help you
> solve your problem...
>
> On Monday, September 23, 2019 at 11:36:32 PM UTC-4, Mahir Shah wrote:
> Back to top <#m_-2971063904977140006_digest_top>
> list records of another app in another app
> 
> Perceval Maturure : Sep 24 09:09PM +0200
>
> Hi awesome django users
> i want to list model records of App1 in a detail view of App2
> any ideas?
> Regards
>
> --
> *Perceval Maturure*
>
> *083 303 9423*
> Jani Tiainen : Sep 24 11:06PM +0300
>
> Hi.
>
> Just import models and use them?
>
> ti 24. syysk. 2019 klo 22.10 Perceval Maturure 
> kirjoitti:
>
> Paul Barber : Sep 24 07:45PM -0700
>
> I was actually thinking of doing the same thing
>
> On Tuesday, September 24, 2019 at 3:10:46 PM UTC-4, Perceval Maturure
> wrote:
> Back to top <#m_-2971063904977140006_digest_top>
> Why my replies won't work
> 
> TruZillah : Sep 24 07:59PM -0700
>
> i am trying to reply to people question but for some reason it won't go
> through so i am going to see if this post actually goes through
> Back to top <#m_-2971063904977140006_digest_top>
> Virtual Environment error
> 
> yasar arafath Kajamydeen : Sep 24 08:13PM -0700
>
> Dear All,
>
> Actually i forget my virtual environment name. So when i run -- python
> manage.py runserver command its showing error like this .
>
>
> ImportError: Couldn't import Django. Are you sure it's installed and
> available on your PYTHONPATH environment variable? Did you forget to
> activate a virtual environment?
>
>
>
>
> Thanks in Advance.
>
>
> Regards,
> Yasar Arafath K
> Back to top <#m_-2971063904977140006_digest_top>
> adding data into database
> 
> Sahil Sharma : Sep 24 10:42AM -0700
>
> I was running a populate script to fill data in my database but facing
> some
> error
>
> sharing the screenshot
>
> user is a class create in the models.py which contain three fields
> class user(models.Model):
> firstname=models.CharField(max_length=250,unique=False)
> lastname=models.CharField(max_length=250,unique=False)
> emailid=models.CharField(max_length=500,unique=True)
> def __str__(self):
> return self.emailid
>
>
> [image: 2019-09-24-1569346732_screenshot_1920x1080.jpg]
> RONAK JAIN : Sep 24 11:30PM +0530
>
> Hi Sahil,
>
>
> please go to settings.py.
>
>
> *put this in top of settings.py this will configure Django for you*
>
> import os
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", __file__)import django
> django.setup()
>
> Thanks & Regards
>
> RJ
>
>
> On Tue, Sep 24, 2019 at 11:23 P

Multiple user roles with permissions

2019-09-25 Thread Shazia Nusrat
Hi,

I need help to understand implementation of multiple user roles and
permissions on views/templates/objects. If someone can point me to really
nice project at GitHub I will be really thankful. I couldn't find one so
far.

Regards,
Shazia

-- 
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/CAD83tOx6a4hftc9MAGeweDJ%3DfCuTBXSzc9VT8H6tGOZz%3DbuVQw%40mail.gmail.com.


Re: Multiple user roles with permissions

2019-09-25 Thread Shakil Ahmmed
On Wed, Sep 25, 2019 at 8:03 PM Shazia Nusrat  wrote:

> Hi,
>
> I need help to understand implementation of multiple user roles and
> permissions on views/templates/objects. If someone can point me to really
> nice project at GitHub I will be really thankful. I couldn't find one so
> far.
>
> Regards,
> Shazia
>
> --
> 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/CAD83tOx6a4hftc9MAGeweDJ%3DfCuTBXSzc9VT8H6tGOZz%3DbuVQw%40mail.gmail.com
> 
> .
>


-- 

Shakil Ahmmed
about.me/shakilahmmed


-- 
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/CA%2BEpJfzQtfZKhzF9SZFOTc68b2u-J7E%3DYcubeA6reWVLXa-2bg%40mail.gmail.com.


Re: Multiple user roles with permissions

2019-09-25 Thread Aldian Fazrihady
What do you need to clarify regarding this document
https://docs.djangoproject.com/en/2.2/topics/auth/default/#the-permission-required-decorator
 ?

On Wed, Sep 25, 2019 at 9:03 PM Shazia Nusrat  wrote:

> Hi,
>
> I need help to understand implementation of multiple user roles and
> permissions on views/templates/objects. If someone can point me to really
> nice project at GitHub I will be really thankful. I couldn't find one so
> far.
>
> Regards,
> Shazia
>
> --
> 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/CAD83tOx6a4hftc9MAGeweDJ%3DfCuTBXSzc9VT8H6tGOZz%3DbuVQw%40mail.gmail.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAbjcdkLJQtFiFWAvMVPA4XtMTSc1rfESNECYURTwRef0w%40mail.gmail.com.


Re: Regarding to file stronge.

2019-09-25 Thread Deep Sukhwani
Hey Anil,

Django PostgresQL and Django-MySQL have JSONField which allow you to store
JSON formatted data (I am assuming you meant storing JSON data when you
asked *multiple files in  Json format to  store the  database *)

*PostgresQL*:
https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/#jsonfield

*Django-MySQL*:
https://django-mysql.readthedocs.io/en/latest/model_fields/json_field.html#django_mysql.models.JSONField



On Wed, Sep 25, 2019, 16:28 ANIL UMARANE  wrote:

> Hi guys,
> How to store the multiple files in  Json format to  store the  database .
> Easily retrieve and delete.
>
> And how set the path
>
> Regards..
> Anil.K
> Mob:9019094199
>
> --
> 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/CAKfwX9wvcE909kbu79xFt1bcWzfS3u8L%3D6v-5iRQLjYQBk%3D9cw%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/CAEMqiPcdRsnxg4_RTkQpYW8-H2ftas8N%2BFg7BghVWAuHi3cvKg%40mail.gmail.com.


Django Pytest with multiple db including legacy one

2019-09-25 Thread Matthieu Texier
Hi Guys,

Not sure this question is on purpose as not purely Django related … 

I am building a frontend using two databases : one for Django and a legacy 
database my frontend needs to access to (read-only). As such, I do have managed 
models with a Django managed db and unmanaged models in an unmanaged legacy db.

I am now trying to build up unitary testing using pytest for Django. How would 
you configure Pytest such that a test db is created for my Django db but the 
legacy database is just accessed without any sort of database creation and 
model creation ?

I found this documentation : 
https://pytest-django.readthedocs.io/en/latest/database.html#using-an-existing-external-database-for-tests

But it doesn’t really help … 

Thanks for your help,
Matt.

-- 
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/532E2F52-F6DC-4862-96E3-876CAEA09FDA%40gmail.com.


Re: Multiple user roles with permissions

2019-09-25 Thread George Tantiras
I would recommend django-rules:

https://github.com/dfunckt/django-rules



-- 
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/b99b5a2799661d0e418177af6c3c9200a9ec0fc6.camel%40yandex.com.


redirect authenticated user in create view in django

2019-09-25 Thread saeed albooyeh
hi 
i used CreateView for registration in my project and i wanna prevent 
authenticated user from accessing to the register url and redirect it to 
another page 
can anyone tell me how can i do it?

-- 
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/a87cee2c-bfc9-4086-aefd-2342f6b55da7%40googlegroups.com.


ListView and DetailView

2019-09-25 Thread Simona Meli
Hi, I have 2 question:

1. every single django app (of a project) has its tables or can they be 
used for all?
I have a user app with its tables: user, company, tipout, from which to 
extract data with ListView and Detailview. Now I would like to create 
another app in which to manage company data and display them, is it 
possible to take data from user tables (import type)

2. Can I use more ListView and DetailView on different tables but in the 
same app?
example: I have a list and details of each individual user, I can have 
another ListView and DetailView for a different company type table

thank you so much

Simona

-- 
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/9d13e063-5dfa-469b-a470-d931d0e4f4bc%40googlegroups.com.


redirect authenticated user in CreateView

2019-09-25 Thread saeed albooyeh
hi 
i used CreateView for registration in my project and i wanna prevent 
authenticated user from accessing to the register url and redirect it to 
another page 
can anyone tell me how can i do it?

-- 
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/53f16488-e8d6-4992-8446-99a857e5dd5b%40googlegroups.com.


Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Patrick Carra
Hello I have an app that displays some database information in a table.  
Inside of the html template I am making an edit link that I want to open 
another app(page viewLit) while passing a value to it's view.  I have added 
my code below.  My question is I am unsure of how to make this links url 
and pass the object data located inside circuit.circuitid along with it.  I 
haven't been able to find the right way to code this yet and this is just 
how I thought that this should be done. If anyone has a better idea I am 
open to suggestions.

search_custom.html(code for link)
{% for circuit in filter.qs %}


View

{{ circuit.circuitid }}

{% endfor %}

myapp/myapp/urls.py
urlpatterns = [
path('viewLit/', include('viewLit.urls')),
]

myapp/viewLit/urls.py
urlpatterns=[
path('viewLit/circuitid.id', views.viewLit, name='viewLit'),
]

views.py
def viewLit(request, circuitid):
#display records fields here
return HttpResponse("You are at the viewLit page!")

-- 
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/d81bf60a-260c-44c1-9c12-e852b51432a9%40googlegroups.com.


Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Randy Hughes
views.py
class *viewLit*(TemplateView):

def get(self, request, strategy=None):
circuit_id = self.request.query_params.get('circuitid', None)

urls.py

path('viewlit/', viewlit.as_view(), name='viewlit')


search_custom.html


{{ circuit.circuitid }}




''' this is an example using a query parameter
the url in urls.py does not need to include this parameter as a slug

the view is able to get the parameter by key name (the same way you get a
key from a dict)
the tag is formatted to create the url ex (127.0.0.1/foo/) query
parameters are everything following the ?
so as you can do something like this
127.0.0.1/foo/?field1=a&field2=b&field3=c
I am not sure if this is the better than your solution but this should
work. As well you can add a redirect in viewlit to a different page if
circuit_id does not exist.
'''



On Wed, Sep 25, 2019 at 1:09 PM Patrick Carra  wrote:

> Hello I have an app that displays some database information in a table.
> Inside of the html template I am making an edit link that I want to open
> another app(page viewLit) while passing a value to it's view.  I have added
> my code below.  My question is I am unsure of how to make this links url
> and pass the object data located inside circuit.circuitid along with it.  I
> haven't been able to find the right way to code this yet and this is just
> how I thought that this should be done. If anyone has a better idea I am
> open to suggestions.
>
> search_custom.html(code for link)
> {% for circuit in filter.qs %}
> 
> 
> View
> 
> {{ circuit.circuitid }}
> 
> {% endfor %}
>
> myapp/myapp/urls.py
> urlpatterns = [
> path('viewLit/', include('viewLit.urls')),
> ]
>
> myapp/viewLit/urls.py
> urlpatterns=[
> path('viewLit/circuitid.id', views.viewLit, name='viewLit'),
> ]
>
> views.py
> def viewLit(request, circuitid):
> #display records fields here
> return HttpResponse("You are at the viewLit page!")
>
> --
> 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/d81bf60a-260c-44c1-9c12-e852b51432a9%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/CAE_sR8sFWS_rjXZq6JtUTjpz%3Drzauduq%2BTkWwJvNToK5SgxSuA%40mail.gmail.com.


Re: redirect authenticated user in CreateView

2019-09-25 Thread Randy Hughes
from django.shortcuts import HttpResponseRedirect


class ExampleView(TemplateView):
template_name = 'pages/example.html'

def get(self, request):
if not request.user.is_authenticated:
return HttpResponseRedirect('login')

On Wed, Sep 25, 2019 at 1:09 PM saeed albooyeh 
wrote:

> hi
> i used CreateView for registration in my project and i wanna prevent
> authenticated user from accessing to the register url and redirect it to
> another page
> can anyone tell me how can i do it?
>
> --
> 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/53f16488-e8d6-4992-8446-99a857e5dd5b%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/CAE_sR8vRvbbT6qW5N6MgX%2BB8cCVv9aXLfdJmQyR8YGkZj%3DhyvA%40mail.gmail.com.


Re: Multiple user roles with permissions

2019-09-25 Thread Shazia Nusrat
I just needed a working example of added permissions system in a project I
can run.
Django-rules is good and I've tried it in my test-project. I was hoping a
project with bunch of user types and assigned permissions hardcoded.
I know I can do things from default admin dashboard.

Regards,

Shazia

On Wed, Sep 25, 2019 at 10:08 AM George Tantiras 
wrote:

> I would recommend django-rules:
>
> https://github.com/dfunckt/django-rules
>
>
>
> --
> 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/b99b5a2799661d0e418177af6c3c9200a9ec0fc6.camel%40yandex.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/CAD83tOwB9XELzrjA5tQOYRUy1-wBgZ5RaHLP%2Btmb6SecWCEB2w%40mail.gmail.com.


Re: ModuleNotFoundError: No module named :

2019-09-25 Thread MEGA NATHAN
hi.

populate script error in line 12




*Regards*
Meganathan G



On Wed, Sep 25, 2019 at 9:57 AM Abu Yusuf 
wrote:

> share your full project here.
>
> On Tue, Sep 24, 2019 at 10:43 PM MEGA NATHAN 
> wrote:
>
>>
>>
>> Hi.
>>  again i change and run but same problem coming 
>>
>>
>>
>> *Regards*
>> Meganathan G
>>
>>
>>
>> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
>> wrote:
>>
>>> Error in admin.py. So same here in admin.py.
>>>
>>> Before starting a django project, try to understand the architecture of
>>> it and the working flow of it.
>>> Otherwise, you can't go long away.
>>> Best Wishes,
>>>
>>> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
>>> wrote:
>>>
 In your views.py:
 from .models import users

 That's it.

 On Tue, Sep 24, 2019 at 10:13 AM Deep Sukhwani 
 wrote:

> Are you supposed to be using a virtualenv and you don't have that
> activated?
>
> Can you run *pip freeze | grep -i django* and share the output?
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Tue, 24 Sep 2019 at 09:40, MEGA NATHAN 
> wrote:
>
>> Hi.
>>
>>
>> i 'm meganathan from india i was doing django trining ,
>>
>> And i have one dout .mo module name found models
>>
>> *ModuleNotFoundError: No module named 'django.models'*
>>
>>
>>
>>
>>
>> *Regards*
>> *Meganathan,*
>>
>> --
>> 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/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%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/CAEMqiPe7rf4syuVUTEZVO%2BOMh7K-cvGX_yLsL0vhchNbTTfATw%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/CACNsr2-bU6cCHuthEizB4ZB45UcTns3c-wERXqmbo36upa7Ksw%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/CAEvDBLeWLN4%3DpQSBA8AkoLQF5ByWXvcScZJznL__6kQR20UAfg%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/CACNsr2-GJBUAZs7hhe6JhTnXQOO7zdrivNygQp%3DR78%2Bdb9UP0w%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/CAEvDBLcCVNnQHS9Q8AMF%2B17Mn%3DYZLdbwgT9sQaXi%2BfHGK6UCtQ%40mail.gmail.com.


Re: ModuleNotFoundError: No module named :

2019-09-25 Thread Rahul Roshan
You have created a model named as "user" in models.py while you are
importing model "User" in views.py. Importing model "user" will fix the
issue.


Thanks,
Rahul

On Thu, Sep 26, 2019 at 9:09 AM MEGA NATHAN 
wrote:

>
> hi.
>
> populate script error in line 12
>
>
>
>
> *Regards*
> Meganathan G
>
>
>
> On Wed, Sep 25, 2019 at 9:57 AM Abu Yusuf 
> wrote:
>
>> share your full project here.
>>
>> On Tue, Sep 24, 2019 at 10:43 PM MEGA NATHAN 
>> wrote:
>>
>>>
>>>
>>> Hi.
>>>  again i change and run but same problem coming 
>>>
>>>
>>>
>>> *Regards*
>>> Meganathan G
>>>
>>>
>>>
>>> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
>>> wrote:
>>>
 Error in admin.py. So same here in admin.py.

 Before starting a django project, try to understand the architecture of
 it and the working flow of it.
 Otherwise, you can't go long away.
 Best Wishes,

 On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
 wrote:

> In your views.py:
> from .models import users
>
> That's it.
>
> On Tue, Sep 24, 2019 at 10:13 AM Deep Sukhwani 
> wrote:
>
>> Are you supposed to be using a virtualenv and you don't have that
>> activated?
>>
>> Can you run *pip freeze | grep -i django* and share the output?
>>
>> --
>> Regards
>> Deep L Sukhwani
>>
>>
>> On Tue, 24 Sep 2019 at 09:40, MEGA NATHAN 
>> wrote:
>>
>>> Hi.
>>>
>>>
>>> i 'm meganathan from india i was doing django trining ,
>>>
>>> And i have one dout .mo module name found models
>>>
>>> *ModuleNotFoundError: No module named 'django.models'*
>>>
>>>
>>>
>>>
>>>
>>> *Regards*
>>> *Meganathan,*
>>>
>>> --
>>> 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/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%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/CAEMqiPe7rf4syuVUTEZVO%2BOMh7K-cvGX_yLsL0vhchNbTTfATw%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/CACNsr2-bU6cCHuthEizB4ZB45UcTns3c-wERXqmbo36upa7Ksw%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/CAEvDBLeWLN4%3DpQSBA8AkoLQF5ByWXvcScZJznL__6kQR20UAfg%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/CACNsr2-GJBUAZs7hhe6JhTnXQOO7zdrivNygQp%3DR78%2Bdb9UP0w%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-