Re: Regarding the Django ImportError Issue

2023-09-07 Thread Ferney Bermeo Ruiz
Hello, the same thing happened to me, the solution was to install at least 
django... if you have a project under development, it is best to install 
the file requirements.txt with pip. within your virtual environment. 
Greetings and success :)

El viernes, 25 de agosto de 2023 a las 13:48:17 UTC-5, ivan harold escribió:

> I think it is better if you reply to the specific thread that has this 
> issue. So that the concerned person will be able to see your reply 
> immediately.
>
> On Saturday, August 26, 2023 at 1:29:58 AM UTC+8 abhijeet tripathi wrote:
>
>>
>>
>> Hello,
>>
>> I hope this message finds you well. I wanted to let you know that I've 
>> taken a look at the error message you shared:
>>
>> ```
>> Aug 25 12:28:30 AM  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?
>> Aug 25 12:28:30 AM  ==> Build failed
>> ```
>>
>> To better assist you in resolving this issue, could you kindly provide me 
>> with some additional details? This information will help me gain a clearer 
>> understanding of your setup and the potential causes of the error:
>>
>> 1. **Operating System:** Please let me know the operating system you're 
>> using (e.g., Windows, macOS, Linux).
>>
>> 2. **Python Version:** What version of Python is installed on your 
>> system? You can find this information by running the command `python 
>> --version` in your terminal.
>>
>> 3. **Virtual Environment:** Are you working within a virtual environment? 
>> If so, have you activated the virtual environment before attempting to run 
>> the project?
>>
>> 4. **Project Configuration:** Could you share any relevant configuration 
>> details related to your project setup? This could include how your project 
>> is structured and any configuration files that may be relevant.
>>
>> 5. **Django Installation:** Confirm whether Django is installed in your 
>> virtual environment. You can use the command `pip show django` to check its 
>> status.
>>
>> 6. **PYTHONPATH:** If you've made any modifications to the PYTHONPATH 
>> environment variable, please share the details of those changes.
>>
>> 7. **Build Process:** Briefly describe the steps you take leading up to 
>> encountering the error. This could include any commands you run or actions 
>> you perform.
>>
>> By providing these details, I'll be able to narrow down the potential 
>> causes of the ImportError and offer more precise guidance to help you 
>> resolve it.
>>
>> Thank you for your cooperation. I look forward to receiving more 
>> information from you so that we can work together to address this issue 
>> effectively.
>>
>> Best regards,
>> [Abhijit]
>>
>

-- 
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/26841f5c-b7f7-47e0-aa59-12afbbd73b45n%40googlegroups.com.


Re: Regarding the Django ImportError Issue

2023-08-25 Thread ivan harold
I think it is better if you reply to the specific thread that has this 
issue. So that the concerned person will be able to see your reply 
immediately.

On Saturday, August 26, 2023 at 1:29:58 AM UTC+8 abhijeet tripathi wrote:

>
>
> Hello,
>
> I hope this message finds you well. I wanted to let you know that I've 
> taken a look at the error message you shared:
>
> ```
> Aug 25 12:28:30 AM  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?
> Aug 25 12:28:30 AM  ==> Build failed
> ```
>
> To better assist you in resolving this issue, could you kindly provide me 
> with some additional details? This information will help me gain a clearer 
> understanding of your setup and the potential causes of the error:
>
> 1. **Operating System:** Please let me know the operating system you're 
> using (e.g., Windows, macOS, Linux).
>
> 2. **Python Version:** What version of Python is installed on your system? 
> You can find this information by running the command `python --version` in 
> your terminal.
>
> 3. **Virtual Environment:** Are you working within a virtual environment? 
> If so, have you activated the virtual environment before attempting to run 
> the project?
>
> 4. **Project Configuration:** Could you share any relevant configuration 
> details related to your project setup? This could include how your project 
> is structured and any configuration files that may be relevant.
>
> 5. **Django Installation:** Confirm whether Django is installed in your 
> virtual environment. You can use the command `pip show django` to check its 
> status.
>
> 6. **PYTHONPATH:** If you've made any modifications to the PYTHONPATH 
> environment variable, please share the details of those changes.
>
> 7. **Build Process:** Briefly describe the steps you take leading up to 
> encountering the error. This could include any commands you run or actions 
> you perform.
>
> By providing these details, I'll be able to narrow down the potential 
> causes of the ImportError and offer more precise guidance to help you 
> resolve it.
>
> Thank you for your cooperation. I look forward to receiving more 
> information from you so that we can work together to address this issue 
> effectively.
>
> Best regards,
> [Abhijit]
>

-- 
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/4f27972f-7831-49e9-b74d-14312b268820n%40googlegroups.com.


Regarding the Django ImportError Issue

2023-08-25 Thread abhijeet tripathi
Hello,

I hope this message finds you well. I wanted to let you know that I've
taken a look at the error message you shared:

```
Aug 25 12:28:30 AM  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?
Aug 25 12:28:30 AM  ==> Build failed
```

To better assist you in resolving this issue, could you kindly provide me
with some additional details? This information will help me gain a clearer
understanding of your setup and the potential causes of the error:

1. **Operating System:** Please let me know the operating system you're
using (e.g., Windows, macOS, Linux).

2. **Python Version:** What version of Python is installed on your system?
You can find this information by running the command `python --version` in
your terminal.

3. **Virtual Environment:** Are you working within a virtual environment?
If so, have you activated the virtual environment before attempting to run
the project?

4. **Project Configuration:** Could you share any relevant configuration
details related to your project setup? This could include how your project
is structured and any configuration files that may be relevant.

5. **Django Installation:** Confirm whether Django is installed in your
virtual environment. You can use the command `pip show django` to check its
status.

6. **PYTHONPATH:** If you've made any modifications to the PYTHONPATH
environment variable, please share the details of those changes.

7. **Build Process:** Briefly describe the steps you take leading up to
encountering the error. This could include any commands you run or actions
you perform.

By providing these details, I'll be able to narrow down the potential
causes of the ImportError and offer more precise guidance to help you
resolve it.

Thank you for your cooperation. I look forward to receiving more
information from you so that we can work together to address this issue
effectively.

Best regards,
[Abhijit]

-- 
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/CAD7R6_2ot0ZecpYQRZf_DVQ%3D8bqWO-aY%2BqHysKj_P8vq9um6Cw%40mail.gmail.com.


Re: ImportError:

2022-12-23 Thread Raeesh Rayeen
ImportError: cannot import name 'views' from 'it_training_platform'

for the above error please write like that:

import app_name from views

note:
 we have two things project name and app_name when we are creating
Django project
  That app_name import.

Thanks




On Fri, 23 Dec 2022 at 20:58, 'Kasper Laudrup' via Django users <
django-users@googlegroups.com> wrote:

> On 23/12/2022 12.36, JOSEPH OCHELEBE O. wrote:
> > Am getting this errors bellow when i tried to run my Django project
> >
> >      from . import views
> > ImportError: cannot import name 'views' from 'it_training_platform'
> > (C:\Users\Dreams
> >
> Reality\Desktop\Django-project\it_training_platform\it_training_platform\__init__.py)
> >
>
> This will guide you in the right direction:
>
> https://www.propublica.org/nerds/how-to-ask-programming-questions
>
> Kind regards,
> Kasper Laudrup
>
> --
> 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/fb21bd74-5eb8-d331-ad97-b1ca1e1d94c1%40stacktrace.dk
> .
>

-- 
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/CAL_Ry1CZ5xT34sCCZ7L3Wi9eNw9rQwn7x5Eez963jp_Nt-sXpg%40mail.gmail.com.


Re: ImportError:

2022-12-23 Thread 'Kasper Laudrup' via Django users

On 23/12/2022 12.36, JOSEPH OCHELEBE O. wrote:

Am getting this errors bellow when i tried to run my Django project

     from . import views
ImportError: cannot import name 'views' from 'it_training_platform' 
(C:\Users\Dreams 
Reality\Desktop\Django-project\it_training_platform\it_training_platform\__init__.py)




This will guide you in the right direction:

https://www.propublica.org/nerds/how-to-ask-programming-questions

Kind regards,
Kasper Laudrup

--
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/fb21bd74-5eb8-d331-ad97-b1ca1e1d94c1%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


ImportError:

2022-12-23 Thread JOSEPH OCHELEBE O.
Am getting this errors bellow when i tried to run my Django project


from . import views
ImportError: cannot import name 'views' from 'it_training_platform' 
(C:\Users\Dreams 
Reality\Desktop\Django-project\it_training_platform\it_training_platform\__init__.py)

-- 
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/b2df5f79-5731-40fa-a0f1-a434f170ee4bn%40googlegroups.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Luqman Lawal
Okay

On Thu, Sep 1, 2022, 4:21 PM Ashish Rawat 
wrote:

> There is error in line number 3 you are importing the module from restapi
> but you should take that from model
>
> On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari  wrote:
>
>> Can anyone explain this error?
>>
>> --
>> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CAJf3Dr%2Bipj0t3zXoA3C1D-FF%3DCe0BvJH-Xd1OWneYF9e%2B1Pu%2Bg%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/CAHj0e%2BT2H2KOiPFv%3DN2w%2BrJrvmfCoSvErqbwD6%3DK%3Dcm3jUXWZQ%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread M Adnan
>From webapp.models import employee

On Thu, 1 Sep 2022, 7:02 pm Pooja Kumari,  wrote:

> Can anyone explain this error?
>
> --
> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CABNyTSqR989ABXXJj3T0iZaH595Vk31hmUR2NiJOSyyOZeBrZw%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Shams Ulhaq
>From . models import employees
Then use in serializer

On Thu, 1 Sep 2022, 19:02 Pooja Kumari,  wrote:

> Can anyone explain this error?
>
> --
> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CACbcXAVj1R83-VmWJ6m%3DT2VL8Lu8R%3D8T0kpx03NrCbnxexAL2g%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Pooja Kumari
Understood.
Thank you very much

On Thu, Sep 1, 2022, 7:45 PM MAHESH KUMAR 
wrote:

> You can write  your serializers in 3rd line
>
> From .models import employees
>
> Thanks,
> Mahesh
>
> On Thu, Sep 1, 2022, 19:30 Pooja Kumari  wrote:
>
>> Can anyone explain this error?
>>
>> --
>> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CAPvC_H847-a5M3fdmTmWRT%2BU3ZESG-RqHDA3h6JBQXnGFe0a_w%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/CAHYvwbVQ4Rywj-N0E4H%2Bnk9c8C1pNYkwWESBx2aAvo%2B29sRpAQ%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread subin
Thanks again for the info.

On Thu, Sep 1, 2022 at 4:21 PM Ashish Rawat 
wrote:

> There is error in line number 3 you are importing the module from restapi
> but you should take that from model
>
> On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari  wrote:
>
>> Can anyone explain this error?
>>
>> --
>> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CAJf3Dr%2Bipj0t3zXoA3C1D-FF%3DCe0BvJH-Xd1OWneYF9e%2B1Pu%2Bg%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/CAJnMy6ePf1VWGFTJgXr4mEHbm78AJMC6PoWVB98zbQL_KpDoaQ%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Ashish Rawat
There is error in line number 3 you are importing the module from restapi
but you should take that from model

On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari  wrote:

> Can anyone explain this error?
>
> --
> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CAJf3Dr%2Bipj0t3zXoA3C1D-FF%3DCe0BvJH-Xd1OWneYF9e%2B1Pu%2Bg%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Akash Kundoo
>From where you're importing employees? Check that?

On Thu, 1 Sep, 2022, 7:31 pm Pooja Kumari,  wrote:

> Can anyone explain this error?
>
> --
> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CACTgikHJx6PUikfv6apyxe0suW%3D9tZNZCNy-0A%3D%3DXBv6%3DR2FyA%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread MAHESH KUMAR
You can write  your serializers in 3rd line

>From .models import employees

Thanks,
Mahesh

On Thu, Sep 1, 2022, 19:30 Pooja Kumari  wrote:

> Can anyone explain this error?
>
> --
> 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/2920648e-f12c-4e26-a089-59a196fd653an%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/CAPvC_H847-a5M3fdmTmWRT%2BU3ZESG-RqHDA3h6JBQXnGFe0a_w%40mail.gmail.com.


Re: Please help. ImportError with django 3.1

2021-01-05 Thread Steven Mapes
Do you have a function in the hello/views.py? That's the first place to 
start as the error suggests you do not.
 

On Monday, 4 January 2021 at 14:39:32 UTC joshr...@gmail.com wrote:

> hello is ur app name if so
> from hello import views 
> try this 
> if not be clear what is hello,index
>
> On Mon, Jan 4, 2021 at 4:24 PM Gasar Iyali  wrote:
>
>> Hi
>> Please I need your help.
>> I have just installed django and when I try to run django I get this 
>> error message and nothing comes up in my browser.
>> This is the error message that I get in the command prompt
>>
>> !*<<<(env) C:\Users\Documents\Learn 
>> Python\django\my_django_work\my_django_work\urls.py", line 19, in 
>> from hello.views import index
>> ImportError: cannot import name 'index' from 'hello.views'>>>!!
>>
>> Thank 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/60b7ffc6-88d0-4057-b61c-6885ebdefb23n%40googlegroups.com.


Re: Please help. ImportError with django 3.1

2021-01-04 Thread Mr. X Offencer
why are you using
*from hello.views import index*

instead of
*from . import views*

On Mon, Jan 4, 2021 at 6:54 PM Gasar Iyali  wrote:

> Hi
> Please I need your help.
> I have just installed django and when I try to run django I get this error
> message and nothing comes up in my browser.
> This is the error message that I get in the command prompt
>
> !*<<<(env) C:\Users\Documents\Learn
> Python\django\my_django_work\my_django_work\urls.py", line 19, in 
> from hello.views import index
> ImportError: cannot import name 'index' from 'hello.views'>>>!!
>
> Thank 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CABz7kDRBfCJ05Xic3Qg01EUbxhpWmMmYOtpB0ZvOyGTkG8gH4Q%40mail.gmail.com.


Re: Please help. ImportError with django 3.1

2021-01-04 Thread Josh Raj
hello is ur app name if so
from hello import views
try this
if not be clear what is hello,index

On Mon, Jan 4, 2021 at 4:24 PM Gasar Iyali  wrote:

> Hi
> Please I need your help.
> I have just installed django and when I try to run django I get this error
> message and nothing comes up in my browser.
> This is the error message that I get in the command prompt
>
> !*<<<(env) C:\Users\Documents\Learn
> Python\django\my_django_work\my_django_work\urls.py", line 19, in 
> from hello.views import index
> ImportError: cannot import name 'index' from 'hello.views'>>>!!
>
> Thank 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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%2B3XbN7-MLGSiAey1%3DJo_qRRX3B-3SGsjbnkixMobTk%2BhSf-mQ%40mail.gmail.com.


Please help. ImportError with django 3.1

2021-01-04 Thread Gasar Iyali
Hi
Please I need your help.
I have just installed django and when I try to run django I get this error 
message and nothing comes up in my browser.
This is the error message that I get in the command prompt

!*<<<(env) C:\Users\Documents\Learn 
Python\django\my_django_work\my_django_work\urls.py", line 19, in 
from hello.views import index
ImportError: cannot import name 'index' from 'hello.views'>>>!!

Thank 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com.


Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
py
>>>>>>functions.py
>>>>>>models.py
>>>>>>   urls.py
>>>>>>   views.py
>>>>>>
>>>>>> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum <
>>>>>> sali...@rohteksolutions.com> wrote:
>>>>>>
>>>>>>> Hi  @Akinfolarin Stephen,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>>>>>>> akinfolar...@gmail.com> wrote:
>>>>>>>
>>>>>>>> First I will like you to tell me the folder where test.py is and
>>>>>>>> views.py
>>>>>>>>
>>>>>>>> On Fri, Oct 16, 2020, 06:27 Salima Begum <
>>>>>>>> sali...@rohteksolutions.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> I have written test case for views for details page. Here is below
>>>>>>>>> code I have written
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> from django.test import RequestFactory
>>>>>>>>> from django.urls import reverse
>>>>>>>>> from django.contrib.auth.models import User
>>>>>>>>> from pages.models import vk_customer
>>>>>>>>> from mixer.backend.django import mixer
>>>>>>>>> import pytest
>>>>>>>>>
>>>>>>>>> from pages.views import ProductDetails
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> @pytest.mark.django_db
>>>>>>>>> class TestViews:
>>>>>>>>>
>>>>>>>>> def test_product_detail_authenticated(self):
>>>>>>>>> mixer.blend('pages.vk_master_table')
>>>>>>>>> path = reverse('detail', kwargs={'pk': 1516})
>>>>>>>>> request = RequestFactory().get(path)
>>>>>>>>> request.user = mixer.blend(vk_customer)
>>>>>>>>>
>>>>>>>>> response = ProductDetails(request, pk=1516)
>>>>>>>>> print(response)
>>>>>>>>> assert response.status_code == 200
>>>>>>>>> ```
>>>>>>>>> *This the error i am getting.*
>>>>>>>>>  ERROR
>>>>>>>>> collecting pages/tests/test_views.py
>>>>>>>>> 
>>>>>>>>> ImportError while importing test module
>>>>>>>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>>>>>>>> Hint: make sure your test modules/packages have valid Python names.
>>>>>>>>> Traceback:
>>>>>>>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>>>>>>>> in import_module
>>>>>>>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>>>>>>> pages\tests\test_views.py:8: in 
>>>>>>>>> from pages.views import ProductDetails
>>>>>>>>> E   ImportError: cannot import name 'ProductDetails' from
>>>>>>>>> 'pages.views' (H:\vikreya\mysite\pages\views.py)
>>>>>>>>>
>>>>>>>>> Please help me out to solve this error,
>>>>>>>>>
>>>>>>>>> Thank you,
>>>>>>>>> ~Salima
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "Django users" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to django-users...@googlegroups.com.
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/d/msgid/django-users/CAMSz6b

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Shahprogrammer
t;>>>> Hi  @Akinfolarin Stephen,
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>>>>>> akinfolar...@gmail.com> wrote:
>>>>>>
>>>>>>> First I will like you to tell me the folder where test.py is and 
>>>>>>> views.py
>>>>>>>
>>>>>>> On Fri, Oct 16, 2020, 06:27 Salima Begum <
>>>>>>> sali...@rohteksolutions.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I have written test case for views for details page. Here is below 
>>>>>>>> code I have written 
>>>>>>>>
>>>>>>>> ```
>>>>>>>> from django.test import RequestFactory
>>>>>>>> from django.urls import reverse
>>>>>>>> from django.contrib.auth.models import User
>>>>>>>> from pages.models import vk_customer
>>>>>>>> from mixer.backend.django import mixer
>>>>>>>> import pytest
>>>>>>>>
>>>>>>>> from pages.views import ProductDetails
>>>>>>>>
>>>>>>>>
>>>>>>>> @pytest.mark.django_db
>>>>>>>> class TestViews:
>>>>>>>>
>>>>>>>> def test_product_detail_authenticated(self):
>>>>>>>> mixer.blend('pages.vk_master_table')
>>>>>>>> path = reverse('detail', kwargs={'pk': 1516})
>>>>>>>> request = RequestFactory().get(path)
>>>>>>>> request.user = mixer.blend(vk_customer)
>>>>>>>>
>>>>>>>> response = ProductDetails(request, pk=1516)
>>>>>>>> print(response)
>>>>>>>> assert response.status_code == 200
>>>>>>>> ```
>>>>>>>> *This the error i am getting.*
>>>>>>>>  ERROR 
>>>>>>>> collecting pages/tests/test_views.py 
>>>>>>>> 
>>>>>>>> ImportError while importing test module 
>>>>>>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>>>>>>> Hint: make sure your test modules/packages have valid Python names.
>>>>>>>> Traceback:
>>>>>>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>>>>>>>  
>>>>>>>> in import_module
>>>>>>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>>>>>> pages\tests\test_views.py:8: in 
>>>>>>>> from pages.views import ProductDetails
>>>>>>>> E   ImportError: cannot import name 'ProductDetails' from 
>>>>>>>> 'pages.views' (H:\vikreya\mysite\pages\views.py)
>>>>>>>>
>>>>>>>> Please help me out to solve this error,
>>>>>>>>
>>>>>>>> Thank you,
>>>>>>>> ~Salima
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "Django users" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to django-users...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Django users" group.
>>>>>>> To unsubscribe from this group and

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
Inside pages folder I already have views.py

Thanks
~salima

On Fri, Oct 16, 2020 at 1:28 PM Akinfolarin Stephen <
akinfolarinsteph...@gmail.com> wrote:

> The problem is you are trying to import views from where you have not
> created it I guess the page is  a folder then create the views.py inside of
> it
>
> On Fri, Oct 16, 2020, 08:10 Salima Begum 
> wrote:
>
>> urls.py
>>
>>  path('ProductDetails/', views.onClickSearch.ProductDetails,
>> name='ProductDetails'),
>>
>> views.py
>>
>>
>> class onClickSearch():
>>
>> def ProductDetails(request, id):
>> try:
>> email = request.session.get('email')
>> proddtls = vk_master_table.objects.filter(id=id).first()
>> if proddtls:
>> banners = Extras().bestDeals_cat(proddtls.category_desc)
>>
>> # print(banners.product_name)
>> except Exception as e:
>> logging.error(e)
>> return render(request, "ProductDetails.html", {'error':
>> error, 'form': HomeForm(),
>>'time':
>> settings.SESSION_IDLE_TIMEOUT,
>>'name':
>> first_last_initial(email),
>>'msg_count':
>> msg_count_cl(email),
>>'fullname':
>> fullname(email), 'ProductDetails': proddtls,
>>'signinForm':
>> SigninForm(), 'signupForm': CustomerForm()})
>> return render(request, "ProductDetails.html", {'ProductDetails':
>> proddtls, 'fbanners': banners,
>>'form':
>> HomeForm(), 'signinForm': SigninForm(),
>>'name':
>> first_last_initial(email),
>>'msg_count':
>> msg_count_cl(email),
>>'fullname':
>> fullname(email),
>>'time':
>> settings.SESSION_IDLE_TIMEOUT,
>>'signupForm':
>> CustomerForm()})
>>
>>
>>
>>
>> On Fri, Oct 16, 2020 at 12:32 PM Dhwanil Shah 
>> wrote:
>>
>>> Can you post your views.py code
>>>
>>> On Fri, 16 Oct 2020 at 12:26, Salima Begum 
>>> wrote:
>>>
>>>> Hi all,
>>>> vikreya
>>>> mysite
>>>> .cache
>>>> .idea
>>>>.pytest_cache
>>>> logs
>>>> media
>>>> mysite
>>>> __init__.py
>>>>manage.py
>>>>settings.py
>>>>urls.py
>>>>wsgi.py
>>>>  pages
>>>> .cache
>>>> migrations
>>>> static
>>>> templates
>>>> tests
>>>> test_views.py
>>>>__init__.py
>>>> admin.py
>>>> apps.py
>>>> cron.py
>>>> Forms.py
>>>>functions.py
>>>>models.py
>>>>   urls.py
>>>>   views.py
>>>>
>>>> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum <
>>>> salim...@rohteksolutions.com> wrote:
>>>>
>>>>> Hi  @Akinfolarin Stephen,
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>>>>> akinfolarinsteph...@gmail.com> wrote:
>>>>>
>>>>>> First I will like you to tell me the folder where test.py is and
>>>>>> views.py
>>>>>>
>>>>>> On Fri, Oct 16, 2020, 06:27 Salima Begum <
>>>>>> salim...@rohteksolutions.com> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I have written test case for views for details page. Here is below
>>>>>>> code I have written
>>>>>>>
>>>>>>> ```
>>>>>>> from django.test import RequestFactor

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Akinfolarin Stephen
The problem is you are trying to import views from where you have not
created it I guess the page is  a folder then create the views.py inside of
it

On Fri, Oct 16, 2020, 08:10 Salima Begum 
wrote:

> urls.py
>
>  path('ProductDetails/', views.onClickSearch.ProductDetails,
> name='ProductDetails'),
>
> views.py
>
>
> class onClickSearch():
>
> def ProductDetails(request, id):
> try:
> email = request.session.get('email')
> proddtls = vk_master_table.objects.filter(id=id).first()
> if proddtls:
> banners = Extras().bestDeals_cat(proddtls.category_desc)
>
> # print(banners.product_name)
> except Exception as e:
> logging.error(e)
> return render(request, "ProductDetails.html", {'error': error,
> 'form': HomeForm(),
>'time':
> settings.SESSION_IDLE_TIMEOUT,
>'name':
> first_last_initial(email),
>'msg_count':
> msg_count_cl(email),
>'fullname':
> fullname(email), 'ProductDetails': proddtls,
>'signinForm':
> SigninForm(), 'signupForm': CustomerForm()})
> return render(request, "ProductDetails.html", {'ProductDetails':
> proddtls, 'fbanners': banners,
>'form': HomeForm(),
> 'signinForm': SigninForm(),
>'name':
> first_last_initial(email),
>'msg_count':
> msg_count_cl(email),
>'fullname':
> fullname(email),
>'time':
> settings.SESSION_IDLE_TIMEOUT,
>'signupForm':
> CustomerForm()})
>
>
>
>
> On Fri, Oct 16, 2020 at 12:32 PM Dhwanil Shah  wrote:
>
>> Can you post your views.py code
>>
>> On Fri, 16 Oct 2020 at 12:26, Salima Begum 
>> wrote:
>>
>>> Hi all,
>>> vikreya
>>> mysite
>>> .cache
>>> .idea
>>>.pytest_cache
>>> logs
>>> media
>>> mysite
>>> __init__.py
>>>manage.py
>>>settings.py
>>>urls.py
>>>wsgi.py
>>>  pages
>>> .cache
>>> migrations
>>> static
>>> templates
>>> tests
>>> test_views.py
>>>__init__.py
>>> admin.py
>>> apps.py
>>> cron.py
>>> Forms.py
>>>functions.py
>>>models.py
>>>   urls.py
>>>   views.py
>>>
>>> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum <
>>> salim...@rohteksolutions.com> wrote:
>>>
>>>> Hi  @Akinfolarin Stephen,
>>>>
>>>>
>>>>
>>>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>>>> akinfolarinsteph...@gmail.com> wrote:
>>>>
>>>>> First I will like you to tell me the folder where test.py is and
>>>>> views.py
>>>>>
>>>>> On Fri, Oct 16, 2020, 06:27 Salima Begum 
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I have written test case for views for details page. Here is below
>>>>>> code I have written
>>>>>>
>>>>>> ```
>>>>>> from django.test import RequestFactory
>>>>>> from django.urls import reverse
>>>>>> from django.contrib.auth.models import User
>>>>>> from pages.models import vk_customer
>>>>>> from mixer.backend.django import mixer
>>>>>> import pytest
>>>>>>
>>>>>> from pages.views import ProductDetails
>>>>>>
>>>>>>
>>>>>> @pytest.mark.django_db
>>>>>> class TestViews:
>>>>>>
>>>>>> def test_product_detail_authenticated(self):
>>>>>> mixer.blend('pages.vk_maste

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
urls.py

 path('ProductDetails/', views.onClickSearch.ProductDetails,
name='ProductDetails'),

views.py


class onClickSearch():

def ProductDetails(request, id):
try:
email = request.session.get('email')
proddtls = vk_master_table.objects.filter(id=id).first()
if proddtls:
banners = Extras().bestDeals_cat(proddtls.category_desc)

# print(banners.product_name)
except Exception as e:
logging.error(e)
return render(request, "ProductDetails.html", {'error': error,
'form': HomeForm(),
   'time':
settings.SESSION_IDLE_TIMEOUT,
   'name':
first_last_initial(email),
   'msg_count':
msg_count_cl(email),
   'fullname':
fullname(email), 'ProductDetails': proddtls,
   'signinForm':
SigninForm(), 'signupForm': CustomerForm()})
return render(request, "ProductDetails.html", {'ProductDetails':
proddtls, 'fbanners': banners,
   'form': HomeForm(),
'signinForm': SigninForm(),
   'name':
first_last_initial(email),
   'msg_count':
msg_count_cl(email),
   'fullname':
fullname(email),
   'time':
settings.SESSION_IDLE_TIMEOUT,
   'signupForm':
CustomerForm()})




On Fri, Oct 16, 2020 at 12:32 PM Dhwanil Shah  wrote:

> Can you post your views.py code
>
> On Fri, 16 Oct 2020 at 12:26, Salima Begum 
> wrote:
>
>> Hi all,
>> vikreya
>> mysite
>> .cache
>> .idea
>>.pytest_cache
>> logs
>> media
>> mysite
>> __init__.py
>>manage.py
>>settings.py
>>urls.py
>>wsgi.py
>>  pages
>> .cache
>> migrations
>> static
>> templates
>> tests
>> test_views.py
>>__init__.py
>> admin.py
>> apps.py
>> cron.py
>> Forms.py
>>functions.py
>>models.py
>>   urls.py
>>   views.py
>>
>> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum <
>> salim...@rohteksolutions.com> wrote:
>>
>>> Hi  @Akinfolarin Stephen,
>>>
>>>
>>>
>>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>>> akinfolarinsteph...@gmail.com> wrote:
>>>
>>>> First I will like you to tell me the folder where test.py is and
>>>> views.py
>>>>
>>>> On Fri, Oct 16, 2020, 06:27 Salima Begum 
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have written test case for views for details page. Here is below
>>>>> code I have written
>>>>>
>>>>> ```
>>>>> from django.test import RequestFactory
>>>>> from django.urls import reverse
>>>>> from django.contrib.auth.models import User
>>>>> from pages.models import vk_customer
>>>>> from mixer.backend.django import mixer
>>>>> import pytest
>>>>>
>>>>> from pages.views import ProductDetails
>>>>>
>>>>>
>>>>> @pytest.mark.django_db
>>>>> class TestViews:
>>>>>
>>>>> def test_product_detail_authenticated(self):
>>>>> mixer.blend('pages.vk_master_table')
>>>>> path = reverse('detail', kwargs={'pk': 1516})
>>>>> request = RequestFactory().get(path)
>>>>> request.user = mixer.blend(vk_customer)
>>>>>
>>>>> response = ProductDetails(request, pk=1516)
>>>>> print(response)
>>>>> assert response.status_code == 200
>>>>> ```
>>>>> *This the error i am getting.*
>>>>>  ERROR
>>>>> collecting pages/tests/test_views.py
>>>>> 
>>>>&g

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Shahprogrammer
Can you post your code of views.py

On Friday, 16 October, 2020 at 12:27:19 pm UTC+5:30 
sali...@rohteksolutions.com wrote:

> Hi all,
> vikreya
> mysite
> .cache
> .idea
>.pytest_cache
> logs
> media
> mysite
>
> __init__.py
>manage.py
>settings.py
>urls.py
>wsgi.py
>  pages
> .cache
> migrations
> static
> templates
> tests
> test_views.py
>__init__.py 
> admin.py
> apps.py
> cron.py
> Forms.py
>functions.py
>models.py
>   urls.py
>   views.py
>
> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum  
> wrote:
>
>> Hi  @Akinfolarin Stephen,
>>
>>
>>
>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>> akinfolar...@gmail.com> wrote:
>>
>>> First I will like you to tell me the folder where test.py is and views.py
>>>
>>> On Fri, Oct 16, 2020, 06:27 Salima Begum  
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have written test case for views for details page. Here is below code 
>>>> I have written 
>>>>
>>>> ```
>>>> from django.test import RequestFactory
>>>> from django.urls import reverse
>>>> from django.contrib.auth.models import User
>>>> from pages.models import vk_customer
>>>> from mixer.backend.django import mixer
>>>> import pytest
>>>>
>>>> from pages.views import ProductDetails
>>>>
>>>>
>>>> @pytest.mark.django_db
>>>> class TestViews:
>>>>
>>>> def test_product_detail_authenticated(self):
>>>> mixer.blend('pages.vk_master_table')
>>>> path = reverse('detail', kwargs={'pk': 1516})
>>>> request = RequestFactory().get(path)
>>>> request.user = mixer.blend(vk_customer)
>>>>
>>>> response = ProductDetails(request, pk=1516)
>>>> print(response)
>>>> assert response.status_code == 200
>>>> ```
>>>> *This the error i am getting.*
>>>>  ERROR 
>>>> collecting pages/tests/test_views.py 
>>>> 
>>>> ImportError while importing test module 
>>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>>> Hint: make sure your test modules/packages have valid Python names.
>>>> Traceback:
>>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>>>  
>>>> in import_module
>>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>> pages\tests\test_views.py:8: in 
>>>> from pages.views import ProductDetails
>>>> E   ImportError: cannot import name 'ProductDetails' from 'pages.views' 
>>>> (H:\vikreya\mysite\pages\views.py)
>>>>
>>>> Please help me out to solve this error,
>>>>
>>>> Thank you,
>>>> ~Salima
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to django-users...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/6ccb7a89-f757-4522-946e-dcc6ee0321e7n%40googlegroups.com.


Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Dhwanil Shah
Can you post your views.py code

On Fri, 16 Oct 2020 at 12:26, Salima Begum 
wrote:

> Hi all,
> vikreya
> mysite
> .cache
> .idea
>.pytest_cache
> logs
> media
> mysite
> __init__.py
>manage.py
>settings.py
>urls.py
>wsgi.py
>  pages
> .cache
> migrations
> static
> templates
> tests
> test_views.py
>__init__.py
> admin.py
> apps.py
> cron.py
> Forms.py
>functions.py
>models.py
>   urls.py
>   views.py
>
> On Fri, Oct 16, 2020 at 12:09 PM Salima Begum <
> salim...@rohteksolutions.com> wrote:
>
>> Hi  @Akinfolarin Stephen,
>>
>>
>>
>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
>> akinfolarinsteph...@gmail.com> wrote:
>>
>>> First I will like you to tell me the folder where test.py is and views.py
>>>
>>> On Fri, Oct 16, 2020, 06:27 Salima Begum 
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have written test case for views for details page. Here is below code
>>>> I have written
>>>>
>>>> ```
>>>> from django.test import RequestFactory
>>>> from django.urls import reverse
>>>> from django.contrib.auth.models import User
>>>> from pages.models import vk_customer
>>>> from mixer.backend.django import mixer
>>>> import pytest
>>>>
>>>> from pages.views import ProductDetails
>>>>
>>>>
>>>> @pytest.mark.django_db
>>>> class TestViews:
>>>>
>>>> def test_product_detail_authenticated(self):
>>>> mixer.blend('pages.vk_master_table')
>>>> path = reverse('detail', kwargs={'pk': 1516})
>>>>     request = RequestFactory().get(path)
>>>> request.user = mixer.blend(vk_customer)
>>>>
>>>> response = ProductDetails(request, pk=1516)
>>>> print(response)
>>>> assert response.status_code == 200
>>>> ```
>>>> *This the error i am getting.*
>>>>  ERROR
>>>> collecting pages/tests/test_views.py
>>>> 
>>>> ImportError while importing test module
>>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>>> Hint: make sure your test modules/packages have valid Python names.
>>>> Traceback:
>>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>>> in import_module
>>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>> pages\tests\test_views.py:8: in 
>>>> from pages.views import ProductDetails
>>>> E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
>>>> (H:\vikreya\mysite\pages\views.py)
>>>>
>>>> Please help me out to solve this error,
>>>>
>>>> Thank you,
>>>> ~Salima
>>>>
>>>> --
>>>> 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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
Hi all,
vikreya
mysite
.cache
.idea
   .pytest_cache
logs
media
mysite
__init__.py
   manage.py
   settings.py
   urls.py
   wsgi.py
 pages
.cache
migrations
static
templates
tests
test_views.py
   __init__.py
admin.py
apps.py
cron.py
Forms.py
   functions.py
   models.py
  urls.py
  views.py

On Fri, Oct 16, 2020 at 12:09 PM Salima Begum 
wrote:

> Hi  @Akinfolarin Stephen,
>
>
>
> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
> akinfolarinsteph...@gmail.com> wrote:
>
>> First I will like you to tell me the folder where test.py is and views.py
>>
>> On Fri, Oct 16, 2020, 06:27 Salima Begum 
>> wrote:
>>
>>> Hi all,
>>>
>>> I have written test case for views for details page. Here is below code
>>> I have written
>>>
>>> ```
>>> from django.test import RequestFactory
>>> from django.urls import reverse
>>> from django.contrib.auth.models import User
>>> from pages.models import vk_customer
>>> from mixer.backend.django import mixer
>>> import pytest
>>>
>>> from pages.views import ProductDetails
>>>
>>>
>>> @pytest.mark.django_db
>>> class TestViews:
>>>
>>> def test_product_detail_authenticated(self):
>>> mixer.blend('pages.vk_master_table')
>>> path = reverse('detail', kwargs={'pk': 1516})
>>> request = RequestFactory().get(path)
>>> request.user = mixer.blend(vk_customer)
>>>
>>> response = ProductDetails(request, pk=1516)
>>> print(response)
>>> assert response.status_code == 200
>>> ```
>>> *This the error i am getting.*
>>>  ERROR
>>> collecting pages/tests/test_views.py
>>> 
>>> ImportError while importing test module
>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>> Hint: make sure your test modules/packages have valid Python names.
>>> Traceback:
>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>> in import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>> pages\tests\test_views.py:8: in 
>>> from pages.views import ProductDetails
>>> E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
>>> (H:\vikreya\mysite\pages\views.py)
>>>
>>> Please help me out to solve this error,
>>>
>>> Thank you,
>>> ~Salima
>>>
>>> --
>>> 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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAMSz6bm1WKP8qjSzSz5Ouhf%2Bc2K9-pLM4Wc%3DfgSsyUek3KKmqA%40mail.gmail.com.


Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
Hi all,

my project structure
vikreya
mysite
.cache
.idea
.pytest_cache
logs
media
mysute
__init__.py
manage.py
settings.py
urls.py
wsgi.py
pages
.cache
migrations
static
templates
tests
test_views.py
__init__.py
admin.py
apps.py
cron.py
Forms.py
functions.py
models.py
urls.py
views.py

On Fri, Oct 16, 2020 at 12:09 PM Salima Begum 
wrote:

> Hi  @Akinfolarin Stephen,
>
>
>
> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
> akinfolarinsteph...@gmail.com> wrote:
>
>> First I will like you to tell me the folder where test.py is and views.py
>>
>> On Fri, Oct 16, 2020, 06:27 Salima Begum 
>> wrote:
>>
>>> Hi all,
>>>
>>> I have written test case for views for details page. Here is below code
>>> I have written
>>>
>>> ```
>>> from django.test import RequestFactory
>>> from django.urls import reverse
>>> from django.contrib.auth.models import User
>>> from pages.models import vk_customer
>>> from mixer.backend.django import mixer
>>> import pytest
>>>
>>> from pages.views import ProductDetails
>>>
>>>
>>> @pytest.mark.django_db
>>> class TestViews:
>>>
>>> def test_product_detail_authenticated(self):
>>> mixer.blend('pages.vk_master_table')
>>> path = reverse('detail', kwargs={'pk': 1516})
>>> request = RequestFactory().get(path)
>>> request.user = mixer.blend(vk_customer)
>>>
>>> response = ProductDetails(request, pk=1516)
>>> print(response)
>>> assert response.status_code == 200
>>> ```
>>> *This the error i am getting.*
>>>  ERROR
>>> collecting pages/tests/test_views.py
>>> 
>>> ImportError while importing test module
>>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>>> Hint: make sure your test modules/packages have valid Python names.
>>> Traceback:
>>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>>> in import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>> pages\tests\test_views.py:8: in 
>>> from pages.views import ProductDetails
>>> E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
>>> (H:\vikreya\mysite\pages\views.py)
>>>
>>> Please help me out to solve this error,
>>>
>>> Thank you,
>>> ~Salima
>>>
>>> --
>>> 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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAMSz6b%3DbFwx8O05g0xh6Nj35iVxZu72Us6CT5aTLiTAkeUGB-A%40mail.gmail.com.


Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
Hi  @Akinfolarin Stephen,



On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen <
akinfolarinsteph...@gmail.com> wrote:

> First I will like you to tell me the folder where test.py is and views.py
>
> On Fri, Oct 16, 2020, 06:27 Salima Begum 
> wrote:
>
>> Hi all,
>>
>> I have written test case for views for details page. Here is below code I
>> have written
>>
>> ```
>> from django.test import RequestFactory
>> from django.urls import reverse
>> from django.contrib.auth.models import User
>> from pages.models import vk_customer
>> from mixer.backend.django import mixer
>> import pytest
>>
>> from pages.views import ProductDetails
>>
>>
>> @pytest.mark.django_db
>> class TestViews:
>>
>> def test_product_detail_authenticated(self):
>> mixer.blend('pages.vk_master_table')
>> path = reverse('detail', kwargs={'pk': 1516})
>> request = RequestFactory().get(path)
>> request.user = mixer.blend(vk_customer)
>>
>> response = ProductDetails(request, pk=1516)
>> print(response)
>> assert response.status_code == 200
>> ```
>> *This the error i am getting.*
>>  ERROR
>> collecting pages/tests/test_views.py
>> 
>> ImportError while importing test module
>> 'H:\vikreya\mysite\pages\tests\test_views.py'.
>> Hint: make sure your test modules/packages have valid Python names.
>> Traceback:
>> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
>> in import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>> pages\tests\test_views.py:8: in 
>> from pages.views import ProductDetails
>> E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
>> (H:\vikreya\mysite\pages\views.py)
>>
>> Please help me out to solve this error,
>>
>> Thank you,
>> ~Salima
>>
>> --
>> 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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAMSz6bkTxp%3DabagmH%2BzwTzhYcusXzubYOLVOkh-6wujxb5L%2B3Q%40mail.gmail.com.


Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Akinfolarin Stephen
First I will like you to tell me the folder where test.py is and views.py

On Fri, Oct 16, 2020, 06:27 Salima Begum 
wrote:

> Hi all,
>
> I have written test case for views for details page. Here is below code I
> have written
>
> ```
> from django.test import RequestFactory
> from django.urls import reverse
> from django.contrib.auth.models import User
> from pages.models import vk_customer
> from mixer.backend.django import mixer
> import pytest
>
> from pages.views import ProductDetails
>
>
> @pytest.mark.django_db
> class TestViews:
>
> def test_product_detail_authenticated(self):
> mixer.blend('pages.vk_master_table')
> path = reverse('detail', kwargs={'pk': 1516})
> request = RequestFactory().get(path)
> request.user = mixer.blend(vk_customer)
>
> response = ProductDetails(request, pk=1516)
> print(response)
> assert response.status_code == 200
> ```
> *This the error i am getting.*
>  ERROR
> collecting pages/tests/test_views.py
> 
> ImportError while importing test module
> 'H:\vikreya\mysite\pages\tests\test_views.py'.
> Hint: make sure your test modules/packages have valid Python names.
> Traceback:
> c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
> in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> pages\tests\test_views.py:8: in 
> from pages.views import ProductDetails
> E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
> (H:\vikreya\mysite\pages\views.py)
>
> Please help me out to solve this error,
>
> Thank you,
> ~Salima
>
> --
> 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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAFujGLw%3DTZhX-moO6pdp3Ng%3D4LJZ2UQLfE9Y2GmOGsCpxTyVBQ%40mail.gmail.com.


ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Salima Begum
Hi all,

I have written test case for views for details page. Here is below code I
have written

```
from django.test import RequestFactory
from django.urls import reverse
from django.contrib.auth.models import User
from pages.models import vk_customer
from mixer.backend.django import mixer
import pytest

from pages.views import ProductDetails


@pytest.mark.django_db
class TestViews:

def test_product_detail_authenticated(self):
mixer.blend('pages.vk_master_table')
path = reverse('detail', kwargs={'pk': 1516})
request = RequestFactory().get(path)
request.user = mixer.blend(vk_customer)

response = ProductDetails(request, pk=1516)
print(response)
assert response.status_code == 200
```
*This the error i am getting.*
 ERROR
collecting pages/tests/test_views.py

ImportError while importing test module
'H:\vikreya\mysite\pages\tests\test_views.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
c:\users\user\appdata\local\programs\python\python38\lib\importlib\__init__.py:127:
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pages\tests\test_views.py:8: in 
from pages.views import ProductDetails
E   ImportError: cannot import name 'ProductDetails' from 'pages.views'
(H:\vikreya\mysite\pages\views.py)

Please help me out to solve this error,

Thank you,
~Salima

-- 
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/CAMSz6bk187G0NSr%2Bza9RKAFnk475Z8nhxVRF%2BFk4iKtzwLXGxg%40mail.gmail.com.


ImportError: DLL load failed: The specified module could not be found.

2019-12-18 Thread Mukesh Kalaga
Hello guys im a begginer in django.
I think i have issues in my virtual environment. when i run the other 
django project it works fine but when i run this project im having the 
following error op

 File "manage.py", line 21, in 
main()
  File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\core\management\__init__.py", 
line 401, in execute_from_command_line
utility.execute()
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\core\management\__init__.py", 
line 377, in execute
django.setup()
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\__init__.py", line 
24, in setup
apps.populate(settings.INSTALLED_APPS)
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\apps\registry.py", 
line 114, in populate
app_config.import_models()
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\apps\config.py", 
line 211, in import_models
self.models_module = import_module(models_module_name)
  File "C:\Users\kalag\Anaconda3\lib\importlib\__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\contrib\auth\models.py", 
line 2, in 
from django.contrib.auth.base_user import AbstractBaseUser, 
BaseUserManager
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\contrib\auth\base_user.py", 
line 47, in 
class AbstractBaseUser(models.Model):
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\models\base.py", line 
121, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\models\base.py", line 
325, in add_to_class
value.contribute_to_class(cls, name)
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\models\options.py", 
line 208, in contribute_to_class
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length())
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\__init__.py", 
line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\utils.py", line 
207, in __getitem__
backend = load_backend(db['ENGINE'])
  File "E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\utils.py", line 
111, in load_backend
return import_module('%s.base' % backend_name)
  File "C:\Users\kalag\Anaconda3\lib\importlib\__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File 
"E:\DjanjoWeb\acumen\env\lib\site-packages\django\db\backends\sqlite3\base.py", 
line 14, in 
from sqlite3 import dbapi2 as Database
  File "C:\Users\kalag\Anaconda3\lib\sqlite3\__init__.py", line 23, in 

from sqlite3.dbapi2 import *
  File "C:\Users\kalag\Anaconda3\lib\sqlite3\dbapi2.py", line 27, in 

from _sqlite3 import *
ImportError: DLL load failed: The specified module could not be found.


can someone help me in resolving this issue


-- 
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/1bd4f51e-17da-42c8-a103-b30be0d05fd6%40googlegroups.com.


[import pyzbar.pyzbar as pyzbar] raises ImportError('Unable to find zbar shared library')

2019-07-12 Thread SUDHAN DC
Hello guys,

I am very new in the Django and python and I am trying to write a 
barcode-reader code.

my requirements.txt file is as follows

Django>=2.2,<3.0
psycopg2>=2.7,<3.0
Pillow>=6.1.0
pyzbar==0.1.8
numpy==1.16.4
django-sslserver==0.20

 but when I try to import the prybar it raises an error.
I have also installed zbar using 
  -brew install zbar

but this could not solve my error
please help me.

-- 
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/ab2a0eb4-de65-463c-ab5e-5ba269ccb93b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: cannot import name 'RemovedInDjango40Warning'

2019-07-04 Thread Andréas Kühne
Hi Dave,

This is the django users mailing list - not the django dev. I think you
would get better help in the django dev mailing list.

Also - are you sure you want to work on developing django, and not just use
django?

Regards,

Andréas


Den ons 3 juli 2019 kl 16:20 skrev Dave Ladeji :

> Please, I need help, I don't understand what this error means and I need a
> way to resolve it. Does anyone have a solution?
>
> For context see pic
>
> --
> 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/1e8c67ec-b153-484d-a30b-17151b0ed5a5%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/CAK4qSCdU5oxkwAstJwjVTgX-%2BYCL5SBbjSTv8pcQ2Cq%2BHNe-WQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread رهام صادقی
Hi,
note that path is only works on django with version > 2.0
for more information about path check following link:
https://docs.djangoproject.com/en/2.1/ref/urls/

‫‪Dheeraj Kumar‬‏ <‪talk...@gmail.com‬‏> در تاریخ چهارشنبه ۵ دسامبر ۲۰۱۸
ساعت ۱۱:۳۳ نوشت:‬

> It won't work.
> now i changed here is and working fine..
>
> from django.contrib import admin
> from django.conf.urls import url, include
>
> urlpatterns = [
> url (r'^boadts/', include ('boadts.urls')),
> url (r'^admin/',admin.site.urls),
> ]
>
> and in apps
>
> from django.conf.urls import url
> from .import views
>
> urlpatterns = [
> url (r'^$', views.home , name = 'home'),
> ]
>
>
> On Tue, 4 Dec 2018 at 22:01, Harryxon Ndegwa 
> wrote:
>
>> use  django.urls import path instead to import path
>>
>> #%£&
>>
>> On Tue, 4 Dec 2018 7:06 pm Dheeraj Kumar >
>>> thanks to respond me but still having an issue.
>>>
>>> from django.contrib import admin
>>> from django.conf.urls import include, path
>>>
>>> urlpatterns = [
>>> path('boadts/', include ('boadts.urls')),
>>> path('admin/',admin.site.urls),
>>> ]
>>>  File "/home/myproject/myproject/myproject/urls.py", line 2, in 
>>> from django.conf.urls import include, path
>>> ImportError: cannot import name path
>>>
>>> please tell.
>>>
>>> On Tue, 4 Dec 2018 at 19:40, C. Kirby  wrote:
>>>
>>>> from django.conf.urls import include
>>>>
>>>>
>>>> you are missing conf
>>>>
>>>> On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com
>>>> wrote:
>>>>>
>>>>> plz advise...
>>>>>
>>>> --
>>>> 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/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> 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/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> 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/CAPqDb9NwUqQgnUVyovqhMu%3DB7gX9P0vhzhnakOkQgu0D6B%2Bz3Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAPqDb9NwUqQgnUVyovqhMu%3DB7gX9P0vhzhnakOkQgu0D6B%2Bz3Q%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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@googleg

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread Dheeraj Kumar
It won't work.
now i changed here is and working fine..

from django.contrib import admin
from django.conf.urls import url, include

urlpatterns = [
url (r'^boadts/', include ('boadts.urls')),
url (r'^admin/',admin.site.urls),
]

and in apps

from django.conf.urls import url
from .import views

urlpatterns = [
url (r'^$', views.home , name = 'home'),
]


On Tue, 4 Dec 2018 at 22:01, Harryxon Ndegwa 
wrote:

> use  django.urls import path instead to import path
>
> #%£&
>
> On Tue, 4 Dec 2018 7:06 pm Dheeraj Kumar 
>> thanks to respond me but still having an issue.
>>
>> from django.contrib import admin
>> from django.conf.urls import include, path
>>
>> urlpatterns = [
>> path('boadts/', include ('boadts.urls')),
>> path('admin/',admin.site.urls),
>> ]
>>  File "/home/myproject/myproject/myproject/urls.py", line 2, in 
>> from django.conf.urls import include, path
>> ImportError: cannot import name path
>>
>> please tell.
>>
>> On Tue, 4 Dec 2018 at 19:40, C. Kirby  wrote:
>>
>>> from django.conf.urls import include
>>>
>>>
>>> you are missing conf
>>>
>>> On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com
>>> wrote:
>>>>
>>>> plz advise...
>>>>
>>> --
>>> 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/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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/CAPqDb9NwUqQgnUVyovqhMu%3DB7gX9P0vhzhnakOkQgu0D6B%2Bz3Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPqDb9NwUqQgnUVyovqhMu%3DB7gX9P0vhzhnakOkQgu0D6B%2Bz3Q%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/CANwUEV-eBdB80DiZ16QSSU69nsUHqMj7C%3Drr1eBp0u4%3DGpgOdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Harryxon Ndegwa
use  django.urls import path instead to import path

#%£&

On Tue, 4 Dec 2018 7:06 pm Dheeraj Kumar  thanks to respond me but still having an issue.
>
> from django.contrib import admin
> from django.conf.urls import include, path
>
> urlpatterns = [
> path('boadts/', include ('boadts.urls')),
> path('admin/',admin.site.urls),
> ]
>  File "/home/myproject/myproject/myproject/urls.py", line 2, in 
> from django.conf.urls import include, path
> ImportError: cannot import name path
>
> please tell.
>
> On Tue, 4 Dec 2018 at 19:40, C. Kirby  wrote:
>
>> from django.conf.urls import include
>>
>>
>> you are missing conf
>>
>> On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com wrote:
>>>
>>> plz advise...
>>>
>> --
>> 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/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/CAPqDb9NwUqQgnUVyovqhMu%3DB7gX9P0vhzhnakOkQgu0D6B%2Bz3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Dheeraj Kumar
thanks to respond me but still having an issue.

from django.contrib import admin
from django.conf.urls import include, path

urlpatterns = [
path('boadts/', include ('boadts.urls')),
path('admin/',admin.site.urls),
]
 File "/home/myproject/myproject/myproject/urls.py", line 2, in 
from django.conf.urls import include, path
ImportError: cannot import name path

please tell.

On Tue, 4 Dec 2018 at 19:40, C. Kirby  wrote:

> from django.conf.urls import include
>
>
> you are missing conf
>
> On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com wrote:
>>
>> plz advise...
>>
> --
> 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/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CANwUEV8cExZZKFPJX7VLOwAxn5COVa2P6v4qjRpqY%3Di2e%3DCy-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread C. Kirby
from django.conf.urls import include


you are missing conf

On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com wrote:
>
> plz advise...
>

-- 
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/f2a4a58b-2c9b-4710-8801-e24e9fdf1b45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread talkdkg
plz advise...

-- 
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/21a72ece-03a9-49a7-8d12-ec48994f7352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-18 Thread James Farris
If you are not using a virtual env, did you install pip3? If so, since you
are using puthon3 -V to get that python version, try running
$ pip3 install django
And see if you get a different result

I think what is happening is when you run pip install it’s referencing
another python version, not python 3.

At least that is what I experienced back before I used virtual envs

On Fri, May 18, 2018 at 9:01 AM Journal-Immo <cont...@journal-immo.com>
wrote:

> Thank you for all your answers
>
> I know my problem with version
>
> So for me it's very strange...
>
> python3 -V
>
> Python 3.5.3
>
> pip install Django==2.0.5
>
> Collecting Django==2.0.5...
>
> Could nt find a version... 1.2.1, 1.2.2 etc and the last one 1.11.13
>
> No matching distribution found fot Django==2.0.5
>
> Do you think Virtual Envirenment will solve my problem ?
>
> Many thank again
>
> Le 18/05/2018 à 16:38, Daniel Hepper a écrit :
>
> Your problem is right here:
>
> > django-admin --version 1.11.13
> You are using Django 1.11. The documentation you are using refers to a
> newer version of Django, version 2.0.
>
> Use the right documentation for your version of Django:
>
> https://docs.djangoproject.com/en/1.11/
>
> You are seeing this specific error because in Django 2.0, you can write
> "from django.urls import include", while in Django 1.11, you have to write
> "from django.conf.urls import include".
>
> Note that using Debian packages, you won't get the latest version of
> Django (or any other Python packages). You might want to consider
> installing the latest version with pip.
>
>
> https://docs.djangoproject.com/en/2.0/topics/install/#installing-official-release
>
> Hope that helps,
> Daniel
>
> On Fri, May 18, 2018 at 4:20 PM, Journal-Immo <cont...@journal-immo.com>
> wrote:
>
>> Thank
>>
>> But (I use debian 9)
>>
>> Apt-get update
>>
>> Apt-get install python python3 python-django
>>
>> django-admin --version 1.11.13
>>
>> Where is the problem ?
>>
>> Le 17/05/2018 à 21:01, Fidel Leon a écrit :
>>
>> You are using the wrong combination of Django and tutorial: “include” is
>> available in Django 2 and up, but you’re using Django 1.11.
>>
>> Fidel Leon
>> fi...@flm.cat
>> Phone: +34 622 26 44 92 
>> GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7
>>
>> El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (
>> cont...@journal-immo.com) escribió:
>>
>> Hello,
>>
>>  I use docs.djangoproject.co/en/2.0
>>  Python 2 7 13
>> Gjango 1.11.13
>>
>> Creating the Polls app OK
>> Write your first view OK
>> But python manage runserver don't work
>> With : python -Wall manage.py test
>> ImportError : cannot import name include
>> If you want to see something, ask me
>> Many thanks
>> --
>> 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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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 

Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo

Thank you for all your answers

I know my problem with version

So for me it's very strange...

python3 -V

Python 3.5.3

pip install Django==2.0.5

Collecting Django==2.0.5...

Could nt find a version... 1.2.1, 1.2.2 etc and the last one 1.11.13

No matching distribution found fot Django==2.0.5

Do you think Virtual Envirenment will solve my problem ?

Many thank again


Le 18/05/2018 à 16:38, Daniel Hepper a écrit :


Your problem is right here:

> django-admin --version 1.11.13

You are using Django 1.11. The documentation you are using refers to a 
newer version of Django, version 2.0.


Use the right documentation for your version of Django:

https://docs.djangoproject.com/en/1.11/

You are seeing this specific error because in Django 2.0, you can 
write "from django.urls import include", while in Django 1.11, you 
have to write "from django.conf.urls import include".


Note that using Debian packages, you won't get the latest version of 
Django (or any other Python packages). You might want to consider 
installing the latest version with pip.


https://docs.djangoproject.com/en/2.0/topics/install/#installing-official-release

Hope that helps,
Daniel

On Fri, May 18, 2018 at 4:20 PM, Journal-Immo 
<cont...@journal-immo.com <mailto:cont...@journal-immo.com>> wrote:


Thank

But (I use debian 9)

Apt-get update

Apt-get install python python3 python-django

django-admin --version 1.11.13

Where is the problem ?


Le 17/05/2018 à 21:01, Fidel Leon a écrit :

You are using the wrong combination of Django and tutorial:
“include” is available in Django 2 and up, but you’re using
Django 1.11.

Fidel Leon
fi...@flm.cat <mailto:fi...@flm.cat>
Phone: +34 622 26 44 92 
GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7

El 17 de mayo de 2018 a las 20:56:56, Tristan Demot
(cont...@journal-immo.com <mailto:cont...@journal-immo.com>)
escribió:


Hello,

 I use docs.djangoproject.co/en/2.0
<http://docs.djangoproject.co/en/2.0>
 Python 2 7 13
Gjango 1.11.13


Creating the Polls app OK


Write your first view OK

But python manage runserver don't work
    With : python -Wall manage.py test
ImportError : cannot import name include
If you want to see something, ask me
Many thanks
--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com

<https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

Re: ImportError : cannot import name include

2018-05-18 Thread Gerald Brown
Another option to get the current version of Django is to create a file 
called requirements.txt.  In this file enter django on a line, and other 
requirements on other lines.  You can also specify a specific version 
with django==1.11 or any other version by changing the number after the 
==. If this is left off then the latest version will be installed.  Then 
in your virtual environment enter the command 'pip install -r 
requirements.txt'. This will download and install everything that is in 
the requirements.txt.  This file will grow as you enter more requirements.



On 05/18/2018 10:38 PM, Daniel Hepper wrote:


Your problem is right here:

> django-admin --version 1.11.13

You are using Django 1.11. The documentation you are using refers to a 
newer version of Django, version 2.0.


Use the right documentation for your version of Django:

https://docs.djangoproject.com/en/1.11/

You are seeing this specific error because in Django 2.0, you can 
write "from django.urls import include", while in Django 1.11, you 
have to write "from django.conf.urls import include".


Note that using Debian packages, you won't get the latest version of 
Django (or any other Python packages). You might want to consider 
installing the latest version with pip.


https://docs.djangoproject.com/en/2.0/topics/install/#installing-official-release

Hope that helps,
Daniel

On Fri, May 18, 2018 at 4:20 PM, Journal-Immo 
<cont...@journal-immo.com <mailto:cont...@journal-immo.com>> wrote:


Thank

But (I use debian 9)

Apt-get update

Apt-get install python python3 python-django

django-admin --version 1.11.13

Where is the problem ?


Le 17/05/2018 à 21:01, Fidel Leon a écrit :

You are using the wrong combination of Django and tutorial:
“include” is available in Django 2 and up, but you’re using
Django 1.11.

Fidel Leon
fi...@flm.cat <mailto:fi...@flm.cat>
Phone: +34 622 26 44 92 
GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7

El 17 de mayo de 2018 a las 20:56:56, Tristan Demot
(cont...@journal-immo.com <mailto:cont...@journal-immo.com>)
escribió:


Hello,

 I use docs.djangoproject.co/en/2.0
<http://docs.djangoproject.co/en/2.0>
 Python 2 7 13
Gjango 1.11.13


Creating the Polls app OK


Write your first view OK

But python manage runserver don't work
    With : python -Wall manage.py test
ImportError : cannot import name include
If you want to see something, ask me
Many thanks
--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com

<https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailt

Re: ImportError : cannot import name include

2018-05-18 Thread Fidel Leon
You need to follow the CORRECT tutorial:

https://docs.djangoproject.com/en/1.11/

In the urls.py file, instead of:

from django.contrib import adminfrom django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),]

you need this:

from django.conf.urls import include, urlfrom django.contrib import admin
urlpatterns = [
url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),]

Please note the django.conf.urls INSTEAD of django.contrib


El vie., 18 may. 2018 a las 16:20, Journal-Immo (<cont...@journal-immo.com>)
escribió:

> Thank
>
> But (I use debian 9)
>
> Apt-get update
>
> Apt-get install python python3 python-django
>
> django-admin --version 1.11.13
>
> Where is the problem ?
>
> Le 17/05/2018 à 21:01, Fidel Leon a écrit :
>
> You are using the wrong combination of Django and tutorial: “include” is
> available in Django 2 and up, but you’re using Django 1.11.
>
> Fidel Leon
> fi...@flm.cat
> Phone: +34 622 26 44 92 
> GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7
>
> El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (
> cont...@journal-immo.com) escribió:
>
> Hello,
>
>  I use docs.djangoproject.co/en/2.0
>  Python 2 7 13
> Gjango 1.11.13
>
> Creating the Polls app OK
> Write your first view OK
> But python manage runserver don't work
> With : python -Wall manage.py test
> ImportError : cannot import name include
> If you want to see something, ask me
> Many thanks
> --
> 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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
>


-- 
Fidel Leon
fi...@flm.cat
Phone: +34 622 26 44 92

-- 
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/CAHXg%3DN3nMbGtHLjQO2WoJgr8rjFwO7L5Sm-MRduf4yEPpfH7EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-18 Thread Daniel Hepper
Your problem is right here:

> django-admin --version 1.11.13
You are using Django 1.11. The documentation you are using refers to a
newer version of Django, version 2.0.

Use the right documentation for your version of Django:

https://docs.djangoproject.com/en/1.11/

You are seeing this specific error because in Django 2.0, you can write
"from django.urls import include", while in Django 1.11, you have to write
"from django.conf.urls import include".

Note that using Debian packages, you won't get the latest version of Django
(or any other Python packages). You might want to consider installing the
latest version with pip.

https://docs.djangoproject.com/en/2.0/topics/install/#installing-official-release

Hope that helps,
Daniel

On Fri, May 18, 2018 at 4:20 PM, Journal-Immo <cont...@journal-immo.com>
wrote:

> Thank
>
> But (I use debian 9)
>
> Apt-get update
>
> Apt-get install python python3 python-django
>
> django-admin --version 1.11.13
>
> Where is the problem ?
>
> Le 17/05/2018 à 21:01, Fidel Leon a écrit :
>
> You are using the wrong combination of Django and tutorial: “include” is
> available in Django 2 and up, but you’re using Django 1.11.
>
> Fidel Leon
> fi...@flm.cat
> Phone: +34 622 26 44 92 
> GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7
>
> El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (
> cont...@journal-immo.com) escribió:
>
> Hello,
>
>  I use docs.djangoproject.co/en/2.0
>  Python 2 7 13
> Gjango 1.11.13
>
> Creating the Polls app OK
> Write your first view OK
> But python manage runserver don't work
> With : python -Wall manage.py test
> ImportError : cannot import name include
> If you want to see something, ask me
> Many thanks
> --
> 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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH
> 6z2RfCzj3384epQKQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/7e9e643b-6e7e-681c-eed2-dc9ab9be94e6%40journal-immo.com
> <https://groups.google.com/d/msgid/django-users/7e9e643b-6e7e-681c-eed2-dc9ab9be94e6%40journal-immo.com?utm_medium=email_source=footer>
> .
>
> 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/CAHEnUVWWkRsOVD6AfvDoGS05z33R7qu9SuA2Q1o2se%2BPf0M-xg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo

Thank

But (I use debian 9)

Apt-get update

Apt-get install python python3 python-django

django-admin --version 1.11.13

Where is the problem ?


Le 17/05/2018 à 21:01, Fidel Leon a écrit :
You are using the wrong combination of Django and tutorial: “include” 
is available in Django 2 and up, but you’re using Django 1.11.


Fidel Leon
fi...@flm.cat <mailto:fi...@flm.cat>
Phone: +34 622 26 44 92 
GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7

El 17 de mayo de 2018 a las 20:56:56, Tristan Demot 
(cont...@journal-immo.com <mailto:cont...@journal-immo.com>) escribió:



Hello,

 I use docs.djangoproject.co/en/2.0 <http://docs.djangoproject.co/en/2.0>
 Python 2 7 13
Gjango 1.11.13


Creating the Polls app OK


Write your first view OK

But python manage runserver don't work
With : python -Wall manage.py test
ImportError : cannot import name include
If you want to see something, ask me
Many thanks
--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto: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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>.

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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto: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/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email_source=footer>.

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/7e9e643b-6e7e-681c-eed2-dc9ab9be94e6%40journal-immo.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-18 Thread Pranay reddy
  From which package you have imported "include "Sent from my BlackBerry 10 smartphone.From: Tristan DemotSent: Friday 18 May 2018 00:27To: Django usersReply To: django-users@googlegroups.comSubject: ImportError : cannot import name includeHello, I use docs.djangoproject.co/en/2.0 Python 2 7 13Gjango 1.11.13Creating the Polls app OKWrite your first view OKBut python manage runserver don't workWith : python -Wall manage.py testImportError : cannot import name includeIf you want to see something, ask meMany thanks



-- 
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/1fe7df04-dc85-4a3d-940e-4dde7de31477%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/20180518063204.6168661.55095.9943%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-17 Thread Daniel Hepper
You are using Django 1.11 with the tutorial written for Django 2.0. Therr 
should be a version picker on the bottom right of the tutorial.

You are seeing this error because the way to import ‚include’ has changed from 
1.11 to 2.0

Hope that helps,
Daniel

> Am 17.05.2018 um 19:34 schrieb Tristan Demot <cont...@journal-immo.com>:
> 
> Hello,
> 
>  I use docs.djangoproject.co/en/2.0
>  Python 2 7 13
> Gjango 1.11.13
> 
> Creating the Polls app OK
> 
> Write your first view OK
> 
> But python manage runserver don't work
> With : python -Wall manage.py test
> 
> ImportError : cannot import name include
> 
> If you want to see something, ask me
> 
> Many thanks
> 
> 
> -- 
> 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/1fe7df04-dc85-4a3d-940e-4dde7de31477%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/16D40353-23AC-4172-99D7-FD9F7879800C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError : cannot import name include

2018-05-17 Thread Fidel Leon
You are using the wrong combination of Django and tutorial: “include” is
available in Django 2 and up, but you’re using Django 1.11.

Fidel Leon
fi...@flm.cat
Phone: +34 622 26 44 92 
GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7

El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (
cont...@journal-immo.com) escribió:

Hello,

 I use docs.djangoproject.co/en/2.0
 Python 2 7 13
Gjango 1.11.13

Creating the Polls app OK
Write your first view OK
But python manage runserver don't work
With : python -Wall manage.py test

ImportError : cannot import name include

If you want to see something, ask me

Many thanks


--
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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email_source=footer>
.
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/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ImportError : cannot import name include

2018-05-17 Thread Tristan Demot
Hello,

 I use docs.djangoproject.co/en/2.0
 Python 2 7 13
Gjango 1.11.13

Creating the Polls app OK
Write your first view OK
But python manage runserver don't work
With : python -Wall manage.py test

ImportError : cannot import name include

If you want to see something, ask me

Many thanks


-- 
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/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError

2018-05-04 Thread Fidel Leon
>From the look of things, it seems:
-You're following the Django v2.0 tutorial.
-You have installed a Django v1 version.

This is an example with Django v2:

>>> import django
>>> django.get_version()
*'2.0.5' *
>>> from django.urls import include, path
>>>
*[No error]*

And this is an example with Django v1.11

>>> from django import get_version
>>> get_version()
*'1.11.13' *
>>> from django.urls import include, urls
Traceback (most recent call last):
 File "", line 1, in 
*ImportError: cannot import name 'include'*
>>>

So either you upgrade your Django package, or you follow your Django
version's tutorial :)


El vie., 4 may. 2018 a las 15:12, <gkfka5...@ajou.ac.kr> escribió:

> I run 'python manage.py runserver'.
> but this message appear.
>
> Traceback (most recent call last):
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\autoreload.py",
> l
> ine 228, in wrapper
> fn(*args, **kwargs)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\command
> s\runserver.py", line 124, in inner_run
> self.check(display_num_errors=True)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\base.py
> ", line 359, in check
> include_deployment_checks=include_deployment_checks,
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\base.py
> ", line 346, in _run_checks
> return checks.run_checks(**kwargs)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\registry.py
> ", line 81, in run_checks
> new_errors = check(app_configs=app_configs)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\urls.py",
> l
> ine 16, in check_url_config
> return check_resolver(resolver)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\urls.py",
> l
> ine 26, in check_resolver
> return check_method()
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
> lin
> e 254, in check
> for pattern in self.url_patterns:
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\functional.py",
> l
> ine 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
> lin
> e 405, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\functional.py",
> l
> ine 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
> lin
> e 398, in urlconf_module
> return import_module(self.urlconf_name)
>   File "c:\Python27\Lib\importlib\__init__.py", line 37, in import_module
> __import__(name)
>   File "C:\Users\gkfka\PycharmProjects\django\cafe\mysite\mysite\urls.py",
> line 17, in 
> from django.urls import include, path
> ImportError: cannot import name 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/e9634a2e-8970-4f14-bb2b-1275ce305fad%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e9634a2e-8970-4f14-bb2b-1275ce305fad%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Fidel Leon
fi...@flm.cat
Phone: +34 622 26 44 92

-- 
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/CAHXg%3DN1JFHZBryqHtMM0DbBf5Q9XyG6h%2BAJmFAmH7UbWU8jPjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


importError

2018-05-04 Thread gkfka5968
I run 'python manage.py runserver'.
but this message appear.

Traceback (most recent call last):
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\autoreload.py",
 
l
ine 228, in wrapper
fn(*args, **kwargs)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\command
s\runserver.py", line 124, in inner_run
self.check(display_num_errors=True)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\base.py
", line 359, in check
include_deployment_checks=include_deployment_checks,
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\management\base.py
", line 346, in _run_checks
return checks.run_checks(**kwargs)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\registry.py
", line 81, in run_checks
new_errors = check(app_configs=app_configs)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\urls.py",
 
l
ine 16, in check_url_config
return check_resolver(resolver)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\core\checks\urls.py",
 
l
ine 26, in check_resolver
return check_method()
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
 
lin
e 254, in check
for pattern in self.url_patterns:
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\functional.py",
 
l
ine 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
 
lin
e 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\functional.py",
 
l
ine 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\urls\resolvers.py",
 
lin
e 398, in urlconf_module
return import_module(self.urlconf_name)
  File "c:\Python27\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
  File "C:\Users\gkfka\PycharmProjects\django\cafe\mysite\mysite\urls.py", 
line 17, in 
from django.urls import include, path
ImportError: cannot import name 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/e9634a2e-8970-4f14-bb2b-1275ce305fad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: No module named 'main'

2018-04-14 Thread shubham jhandei
Hi,

I agree with Samuel Muiruri, your app definition in settings.py is 
incorrect.

try this:

INSTALLED_APPS = [ ... #'DjangoRestfulServer', #remove there is no need 
toimport the main project 'main', #no need for substantiating an app ]

On Friday, April 13, 2018 at 8:04:51 PM UTC+5:30, Артём Орлов wrote:
>
> Hello!
>
>
> Django does not see application created with *django-admin startapp main*
> . 
>
> ./DjangoRestfulServer/
> ├── __init__.py
> ├── main
> │   ├── admin.py
> │   ├── apps.py
> │   ├── __init__.py
> │   ├── models.py
> │   ├── __pycache__
> │   │   ├── admin.cpython-35.pyc
> │   │   ├── __init__.cpython-35.pyc
> │   │   ├── models.cpython-35.pyc
> │   │   └── views.cpython-35.pyc
> │   ├── tests.py
> │   ├── urls.py
> │   └── views.py
> ├── __pycache__
> │   ├── __init__.cpython-35.pyc
> │   ├── models.cpython-35.pyc
> │   ├── settings.cpython-35.pyc
> │   ├── urls.cpython-35.pyc
> │   └── wsgi.cpython-35.pyc
> ├── settings.py
> ├── urls.py
> └── wsgi.py
>
>
>
> *settings.py*
>
> ...
> INSTALLED_APPS = [
> ...
> 'DjangoRestfulServer',
> 'DjangoRestfulServer.main',
> ]
> ...
>
> *main/urls.py*
>
> from django.conf.urls import url, includefrom django.urls import include, 
> path, re_pathfrom . import views
>
> urlpatterns = [
> re_path(r'^facebook/$', views.FacebookLogin.as_view(), name='fb_login'),
> ]
>
> *urls.py*
>
> from django.contrib import adminfrom django.urls import include, path, re_path
>
> urlpatterns = [
> path('api/v1/admin/', admin.site.urls),
> path('api/v1/accounts/', include('allauth.urls')),
> path('api/v1/', include('main.urls')),  # <- path('api/v1/', 
> include('DjangoRestfulServer.main.urls')) acts the same!!!
> ]
>
> Traceback is the following:
>
> (env3) artem@artem-inspirion:~/Projects/GoTogether/Server$ python3 manage.py 
> checkTraceback (most recent call last):
>   File "manage.py", line 15, in 
> execute_from_command_line(sys.argv)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/__init__.py",
>  line 371, in execute_from_command_line
> utility.execute()
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/__init__.py",
>  line 365, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
>  line 288, in run_from_argv
> self.execute(*args, **cmd_options)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
>  line 335, in execute
> output = self.handle(*args, **options)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/commands/check.py",
>  line 65, in handle
> fail_level=getattr(checks, options['fail_level']),
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
>  line 364, in check
> include_deployment_checks=include_deployment_checks,
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
>  line 351, in _run_checks
> return checks.run_checks(**kwargs)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/registry.py",
>  line 73, in run_checks
> new_errors = check(app_configs=app_configs)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/urls.py",
>  line 40, in check_url_namespaces_unique
> all_namespaces = _load_all_namespaces(resolver)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/urls.py",
>  line 57, in _load_all_namespaces
> url_patterns = getattr(resolver, 'url_patterns', [])
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/utils/functional.py",
>  line 36, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/urls/resolvers.py",
>  line 536, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns", 
> self.urlconf_module)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/utils/functional.py",
>  line 36, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/urls/resolvers.py",
>  line 529, in urlconf_module
> return import_module(self.urlconf_name)
>   File 
> "/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/importlib/__init__.py",
>  line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 986, in _gcd_import
>   File "", line 969, in 

Re: ImportError: No module named 'main'

2018-04-14 Thread Samuel Muiruri
try this

INSTALLED_APPS = [
...
#'DjangoRestfulServer', #remove you don't import the main project
'main', #no need for substanciating an 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 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/c48d60aa-e4af-43c8-a3ba-026376c1fb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ImportError: No module named 'main'

2018-04-13 Thread Артём Орлов


Hello!


Django does not see application created with *django-admin startapp main*. 

./DjangoRestfulServer/
├── __init__.py
├── main
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── models.py
│   ├── __pycache__
│   │   ├── admin.cpython-35.pyc
│   │   ├── __init__.cpython-35.pyc
│   │   ├── models.cpython-35.pyc
│   │   └── views.cpython-35.pyc
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── __pycache__
│   ├── __init__.cpython-35.pyc
│   ├── models.cpython-35.pyc
│   ├── settings.cpython-35.pyc
│   ├── urls.cpython-35.pyc
│   └── wsgi.cpython-35.pyc
├── settings.py
├── urls.py
└── wsgi.py



*settings.py*

...
INSTALLED_APPS = [
...
'DjangoRestfulServer',
'DjangoRestfulServer.main',
]
...

*main/urls.py*

from django.conf.urls import url, includefrom django.urls import include, path, 
re_pathfrom . import views

urlpatterns = [
re_path(r'^facebook/$', views.FacebookLogin.as_view(), name='fb_login'),
]

*urls.py*

from django.contrib import adminfrom django.urls import include, path, re_path

urlpatterns = [
path('api/v1/admin/', admin.site.urls),
path('api/v1/accounts/', include('allauth.urls')),
path('api/v1/', include('main.urls')),  # <- path('api/v1/', 
include('DjangoRestfulServer.main.urls')) acts the same!!!
]

Traceback is the following:

(env3) artem@artem-inspirion:~/Projects/GoTogether/Server$ python3 manage.py 
checkTraceback (most recent call last):
  File "manage.py", line 15, in 
execute_from_command_line(sys.argv)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/__init__.py",
 line 371, in execute_from_command_line
utility.execute()
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/__init__.py",
 line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
 line 288, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
 line 335, in execute
output = self.handle(*args, **options)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/commands/check.py",
 line 65, in handle
fail_level=getattr(checks, options['fail_level']),
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
 line 364, in check
include_deployment_checks=include_deployment_checks,
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/management/base.py",
 line 351, in _run_checks
return checks.run_checks(**kwargs)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/registry.py",
 line 73, in run_checks
new_errors = check(app_configs=app_configs)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/urls.py",
 line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/core/checks/urls.py",
 line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/utils/functional.py",
 line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/urls/resolvers.py",
 line 536, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/utils/functional.py",
 line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/urls/resolvers.py",
 line 529, in urlconf_module
return import_module(self.urlconf_name)
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/importlib/__init__.py",
 line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 986, in _gcd_import
  File "", line 969, in _find_and_load
  File "", line 958, in _find_and_load_unlocked
  File "", line 673, in _load_unlocked
  File "", line 673, in exec_module
  File "", line 222, in _call_with_frames_removed
  File "/home/artem/Projects/GoTogether/Server/DjangoRestfulServer/urls.py", 
line 22, in 
path('api/v1/', include('main.urls')),
  File 
"/home/artem/Projects/GoTogether/Server/env3/lib/python3.5/site-packages/django/urls/conf.py",
 line 34, in include
urlconf_module = import_module(urlconf_module)
  File 

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
Hi Etienne,

I prefer messing with standard distutils/setuptools commands to avoid 
situations like this... ;-)

Messing and restoring system libs is a matter of personnal taste 


Eric


From: Etienne Robillard <tkad...@yandex.com>
Sent: Wednesday, February 14, 2018 11:07:07 AM
To: PASCUAL Eric
Cc: django-users@googlegroups.com
Subject: Re: importError: Count Not import Django inside Virtualenv


Hi Eric,

Le 2018-02-14 à 03:44, PASCUAL Eric a écrit :

Hi,


Hard to say without knowing the exact context, but my gut feeling is that 
you've modified a system wide library at a moment (maybe inadvertently).


My own experience is that it's easy to mess with Python libraries when 
installing packages with sudo , which may happen form time to  time when 
working with virtualenv (or pyenv) since not very long, and being caught up by 
old habits (they tend to survive longer that wanted ).


I prefer messing with standard distutils/setuptools commands to avoid 
situations like this... ;-)

Cheers,
Etienne



From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> 
<django-users@googlegroups.com><mailto:django-users@googlegroups.com> on behalf 
of tango ward <tangowar...@gmail.com><mailto:tangowar...@gmail.com>
Sent: Wednesday, February 14, 2018 3:40:04 AM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: Re: importError: Count Not import Django inside Virtualenv

Hi Eric,


I tried what you suggested and it works! I was just wondering why my existing 
pet projects have the same problem?

On Wed, Feb 14, 2018 at 10:13 AM, tango ward 
<tangowar...@gmail.com<mailto:tangowar...@gmail.com>> wrote:
Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
) from exc
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?


@Jason,

It's weird because couple of days, I can still run these pet projects without 
any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can 
see django there. It seems that even though virtualenv is activated, the 
packages I installed inside it are not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric 
<eric.pasc...@cstb.fr<mailto:eric.pasc...@cstb.fr>> wrote:

Hi Jarvis,


Can you provide the error messages trace ? It can greatly help understanding 
what's happening.


If you haven't already done this, try to restart from a fresh new virtualenv 
inside which you'll install Django and the additional packages you've added (if 
any). Then restore a copy of your project in this context (if by chance you 
work with git, a simple git clone will do the trick) and test your app again.


Hoping you haven't already messed your system Python by installing stuff in 
sudo mode. The situation could be a little more complicated then.


Best.


Eric

From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> 
<django-users@googlegroups.com<mailto:django-users@googlegroups.com>> on behalf 
of tango ward <tangowar...@gmail.com<mailto:tangowar...@gmail.com>>
Sent: Tuesday, February 13, 2018 9:43:45 PM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: importError: Count Not import Django inside Virtualenv

Hi,

I want to seek some advice about the error. All of my pet projects in my 
desktop are getting the same error even though virtualenv is activated. I can 
confirm that when I started playing around with the projects, I have installed 
Django inside virtualenv without using "sudo". Now, I can't run python 
manage.py runserver and the packages that I am getting whenever I run pip 
freeze are different from before which doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis
--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto: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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.go

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
Hi,


The copy/paste of the project tree will work of course. Chances are that 
unwanted files can be brought too, but this should not be a problem in a first 
stage.


I have used rsync or tar archives to deploy Django projects in some cases, and 
it worked fine.


Eric


From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf 
of tango ward <tangowar...@gmail.com>
Sent: Wednesday, February 14, 2018 10:09:51 AM
To: django-users@googlegroups.com
Subject: Re: importError: Count Not import Django inside Virtualenv

that's odd. Whenever I test a pacakge, it's always installed first in 
virtualenv. Maybe when I updated my system? Btw, I have some projects which are 
not yet in github, can I just copy and paste them in a new folder with new 
virtualenv?

On Wed, Feb 14, 2018 at 4:44 PM, PASCUAL Eric 
<eric.pasc...@cstb.fr<mailto:eric.pasc...@cstb.fr>> wrote:

Hi,


Hard to say without knowing the exact context, but my gut feeling is that 
you've modified a system wide library at a moment (maybe inadvertently).


My own experience is that it's easy to mess with Python libraries when 
installing packages with sudo , which may happen form time to  time when 
working with virtualenv (or pyenv) since not very long, and being caught up by 
old habits (they tend to survive longer that wanted ).


Even if far less harmful, then --user option is to avoid for projects related 
libs, for the same reasons.


Eric

From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> 
<django-users@googlegroups.com<mailto:django-users@googlegroups.com>> on behalf 
of tango ward <tangowar...@gmail.com<mailto:tangowar...@gmail.com>>
Sent: Wednesday, February 14, 2018 3:40:04 AM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: Re: importError: Count Not import Django inside Virtualenv

Hi Eric,


I tried what you suggested and it works! I was just wondering why my existing 
pet projects have the same problem?

On Wed, Feb 14, 2018 at 10:13 AM, tango ward 
<tangowar...@gmail.com<mailto:tangowar...@gmail.com>> wrote:
Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
) from exc
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?


@Jason,

It's weird because couple of days, I can still run these pet projects without 
any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can 
see django there. It seems that even though virtualenv is activated, the 
packages I installed inside it are not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric 
<eric.pasc...@cstb.fr<mailto:eric.pasc...@cstb.fr>> wrote:

Hi Jarvis,


Can you provide the error messages trace ? It can greatly help understanding 
what's happening.


If you haven't already done this, try to restart from a fresh new virtualenv 
inside which you'll install Django and the additional packages you've added (if 
any). Then restore a copy of your project in this context (if by chance you 
work with git, a simple git clone will do the trick) and test your app again.


Hoping you haven't already messed your system Python by installing stuff in 
sudo mode. The situation could be a little more complicated then.


Best.


Eric

From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> 
<django-users@googlegroups.com<mailto:django-users@googlegroups.com>> on behalf 
of tango ward <tangowar...@gmail.com<mailto:tangowar...@gmail.com>>
Sent: Tuesday, February 13, 2018 9:43:45 PM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: importError: Count Not import Django inside Virtualenv

Hi,

I want to seek some advice about the error. All of my pet projects in my 
desktop are getting the same error even though virtualenv is activated. I can 
confirm that when I started playing around with the projects, I have installed 
Django inside virtualenv without using "sudo". Now, I can't run python 
manage.py runserver and the packages that I am getting whenever I run pip 
freeze are different from before which doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis

--
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+u

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread Etienne Robillard

Hi Eric,


Le 2018-02-14 à 03:44, PASCUAL Eric a écrit :


Hi,


Hard to say without knowing the exact context, but my gut feeling is 
that you've modified a system wide library at a moment (maybe 
inadvertently).



My own experience is that it's easy to mess with Python libraries when 
installing packages with sudo , which may happen form time to  time 
when working with virtualenv (or pyenv) since not very long, and being 
caught up by old habits (they tend to survive longer that wanted ).



I prefer messing with standard distutils/setuptools commands to avoid 
situations like this... ;-)


Cheers,
Etienne




*From:* django-users@googlegroups.com <django-users@googlegroups.com> 
on behalf of tango ward <tangowar...@gmail.com>

*Sent:* Wednesday, February 14, 2018 3:40:04 AM
*To:* django-users@googlegroups.com
*Subject:* Re: importError: Count Not import Django inside Virtualenv
Hi Eric,


I tried what you suggested and it works! I was just wondering why my 
existing pet projects have the same problem?


On Wed, Feb 14, 2018 at 10:13 AM, tango ward <tangowar...@gmail.com 
<mailto:tangowar...@gmail.com>> wrote:


Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
    ) from exc
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?


@Jason,

It's weird because couple of days, I can still run these pet
projects without any error. If I go to venv folder
virtual/lib/python3.6/site-packages, I can see django there. It
seems that even though virtualenv is activated, the packages I
installed inside it are not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric
<eric.pasc...@cstb.fr <mailto:eric.pasc...@cstb.fr>> wrote:

Hi Jarvis,


Can you provide the error messages trace ? It can greatly help
understanding what's happening.


If you haven't already done this, try to restart from a fresh
new virtualenv inside which you'll install Django and the
additional packages you've added (if any). Then restore a copy
of your project in this context (if by chance you work with
git, a simple git clone will do the trick) and test your app
again.


Hoping you haven't already messed your system Python by
installing stuff in sudo mode. The situation could be a little
more complicated then.


Best.


Eric

*From:* django-users@googlegroups.com
<mailto:django-users@googlegroups.com>
<django-users@googlegroups.com
<mailto:django-users@googlegroups.com>> on behalf of tango
ward <tangowar...@gmail.com <mailto:tangowar...@gmail.com>>
*Sent:* Tuesday, February 13, 2018 9:43:45 PM
*To:* django-users@googlegroups.com
<mailto:django-users@googlegroups.com>
*Subject:* importError: Count Not import Django inside Virtualenv
Hi,

I want to seek some advice about the error. All of my pet
projects in my desktop are getting the same error even though
virtualenv is activated. I can confirm that when I started
playing around with the projects, I have installed Django
inside virtualenv without using "sudo". Now, I can't run
python manage.py runserver and the packages that I am getting
whenever I run pip freeze are different from before which
doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis
-- 
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at
https://groups.google.com/group/django-users
<https://groups.google.com/group/django-users>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.c

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread tango ward
that's odd. Whenever I test a pacakge, it's always installed first in
virtualenv. Maybe when I updated my system? Btw, I have some projects which
are not yet in github, can I just copy and paste them in a new folder with
new virtualenv?

On Wed, Feb 14, 2018 at 4:44 PM, PASCUAL Eric <eric.pasc...@cstb.fr> wrote:

> Hi,
>
>
> Hard to say without knowing the exact context, but my gut feeling is that
> you've modified a system wide library at a moment (maybe inadvertently).
>
>
> My own experience is that it's easy to mess with Python libraries when
> installing packages with sudo , which may happen form time to  time
> when working with virtualenv (or pyenv) since not very long, and being
> caught up by old habits (they tend to survive longer that wanted ).
>
>
> Even if far less harmful, then --user option is to avoid for projects
> related libs, for the same reasons.
>
>
> Eric
> --
> *From:* django-users@googlegroups.com <django-users@googlegroups.com> on
> behalf of tango ward <tangowar...@gmail.com>
> *Sent:* Wednesday, February 14, 2018 3:40:04 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: importError: Count Not import Django inside Virtualenv
>
> Hi Eric,
>
>
> I tried what you suggested and it works! I was just wondering why my
> existing pet projects have the same problem?
>
> On Wed, Feb 14, 2018 at 10:13 AM, tango ward <tangowar...@gmail.com>
> wrote:
>
> Hi,
>
> The error message that I am getting is:
>
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
> ModuleNotFoundError: No module named 'django'
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> ) from exc
> 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?
>
>
> @Jason,
>
> It's weird because couple of days, I can still run these pet projects
> without any error. If I go to venv folder virtual/lib/python3.6/site-packages,
> I can see django there. It seems that even though virtualenv is activated,
> the packages I installed inside it are not recognized by the system.
>
>
> On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric <eric.pasc...@cstb.fr>
> wrote:
>
> Hi Jarvis,
>
>
> Can you provide the error messages trace ? It can greatly help
> understanding what's happening.
>
>
> If you haven't already done this, try to restart from a fresh new
> virtualenv inside which you'll install Django and the additional packages
> you've added (if any). Then restore a copy of your project in this context
> (if by chance you work with git, a simple git clone will do the trick) and
> test your app again.
>
>
> Hoping you haven't already messed your system Python by installing stuff
> in sudo mode. The situation could be a little more complicated then.
>
>
> Best.
>
>
> Eric
> --
> *From:* django-users@googlegroups.com <django-users@googlegroups.com> on
> behalf of tango ward <tangowar...@gmail.com>
> *Sent:* Tuesday, February 13, 2018 9:43:45 PM
> *To:* django-users@googlegroups.com
> *Subject:* importError: Count Not import Django inside Virtualenv
>
> Hi,
>
> I want to seek some advice about the error. All of my pet projects in my
> desktop are getting the same error even though virtualenv is activated. I
> can confirm that when I started playing around with the projects, I have
> installed Django inside virtualenv without using "sudo". Now, I can't run
> python manage.py runserver and the packages that I am getting whenever I
> run pip freeze are different from before which doesn't include Django in
> the list.
>
>
> Any advice pls?
>
>
> Thanks,
> Jarvis
>
> --
> 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/ms
> gid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWb
> e1JNx2YhFA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email_source=footer>

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
Hi,


Hard to say without knowing the exact context, but my gut feeling is that 
you've modified a system wide library at a moment (maybe inadvertently).


My own experience is that it's easy to mess with Python libraries when 
installing packages with sudo , which may happen form time to  time when 
working with virtualenv (or pyenv) since not very long, and being caught up by 
old habits (they tend to survive longer that wanted ).


Even if far less harmful, then --user option is to avoid for projects related 
libs, for the same reasons.


Eric

From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf 
of tango ward <tangowar...@gmail.com>
Sent: Wednesday, February 14, 2018 3:40:04 AM
To: django-users@googlegroups.com
Subject: Re: importError: Count Not import Django inside Virtualenv

Hi Eric,


I tried what you suggested and it works! I was just wondering why my existing 
pet projects have the same problem?

On Wed, Feb 14, 2018 at 10:13 AM, tango ward 
<tangowar...@gmail.com<mailto:tangowar...@gmail.com>> wrote:
Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
) from exc
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?


@Jason,

It's weird because couple of days, I can still run these pet projects without 
any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can 
see django there. It seems that even though virtualenv is activated, the 
packages I installed inside it are not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric 
<eric.pasc...@cstb.fr<mailto:eric.pasc...@cstb.fr>> wrote:

Hi Jarvis,


Can you provide the error messages trace ? It can greatly help understanding 
what's happening.


If you haven't already done this, try to restart from a fresh new virtualenv 
inside which you'll install Django and the additional packages you've added (if 
any). Then restore a copy of your project in this context (if by chance you 
work with git, a simple git clone will do the trick) and test your app again.


Hoping you haven't already messed your system Python by installing stuff in 
sudo mode. The situation could be a little more complicated then.


Best.


Eric

From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> 
<django-users@googlegroups.com<mailto:django-users@googlegroups.com>> on behalf 
of tango ward <tangowar...@gmail.com<mailto:tangowar...@gmail.com>>
Sent: Tuesday, February 13, 2018 9:43:45 PM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: importError: Count Not import Django inside Virtualenv

Hi,

I want to seek some advice about the error. All of my pet projects in my 
desktop are getting the same error even though virtualenv is activated. I can 
confirm that when I started playing around with the projects, I have installed 
Django inside virtualenv without using "sudo". Now, I can't run python 
manage.py runserver and the packages that I am getting whenever I run pip 
freeze are different from before which doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis

--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto: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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email_source=footer>.
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi Eric,


I tried what you suggested and it works! I was just wondering why my
existing pet projects have the same problem?

On Wed, Feb 14, 2018 at 10:13 AM, tango ward <tangowar...@gmail.com> wrote:

> Hi,
>
> The error message that I am getting is:
>
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
> ModuleNotFoundError: No module named 'django'
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> ) from exc
> 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?
>
>
> @Jason,
>
> It's weird because couple of days, I can still run these pet projects
> without any error. If I go to venv folder virtual/lib/python3.6/site-packages,
> I can see django there. It seems that even though virtualenv is activated,
> the packages I installed inside it are not recognized by the system.
>
>
> On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric <eric.pasc...@cstb.fr>
> wrote:
>
>> Hi Jarvis,
>>
>>
>> Can you provide the error messages trace ? It can greatly help
>> understanding what's happening.
>>
>>
>> If you haven't already done this, try to restart from a fresh new
>> virtualenv inside which you'll install Django and the additional packages
>> you've added (if any). Then restore a copy of your project in this context
>> (if by chance you work with git, a simple git clone will do the trick) and
>> test your app again.
>>
>>
>> Hoping you haven't already messed your system Python by installing stuff
>> in sudo mode. The situation could be a little more complicated then.
>>
>>
>> Best.
>>
>>
>> Eric
>> --
>> *From:* django-users@googlegroups.com <django-users@googlegroups.com> on
>> behalf of tango ward <tangowar...@gmail.com>
>> *Sent:* Tuesday, February 13, 2018 9:43:45 PM
>> *To:* django-users@googlegroups.com
>> *Subject:* importError: Count Not import Django inside Virtualenv
>>
>> Hi,
>>
>> I want to seek some advice about the error. All of my pet projects in my
>> desktop are getting the same error even though virtualenv is activated. I
>> can confirm that when I started playing around with the projects, I have
>> installed Django inside virtualenv without using "sudo". Now, I can't run
>> python manage.py runserver and the packages that I am getting whenever I
>> run pip freeze are different from before which doesn't include Django in
>> the list.
>>
>>
>> Any advice pls?
>>
>>
>> Thanks,
>> Jarvis
>>
>> --
>> 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/ms
>> gid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWb
>> e1JNx2YhFA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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/ms
>> gid/django-users/AM5P193MB0083C66FCD689270720750708CF60%
>> 40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM
>> <https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email_source=footer>
>> .
>>
>> 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/CAA6wQLJCkd0B-0ep8jrUFk1QUp%3D_jQ_AuundhzBMwOSYf7h4fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi,

The error message that I am getting is:

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 14, in 
) from exc
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?


@Jason,

It's weird because couple of days, I can still run these pet projects
without any error. If I go to venv folder
virtual/lib/python3.6/site-packages, I can see django there. It seems that
even though virtualenv is activated, the packages I installed inside it are
not recognized by the system.


On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric <eric.pasc...@cstb.fr> wrote:

> Hi Jarvis,
>
>
> Can you provide the error messages trace ? It can greatly help
> understanding what's happening.
>
>
> If you haven't already done this, try to restart from a fresh new
> virtualenv inside which you'll install Django and the additional packages
> you've added (if any). Then restore a copy of your project in this context
> (if by chance you work with git, a simple git clone will do the trick) and
> test your app again.
>
>
> Hoping you haven't already messed your system Python by installing stuff
> in sudo mode. The situation could be a little more complicated then.
>
>
> Best.
>
>
> Eric
> --
> *From:* django-users@googlegroups.com <django-users@googlegroups.com> on
> behalf of tango ward <tangowar...@gmail.com>
> *Sent:* Tuesday, February 13, 2018 9:43:45 PM
> *To:* django-users@googlegroups.com
> *Subject:* importError: Count Not import Django inside Virtualenv
>
> Hi,
>
> I want to seek some advice about the error. All of my pet projects in my
> desktop are getting the same error even though virtualenv is activated. I
> can confirm that when I started playing around with the projects, I have
> installed Django inside virtualenv without using "sudo". Now, I can't run
> python manage.py runserver and the packages that I am getting whenever I
> run pip freeze are different from before which doesn't include Django in
> the list.
>
>
> Any advice pls?
>
>
> Thanks,
> Jarvis
>
> --
> 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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2Y
> hFA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.
> EURP193.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email_source=footer>
> .
>
> 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/CAA6wQLLZyeuQiFL6fe4HvC4a6ogZnTh7kGrc62ni95aPggChyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread PASCUAL Eric
Hi Jarvis,


Can you provide the error messages trace ? It can greatly help understanding 
what's happening.


If you haven't already done this, try to restart from a fresh new virtualenv 
inside which you'll install Django and the additional packages you've added (if 
any). Then restore a copy of your project in this context (if by chance you 
work with git, a simple git clone will do the trick) and test your app again.


Hoping you haven't already messed your system Python by installing stuff in 
sudo mode. The situation could be a little more complicated then.


Best.


Eric

From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf 
of tango ward <tangowar...@gmail.com>
Sent: Tuesday, February 13, 2018 9:43:45 PM
To: django-users@googlegroups.com
Subject: importError: Count Not import Django inside Virtualenv

Hi,

I want to seek some advice about the error. All of my pet projects in my 
desktop are getting the same error even though virtualenv is activated. I can 
confirm that when I started playing around with the projects, I have installed 
Django inside virtualenv without using "sudo". Now, I can't run python 
manage.py runserver and the packages that I am getting whenever I run pip 
freeze are different from before which doesn't include Django in the list.


Any advice pls?


Thanks,
Jarvis

--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto: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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email_source=footer>.
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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread Jason
if pip freeze doesn't include django in the output, then the django package 
is not installed in the virtualenv.  are you sure the virtualenv was active 
when you installed django?

also, remember that if you installed latest django, eg *pip install django*, 
it won't install for python2 venvs.

On Tuesday, February 13, 2018 at 3:44:42 PM UTC-5, tangoward15 wrote:
>
> Hi,
>
> I want to seek some advice about the error. All of my pet projects in my 
> desktop are getting the same error even though virtualenv is activated. I 
> can confirm that when I started playing around with the projects, I have 
> installed Django inside virtualenv without using "sudo". Now, I can't run 
> python manage.py runserver and the packages that I am getting whenever I 
> run pip freeze are different from before which doesn't include Django in 
> the list.
>
>
> Any advice pls?
>
>
> Thanks,
> Jarvis
>

-- 
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/9ddf691d-6d16-4fa1-aab0-f534fef445ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi,

I want to seek some advice about the error. All of my pet projects in my
desktop are getting the same error even though virtualenv is activated. I
can confirm that when I started playing around with the projects, I have
installed Django inside virtualenv without using "sudo". Now, I can't run
python manage.py runserver and the packages that I am getting whenever I
run pip freeze are different from before which doesn't include Django in
the list.


Any advice pls?


Thanks,
Jarvis

-- 
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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Package django-imagekit produces "ImportError: cannot import name conf"

2017-10-25 Thread bill.torcaso


Any help will be appreciated.


I'm having trouble using django-imagekit on AWS, under awslinux. The error 
doesn't make any sense, so I must be missing something in my AWS system 
setup.  This same code base runs fine on CentOS 6 and Ubuntu 16.x.  My 
virtualenv is activated.

This is the error, and the whole stack trace is further below.

File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/imagekit/__init__.py"
, line 2, in  

 from . import conf 

ImportError: cannot import name conf


This doesn't make any sense, because "conf.py" is right there next to 
"__init__.py":

$ ls /home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/
python2.7/dist-packages/imagekit/{__init__.py,conf.py} 

/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/
dist-packages/imagekit/conf.py 

/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/
dist-packages/imagekit/__init__.py



This is from my settings.py:

INSTALLED_APPS = ( 
 "imagekit",
 # many others ...
)



This is from pip freeze:

(www) $ pip freeze | grep image 

django-imagekit==4.0.1 # the same thing happens on 3.2.6





Traceback (most recent call last): 

 File "./manage.py", line 14, in  

 execute_from_command_line(sys.argv) 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
, line 338, in execute_from_command_line 

 utility.execute() 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
, line 312, in execute 

 django.setup() 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/django/__init__.py"
, line 18, in setup 

 apps.populate(settings.INSTALLED_APPS) 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/django/apps/registry.py"
, line 85, in populate 

 app_config = AppConfig.create(entry) 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/django/apps/config.py"
, line 87, in create 

 module = import_module(entry) 

 File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in 
import_module 

 __import__(name) 

 File 
"/home/ec2-user/green-here/www.oxfamamerica.org/venv/www/local/lib/python2.7/dist-packages/imagekit/__init__.py"
, line 2, in  

 from . import conf 

ImportError: cannot import name conf


This is my python, in my virtualenv:
(www) $ python -V; which python 
Python 2.7.12 
~/green-here/www.oxfamamerica.org/venv/www/bin/python 


Googling produced a similar report, but that involved mixing python 2.x and 
Python 3.x; I don't have Python 3 installed on my VM instance.

What am I doing wrong?

Thanks,

  ---  Bill

-- 
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/424cbcfd-0805-4904-97b6-e6a5d0056e10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Melvyn Sopacua
Is it possible you create your virtual environments
with global site-packages?
>From what I'm seeing this is caused primarily by
version mismatches of the six library and using
OS site-packages with virtualenv would certainly
do it as setuptools and pip both use six.

The difference with 1.10/1.11 I cannot explain
though.


On Mon, Sep 4, 2017 at 9:03 PM, Derek Zeng  wrote:
> Hi Melvyn,
>
> Renaming MIDDELWARE_CLASSES doesn't help either.
>
> These are the requirements I have:
>
> django==1.10.5
> djangorestframework
> markdown
> django-filter
> django-jinja
> pytest
> factory_boy
>
> fabric3
> pytest-django
>
> feedparser==5.2.1
> pytz
> PyYAML
> lxml
> requests
>
> django-extensions
> Werkzeug
>
> django-cors-headers
> psycopg2
> django_compressor
> django-libsass
> livereload
>
> ---
>
> I tried to comment out the code you quoted. But that has no effects.
>
>
> On Mon, Sep 4, 2017 at 12:37 PM, Melvyn Sopacua 
> wrote:
>>
>> Rename MIDDLEWARE_CLASSES to
>> MIDDLEWARE in settings to see if that changes anything.
>> If not, remove one by one (except static). There are some changes to
>> the static files middleware [1], but I can't really relate that to
>> your error.
>>
>> Is there anything in your project requirements that also uses six?
>>
>> There's no diff between 1.10.x and 1.11.x on six.py, but this code
>> looks like a possible root cause:
>>
>> # Here's some real nastiness: Another "instance" of the six module might
>> # be floating around. Therefore, we can't use isinstance() to check for
>> # the six meta path importer, since the other six instance will have
>> # inserted an importer with different class.
>> if (type(importer).__name__ == "_SixMetaPathImporter" and
>> importer.name == __name__):
>> del sys.meta_path[i]
>> break
>>
>> [1]
>> https://docs.djangoproject.com/en/1.11/releases/1.11/#django-contrib-staticfiles
>>
>> On Mon, Sep 4, 2017 at 3:32 PM, Derek Zeng  wrote:
>> > If I turn off debug mode, it gives me 500 error and showing the same
>> > stack
>> > trace in the console.
>> >
>> > I also tried 1.11.4, still the same error.
>> >
>> > On Mon, Sep 4, 2017 at 2:33 AM, Raffaele Salmaso 
>> > wrote:
>> >>
>> >> On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng  wrote:
>> >>>
>> >>> When I use django==1.10.7, this does not happen.
>> >>> When I use django==1.11a1 this happens.
>> >>
>> >> Why 1.11a1? Current is 1.11.4
>> >>
>> >> --
>> >> | Raffaele Salmaso
>> >> | https://salmaso.org
>> >> | https://bitbucket.org/rsalmaso
>> >> | https://github.com/rsalmaso
>> >>
>> >> --
>> >> 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/49blpAjNxYc/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/CABgH4Js1z0e7yypGD4f7z_eKbMrYWQEMT9viCSCshA1ROhMA_A%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/CAAzyz%2BG2MjxRv001kjq%3DpkpzReVAHw03Jv9FW6Ry7sHPwKMsSQ%40mail.gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Melvyn Sopacua
>>
>> --
>> 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/49blpAjNxYc/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/CA%2Bgw1GV3fMt5w4wUjOSviZzkdaHRU%2BFj4fHJqRSJnMGpcdLUNA%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 

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Derek Zeng
Hi Melvyn,

Renaming MIDDELWARE_CLASSES doesn't help either.

These are the requirements I have:

django==1.10.5
djangorestframework
markdown
django-filter
django-jinja
pytest
factory_boy

fabric3
pytest-django

feedparser==5.2.1
pytz
PyYAML
lxml
requests

django-extensions
Werkzeug

django-cors-headers
psycopg2
django_compressor
django-libsass
livereload

---

I tried to comment out the code you quoted. But that has no effects.


On Mon, Sep 4, 2017 at 12:37 PM, Melvyn Sopacua 
wrote:

> Rename MIDDLEWARE_CLASSES to
> MIDDLEWARE in settings to see if that changes anything.
> If not, remove one by one (except static). There are some changes to
> the static files middleware [1], but I can't really relate that to
> your error.
>
> Is there anything in your project requirements that also uses six?
>
> There's no diff between 1.10.x and 1.11.x on six.py, but this code
> looks like a possible root cause:
>
> # Here's some real nastiness: Another "instance" of the six module might
> # be floating around. Therefore, we can't use isinstance() to check for
> # the six meta path importer, since the other six instance will have
> # inserted an importer with different class.
> if (type(importer).__name__ == "_SixMetaPathImporter" and
> importer.name == __name__):
> del sys.meta_path[i]
> break
>
> [1] https://docs.djangoproject.com/en/1.11/releases/1.11/#
> django-contrib-staticfiles
>
> On Mon, Sep 4, 2017 at 3:32 PM, Derek Zeng  wrote:
> > If I turn off debug mode, it gives me 500 error and showing the same
> stack
> > trace in the console.
> >
> > I also tried 1.11.4, still the same error.
> >
> > On Mon, Sep 4, 2017 at 2:33 AM, Raffaele Salmaso 
> > wrote:
> >>
> >> On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng  wrote:
> >>>
> >>> When I use django==1.10.7, this does not happen.
> >>> When I use django==1.11a1 this happens.
> >>
> >> Why 1.11a1? Current is 1.11.4
> >>
> >> --
> >> | Raffaele Salmaso
> >> | https://salmaso.org
> >> | https://bitbucket.org/rsalmaso
> >> | https://github.com/rsalmaso
> >>
> >> --
> >> 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/49blpAjNxYc/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/CABgH4Js1z0e7yypGD4f7z_
> eKbMrYWQEMT9viCSCshA1ROhMA_A%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/CAAzyz%2BG2MjxRv001kjq%
> 3DpkpzReVAHw03Jv9FW6Ry7sHPwKMsSQ%40mail.gmail.com.
> >
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Melvyn Sopacua
>
> --
> 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/49blpAjNxYc/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/CA%2Bgw1GV3fMt5w4wUjOSviZzkdaHRU%
> 2BFj4fHJqRSJnMGpcdLUNA%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/CAAzyz%2BEiQYvTZO41n9QsFiZ_%3DxgH3Hkrsu%2BZ6erX7CO74VKNEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Melvyn Sopacua
Rename MIDDLEWARE_CLASSES to
MIDDLEWARE in settings to see if that changes anything.
If not, remove one by one (except static). There are some changes to
the static files middleware [1], but I can't really relate that to
your error.

Is there anything in your project requirements that also uses six?

There's no diff between 1.10.x and 1.11.x on six.py, but this code
looks like a possible root cause:

# Here's some real nastiness: Another "instance" of the six module might
# be floating around. Therefore, we can't use isinstance() to check for
# the six meta path importer, since the other six instance will have
# inserted an importer with different class.
if (type(importer).__name__ == "_SixMetaPathImporter" and
importer.name == __name__):
del sys.meta_path[i]
break

[1] 
https://docs.djangoproject.com/en/1.11/releases/1.11/#django-contrib-staticfiles

On Mon, Sep 4, 2017 at 3:32 PM, Derek Zeng  wrote:
> If I turn off debug mode, it gives me 500 error and showing the same stack
> trace in the console.
>
> I also tried 1.11.4, still the same error.
>
> On Mon, Sep 4, 2017 at 2:33 AM, Raffaele Salmaso 
> wrote:
>>
>> On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng  wrote:
>>>
>>> When I use django==1.10.7, this does not happen.
>>> When I use django==1.11a1 this happens.
>>
>> Why 1.11a1? Current is 1.11.4
>>
>> --
>> | Raffaele Salmaso
>> | https://salmaso.org
>> | https://bitbucket.org/rsalmaso
>> | https://github.com/rsalmaso
>>
>> --
>> 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/49blpAjNxYc/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/CABgH4Js1z0e7yypGD4f7z_eKbMrYWQEMT9viCSCshA1ROhMA_A%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/CAAzyz%2BG2MjxRv001kjq%3DpkpzReVAHw03Jv9FW6Ry7sHPwKMsSQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Melvyn Sopacua

-- 
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%2Bgw1GV3fMt5w4wUjOSviZzkdaHRU%2BFj4fHJqRSJnMGpcdLUNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Derek Zeng
If I turn off debug mode, it gives me 500 error and showing the same stack
trace in the console.

I also tried 1.11.4, still the same error.

On Mon, Sep 4, 2017 at 2:33 AM, Raffaele Salmaso 
wrote:

> On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng  wrote:
>>
>> When I use django==1.10.7, this does not happen.
>> When I use django==1.11a1 this happens.
>>
> Why 1.11a1? Current is 1.11.4
>
> --
> | Raffaele Salmaso
> | https://salmaso.org
> | https://bitbucket.org/rsalmaso
> | https://github.com/rsalmaso
>
> --
> 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/49blpAjNxYc/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/CABgH4Js1z0e7yypGD4f7z_eKbMrYWQEMT9viCSCshA1ROhMA_A%
> 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/CAAzyz%2BG2MjxRv001kjq%3DpkpzReVAHw03Jv9FW6Ry7sHPwKMsSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Raffaele Salmaso
On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng  wrote:
>
> When I use django==1.10.7, this does not happen.
> When I use django==1.11a1 this happens.
>
Why 1.11a1? Current is 1.11.4

-- 
| Raffaele Salmaso
| https://salmaso.org
| https://bitbucket.org/rsalmaso
| https://github.com/rsalmaso

-- 
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/CABgH4Js1z0e7yypGD4f7z_eKbMrYWQEMT9viCSCshA1ROhMA_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Melvyn Sopacua
Could you turn off DEBUG and check what the problem is then?
The reason is that I want to make sure we're not judging the side
effect of *rendering* the exception.

On Sun, Sep 3, 2017 at 11:52 PM, Derek Zeng <zen1...@gmail.com> wrote:
> it's the same in either versions of python. the output was captured when i
> was just debugging it in 3.5.
>
> On Sun, Sep 3, 2017 at 2:55 PM, James Schneider <jrschneide...@gmail.com>
> wrote:
>>
>>
>>
>>   File
>> "/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py",
>> line 21, in 
>> from django.utils.six.moves import range
>> ImportError: cannot import name 'range'
>>
>>
>> Are you sure you're using 3.6.2? Do you have another virtualenv with 3.5
>> and no Django installed?
>>
>> -James
>>
>> --
>> 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/49blpAjNxYc/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/CA%2Be%2BciV4vpt7Vk%3D8GDS_wNQHqhsuwA5vcfakWo%3DoVjQziXLdxA%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/CAAzyz%2BG0MTUNd8xm8ajNby38eoi7Xmj6RgXBZwp2WfAS-n9s2g%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Melvyn Sopacua

-- 
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%2Bgw1GWxFhcKwAe%2B-cwJq9A6N0m-tcyS7N4%3D%3D0Uai1RrG%2Be%3Dpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-03 Thread Derek Zeng
it's the same in either versions of python. the output was captured when i
was just debugging it in 3.5.

On Sun, Sep 3, 2017 at 2:55 PM, James Schneider <jrschneide...@gmail.com>
wrote:

>
>
>   File 
> "/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py",
>  line 21, in 
> from django.utils.six.moves import range
> ImportError: cannot import name 'range'
>
>
> Are you sure you're using 3.6.2? Do you have another virtualenv with 3.5
> and no Django installed?
>
> -James
>
> --
> 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/49blpAjNxYc/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/CA%2Be%2BciV4vpt7Vk%3D8GDS_wNQHqhsuwA5vcfakWo%
> 3DoVjQziXLdxA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciV4vpt7Vk%3D8GDS_wNQHqhsuwA5vcfakWo%3DoVjQziXLdxA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> 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/CAAzyz%2BG0MTUNd8xm8ajNby38eoi7Xmj6RgXBZwp2WfAS-n9s2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-03 Thread James Schneider
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py",
line 21, in 
from django.utils.six.moves import range
ImportError: cannot import name 'range'


Are you sure you're using 3.6.2? Do you have another virtualenv with 3.5
and no Django installed?

-James

-- 
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%2Be%2BciV4vpt7Vk%3D8GDS_wNQHqhsuwA5vcfakWo%3DoVjQziXLdxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-03 Thread Derek Zeng
kages/compressor/templatetags/compress.py",
 line 131, in render
return self.render_compressed(context, self.kind, self.mode, forced=forced)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/compressor/templatetags/compress.py",
 line 98, in render_compressed
compressor = self.get_compressor(context, kind)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/compressor/templatetags/compress.py",
 line 39, in get_compressor
content=self.get_original_content(context), context=context)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/compressor/templatetags/compress.py",
 line 123, in get_original_content
return self.nodelist.render(context)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/template/base.py",
 line 990, in render
bit = node.render_annotated(context)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/template/base.py",
 line 957, in render_annotated
return self.render(context)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/templatetags/static.py",
 line 105, in render
url = self.url(context)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/templatetags/static.py",
 line 102, in url
return self.handle_simple(path)
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/templatetags/static.py",
 line 116, in handle_simple
from django.contrib.staticfiles.storage import staticfiles_storage
  File 
"/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py",
 line 21, in 
from django.utils.six.moves import range
ImportError: cannot import name 'range'



On Sunday, September 3, 2017 at 12:11:03 AM UTC-4, James Schneider wrote:
>
>
>
> On Sep 2, 2017 11:17 PM, "Derek Zeng" <zen...@gmail.com > 
> wrote:
>
> Hi,
>
> Today I tried to install my django project on a new mac computer. I used 
> virutalenv to setup the packages. 
>
> After I start the app by running './mange.py runserver' and access the 
> home page I got the error 
>
> from django.utils.six.moves import range, ImportError: cannot import name 
>> 'range'
>
>
> Really not sure why it has this weird error. I'm using python 3.6.2 
>
> Any help is appreciated!
>
>
> Is the referenced error coming from code that you wrote?
>
> There's a comma at the end of the import line, which may cause that error. 
>
> Also make sure that you've installed Django within your virtualenv. If it 
> is, then also make sure you have six installed (although Django should have 
> done that already).
>
> -James
>

-- 
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/9a2615e7-1a79-465e-93ae-f7572f83de90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-02 Thread James Schneider
On Sep 2, 2017 11:17 PM, "Derek Zeng" <zen1...@gmail.com> wrote:

Hi,

Today I tried to install my django project on a new mac computer. I used
virutalenv to setup the packages.

After I start the app by running './mange.py runserver' and access the home
page I got the error

from django.utils.six.moves import range, ImportError: cannot import name
> 'range'


Really not sure why it has this weird error. I'm using python 3.6.2

Any help is appreciated!


Is the referenced error coming from code that you wrote?

There's a comma at the end of the import line, which may cause that error.

Also make sure that you've installed Django within your virtualenv. If it
is, then also make sure you have six installed (although Django should have
done that already).

-James

-- 
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%2Be%2BciXBx28t5kOo4FdSarW-h4O44UO%3D2JoO-00yd_6o%3DLhPxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-02 Thread Derek Zeng
Hi,

Today I tried to install my django project on a new mac computer. I used 
virutalenv to setup the packages. 

After I start the app by running './mange.py runserver' and access the home 
page I got the error 

from django.utils.six.moves import range, ImportError: cannot import name 
> 'range'


Really not sure why it has this weird error. I'm using python 3.6.2 

Any help is appreciated!

-- 
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/cf286bfb-2879-46d5-95b6-05dc56fc384f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how can i fix ImportError: No module named 'archive.settings'

2017-07-05 Thread Antonis Christofides
Hi,

The most likely explanation is that your settings file has the wrong name or
location. It should be "settings.py", and it should be in the "archive" 
directory.

"archive" should not normally be in INSTALLED_APPS, unless you really know what
you are doing, which you probably don't (yet). By default Django has a "project"
subdirectory and "apps" directories; settings.py in in the "project"
subdirectory and the "apps" directories are apps that are specified in
INSTALLED_APPS.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-07-05 02:27, Body Abdo wrote:
> python manage.py runserver
> Traceback (most recent call last):
>   File "manage.py", line 22, in 
> execute_from_command_line(sys.argv)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
> line 363, in execute_from_command_line
> utility.execute()
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
> line 307, in execute
> settings.INSTALLED_APPS
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 56, in __getattr__
> self._setup(name)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 41, in _setup
> self._wrapped = Settings(settings_module)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 110, in __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/var/www/project/venv/lib64/python3.5/importlib/__init__.py", line
> 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 986, in _gcd_import
>   File "", line 969, in _find_and_load
>   File "", line 956, in _find_and_load_unlocked
> ImportError: No module named 'archive.settings'
>
>
> *my setting:*
> import os
> import sys
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
> # Quick-start development settings - unsuitable for production # See
> https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY
> WARNING: keep the secret key used in production secret! SECRET_KEY = 
> 'd*d9q(5zn)6uv9ep$-qjsh3e^63=n64j%s&*w#*1voa3+e$x' # SECURITY WARNING: don't
> run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = []
>
> IMPORT_EXPORT_USE_TRANSACTIONS = True # Application definition INSTALLED_APPS 
> = [
> 'archive', 'import_export', 'django.contrib.admin', 'django.contrib.auth',
> 'django.contrib.contenttypes', 'django.contrib.sessions',
> 'django.contrib.messages', 'django.contrib.staticfiles', 'bootstrap3',
> -- 
> 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
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com
> <mailto: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/60c53c4a-3b34-4564-8bbf-b3e292ea16b1%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/60c53c4a-3b34-4564-8bbf-b3e292ea16b1%40googlegroups.com?utm_medium=email_source=footer>.
> 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/e63da83f-6586-00e6-4740-b31a37bdcdc9%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


Re: how can i fix ImportError: No module named 'archive.settings'

2017-07-04 Thread James Schneider
  File "", line 969, in _find_and_load
  File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'archive.settings'


If I had to guess, you're missing the settings.py file in the root of your
Django project. That should have been created by the 'django-admin.py
startproject' command.

-James

-- 
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%2Be%2BciX_4c3NQ6hK5n1OUv64wFMGr%2BLrexCioC%3Dj%2BLDsyuNzsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


how can i fix ImportError: No module named 'archive.settings'

2017-07-04 Thread Body Abdo
python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 22, in 
execute_from_command_line(sys.argv)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
 
line 363, in execute_from_command_line
utility.execute()
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
 
line 307, in execute
settings.INSTALLED_APPS
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 56, in __getattr__
self._setup(name)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 41, in _setup
self._wrapped = Settings(settings_module)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/var/www/project/venv/lib64/python3.5/importlib/__init__.py", line 
126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 986, in _gcd_import
  File "", line 969, in _find_and_load
  File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'archive.settings'


*my setting:*

import os
import sys

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'd*d9q(5zn)6uv9ep$-qjsh3e^63=n64j%s&*w#*1voa3+e$x'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

IMPORT_EXPORT_USE_TRANSACTIONS = True

# Application definition

INSTALLED_APPS = [
'archive',
'import_export',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap3',

-- 
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/60c53c4a-3b34-4564-8bbf-b3e292ea16b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.7: ImportError: No module named .models

2017-04-18 Thread Leonard Cohen
I WENT ALMOST CRAZY thanx a lot !!! ;)

Τη Τρίτη, 12 Αυγούστου 2014 - 12:19:34 μ.μ. UTC+3, ο χρήστης ngangsia 
akumbo έγραψε:
>
> i have had this same erroe too but it happed that i include instead the 
> module class name in the settings.py file
>
> make sure u are having the name of the app in the *settings.py *file
>

-- 
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/bd70d3e0-df69-448d-85ba-ff40b7d6af21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError while starting django server

2017-02-02 Thread Tim Graham
It seems like your Python install might be broken. Does this import work in 
a Python shell:

>>> from logging.config import dictConfig

On Thursday, February 2, 2017 at 7:12:38 AM UTC-5, Parth Shah wrote:
>
> *Folks,*
>
> *I was following the tutorial here 
> <https://docs.djangoproject.com/en/1.10/intro/tutorial01/> and was 
> successfully able to install django.*
>
> *I am using python 2.7.13 on OS X.*
>
> *I can verify the version number as below:*
>
>
> *Macitosh:project user$ python*
>
> *Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) *
>
> *[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin*
>
> *Type "help", "copyright", "credits" or "license" for more information.*
>
> *>>> import django*
>
> *>>> print(django.get_version())*
>
> *1.10.5*
>
> *>>>*
>
>
> *But when I try to run the version check using a different command I get 
> the below error, and the same error while subsequently starting the server*
>
>
> *Parths-Macitosh:project parth$ python -m django --version*
>
> *Traceback (most recent call last):*
>
> *  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", 
> line 174, in _run_module_as_main*
>
> *"__main__", fname, loader, pkg_name)*
>
> *  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", 
> line 72, in _run_code*
>
> *exec code in run_globals*
>
> *  File "/Library/Python/2.7/site-packages/django/__main__.py", line 9, in 
> *
>
> *management.execute_from_command_line()*
>
> *  File 
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
> line 367, in execute_from_command_line*
>
> *utility.execute()*
>
> *  File 
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
> line 341, in execute*
>
> *django.setup()*
>
> *  File "/Library/Python/2.7/site-packages/django/__init__.py", line 22, 
> in setup*
>
> *    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)*
>
> *  File "/Library/Python/2.7/site-packages/django/utils/log.py", line 69, 
> in configure_logging*
>
> *logging_config_func = import_string(logging_config)*
>
> *  File 
> "/Library/Python/2.7/site-packages/django/utils/module_loading.py", line 
> 27, in import_string*
>
> *six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])*
>
> *  File 
> "/Library/Python/2.7/site-packages/django/utils/module_loading.py", line 
> 23, in import_string*
>
> *return getattr(module, class_name)*
>
> *ImportError: Module "logging.config" does not define a "dictConfig" 
> attribute/class*
>
>
> Any thoughts?
>
>
> Thanks,
>
> PS
>

-- 
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/6792993e-f4e7-425c-b9f8-d269651ec821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError while starting django server

2017-02-02 Thread Antonis Christofides
Hi,

the --version option of the "python" command shows you the version of Python,
not of Django. The -m option doesn't merely import the module you specify, it
imports it and executes it, and Django isn't designed to do this. So the way to
check its version the one you showed first. If you want to run it with a
one-liner, it's this:

python -c 'import django; print(django.get_version())'

Antonis Christofides
http://djangodeployment.com


On 02/02/2017 07:16 AM, Parth Shah wrote:
> /Folks,/
> /
> /
> /I was following the tutorial here
> <https://docs.djangoproject.com/en/1.10/intro/tutorial01/> and was
> successfully able to install django./
> /
> /
> /I am using python 2.7.13 on OS X./
> /
> /
> /I can verify the version number as below:/
>
>
> *Macitosh:project user$ python*
>
> *Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) *
>
> *[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin*
>
> *Type "help", "copyright", "credits" or "license" for more information.*
>
> *>>> import django*
>
> *>>> print(django.get_version())*
>
> *1.10.5*
>
> *>>>*
>
> */
> /*
>
> /But when I try to run the version check using a different command I get the
> below error, and the same error while subsequently starting the server/
>
>
> *Parths-Macitosh:project parth$ python -m django --version*
>
> *Traceback (most recent call last):*
>
> *  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
> line 174, in _run_module_as_main*
>
> *"__main__", fname, loader, pkg_name)*
>
> *  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
> line 72, in _run_code*
>
> *exec code in run_globals*
>
> *  File "/Library/Python/2.7/site-packages/django/__main__.py", line 9, in
> *
>
> *management.execute_from_command_line()*
>
> *  File
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line
> 367, in execute_from_command_line*
>
> *utility.execute()*
>
> *  File
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line
> 341, in execute*
>
> *django.setup()*
>
> *  File "/Library/Python/2.7/site-packages/django/__init__.py", line 22, in 
> setup*
>
> *configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)*
>
> *  File "/Library/Python/2.7/site-packages/django/utils/log.py", line 69, in
> configure_logging*
>
> *logging_config_func = import_string(logging_config)*
>
> *  File "/Library/Python/2.7/site-packages/django/utils/module_loading.py",
> line 27, in import_string*
>
> *six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])*
>
> *  File "/Library/Python/2.7/site-packages/django/utils/module_loading.py",
> line 23, in import_string*
>
> *return getattr(module, class_name)*
>
> **
>
> *ImportError: Module "logging.config" does not define a "dictConfig"
> attribute/class*
>
> *
> *
>
> Any thoughts?
>
>
> Thanks,
>
> PS
>
> -- 
> 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
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com
> <mailto: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/ff5c496c-7be7-4ca7-a5b4-88b2744ee3c2%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ff5c496c-7be7-4ca7-a5b4-88b2744ee3c2%40googlegroups.com?utm_medium=email_source=footer>.
> 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/dc2cb83b-db26-0a27-4d94-61b8d80f6bd3%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


ImportError while starting django server

2017-02-02 Thread Parth Shah
*Folks,*

*I was following the tutorial here 
<https://docs.djangoproject.com/en/1.10/intro/tutorial01/> and was 
successfully able to install django.*

*I am using python 2.7.13 on OS X.*

*I can verify the version number as below:*


*Macitosh:project user$ python*

*Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) *

*[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin*

*Type "help", "copyright", "credits" or "license" for more information.*

*>>> import django*

*>>> print(django.get_version())*

*1.10.5*

*>>>*


*But when I try to run the version check using a different command I get 
the below error, and the same error while subsequently starting the server*


*Parths-Macitosh:project parth$ python -m django --version*

*Traceback (most recent call last):*

*  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", 
line 174, in _run_module_as_main*

*"__main__", fname, loader, pkg_name)*

*  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", 
line 72, in _run_code*

*exec code in run_globals*

*  File "/Library/Python/2.7/site-packages/django/__main__.py", line 9, in 
*

*management.execute_from_command_line()*

*  File 
"/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
line 367, in execute_from_command_line*

*utility.execute()*

*  File 
"/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
line 341, in execute*

*django.setup()*

*  File "/Library/Python/2.7/site-packages/django/__init__.py", line 22, in 
setup*

*configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)*

*  File "/Library/Python/2.7/site-packages/django/utils/log.py", line 69, 
in configure_logging*

*logging_config_func = import_string(logging_config)*

*  File "/Library/Python/2.7/site-packages/django/utils/module_loading.py", 
line 27, in import_string*

*six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])*

*  File "/Library/Python/2.7/site-packages/django/utils/module_loading.py", 
line 23, in import_string*

*return getattr(module, class_name)*

*ImportError: Module "logging.config" does not define a "dictConfig" 
attribute/class*


Any thoughts?


Thanks,

PS

-- 
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/ff5c496c-7be7-4ca7-a5b4-88b2744ee3c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError at/ No module name

2016-10-01 Thread Aravind S

Check this post 
<http://stackoverflow.com/questions/22011791/importerror-no-module-named-views>


On Thursday, December 20, 2012 at 6:57:42 PM UTC+5:30, djangobie wrote:
>
> Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>  )
>
> Did exactly the same (except, using 'djangopractice' as project name 
> instead of 'djangorocks')
> Actually It also did run twice, but than started showing ImportError.
>
> My files:
> 
> ***settings.py***
> 
> # Django settings for djangopractice project.
> #import os, django
> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_...@example.com '),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'djangopractice',  # Or path to 
> database file if using sqlite3.
> 'USER': 'root',  # Not used with sqlite3.
> 'PASSWORD': '1290',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # In a Windows environment this must be set to your system time zone.
> TIME_ZONE = 'Asia/Karachi'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale.
> USE_L10N = True
>
> # If you set this to False, Django will not use timezone-aware datetimes.
> USE_TZ = True
>
> # Absolute filesystem path to the directory that will hold user-uploaded 
> files.
> # Example: "/home/media/media.lawrence.com/media/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
> # trailing slash.
> # Examples: "http://media.lawrence.com/media/;, "http://example.com/media/
> "
> MEDIA_URL = ''
>
> # Absolute path to the directory static files should be collected to.
> # Don't put anything in this directory yourself; store your static files
> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
> # Example: "/home/media/media.lawrence.com/static/"
> STATIC_ROOT = ''
>
> # URL prefix for static files.
> # Example: "http://media.lawrence.com/static/;
> STATIC_URL = '/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> # List of finder classes that know how to find static files in
> # various locations.
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for simple clickjacking protection:
> # 'django.middleware.clickjacki

Re: django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'

2016-08-30 Thread Richard C
On second thoughts I just tried django 1.9.9 and it worked like a charm.
Good luck with the 1.10 porting everyone!


On Tuesday, 30 August 2016 21:22:19 UTC+1, Richard C wrote:
>
> Hi,
>
> I'm pretty new to this and (probably naively) trying to get django-shop 
> working with django 1.10.
> I have run into a few libraries that needed patterns() removing which I've 
> done and raised issues with the appropriate owners, but now have run into 
> this:
>
> django.template.library.InvalidTemplateLibrary: Invalid template library 
>> specified. ImportError raised when trying to load 
>> 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'
>>
>
> I've been through treebeard and the django backend but can't seem to find 
> any reference to patterns. What am I doing wrong?
>
> Thanks in advance for the clues!
>
> pip freeze:
>
>  beautifulsoup4==4.5.1
>> defusedxml==0.4.1
>> Django==1.10
>> django-admin-sortable2==0.6.4
>> django-allauth==0.27.0
>> django-angular==0.8.4
>> django-appconf==1.0.2
>> django-classy-tags==0.8.0
>> django-cms==3.3.2
>> django-compressor==2.1
>> django-filer==1.2.4
>> django-filter==0.14.0
>> django-formtools==1.0
>> django-fsm==2.4.0
>> django-fsm-admin==1.2.3
>> django-haystack==2.5.dev1
>> django-ipware==1.1.5
>> django-mptt==0.8.6
>> django-parler==1.6.5
>> django-polymorphic==1.0b1
>> django-post-office==2.0.8
>> django-rest-auth==0.8.1
>> django-sass-processor==0.4.6
>> django-sekizai==0.10.0
>> Django-Select2==5.8.9
>> -e git+
>> https://github.com/awesto/django-shop@c8b7f1fe0db4aa0e16c39e0ceff736a964fa7a3a#egg=django_shop
>> django-treebeard==4.0.1
>> djangocms-admin-style==1.2.3
>> djangocms-bootstrap3==0.1.1
>> djangocms-cascade==0.9.2
>> djangocms-text-ckeditor==3.2.0rc3
>> djangorestframework==3.4.6
>> djangoshop-stripe==0.1.4
>> drf-haystack==1.5.6
>> easy-thumbnails==2.3
>> elasticsearch==2.4.0
>> html5lib==0.99
>> jsonfield==1.0.3
>> libsass==0.11.1
>> oauthlib==1.1.2
>> Pillow==3.3.1
>> pluggy==0.3.1
>> py==1.4.31
>> Pygments==2.1.3
>> python-dateutil==2.5.3
>> python-openid==2.2.5
>> python3-openid==3.0.10
>> pytz==2016.6.1
>> rcssmin==1.0.6
>> requests==2.11.1
>> requests-oauthlib==0.6.2
>> rjsmin==1.0.12
>> six==1.10.0
>> stripe==1.37.0
>> Unidecode==0.4.19
>> urllib3==1.16
>> webencodings==0.5
>
>

-- 
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/7ce3fc48-01da-4896-a2fa-718841bee023%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'

2016-08-30 Thread Richard C
Hi,

I'm pretty new to this and (probably naively) trying to get django-shop 
working with django 1.10.
I have run into a few libraries that needed patterns() removing which I've 
done and raised issues with the appropriate owners, but now have run into 
this:

django.template.library.InvalidTemplateLibrary: Invalid template library 
> specified. ImportError raised when trying to load 
> 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'
>

I've been through treebeard and the django backend but can't seem to find 
any reference to patterns. What am I doing wrong?

Thanks in advance for the clues!

pip freeze:

 beautifulsoup4==4.5.1
> defusedxml==0.4.1
> Django==1.10
> django-admin-sortable2==0.6.4
> django-allauth==0.27.0
> django-angular==0.8.4
> django-appconf==1.0.2
> django-classy-tags==0.8.0
> django-cms==3.3.2
> django-compressor==2.1
> django-filer==1.2.4
> django-filter==0.14.0
> django-formtools==1.0
> django-fsm==2.4.0
> django-fsm-admin==1.2.3
> django-haystack==2.5.dev1
> django-ipware==1.1.5
> django-mptt==0.8.6
> django-parler==1.6.5
> django-polymorphic==1.0b1
> django-post-office==2.0.8
> django-rest-auth==0.8.1
> django-sass-processor==0.4.6
> django-sekizai==0.10.0
> Django-Select2==5.8.9
> -e 
> git+https://github.com/awesto/django-shop@c8b7f1fe0db4aa0e16c39e0ceff736a964fa7a3a#egg=django_shop
> django-treebeard==4.0.1
> djangocms-admin-style==1.2.3
> djangocms-bootstrap3==0.1.1
> djangocms-cascade==0.9.2
> djangocms-text-ckeditor==3.2.0rc3
> djangorestframework==3.4.6
> djangoshop-stripe==0.1.4
> drf-haystack==1.5.6
> easy-thumbnails==2.3
> elasticsearch==2.4.0
> html5lib==0.99
> jsonfield==1.0.3
> libsass==0.11.1
> oauthlib==1.1.2
> Pillow==3.3.1
> pluggy==0.3.1
> py==1.4.31
> Pygments==2.1.3
> python-dateutil==2.5.3
> python-openid==2.2.5
> python3-openid==3.0.10
> pytz==2016.6.1
> rcssmin==1.0.6
> requests==2.11.1
> requests-oauthlib==0.6.2
> rjsmin==1.0.12
> six==1.10.0
> stripe==1.37.0
> Unidecode==0.4.19
> urllib3==1.16
> webencodings==0.5

-- 
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/04eb579f-b873-477e-a35c-0d1909cfa36e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: No module named south

2016-05-20 Thread Frank Wiles
>From the looks of it, you need to install the requirements for
RatticDB.  There are 2 setups for MySQL or PostgreSQL listed here
https://github.com/tildaslash/RatticWeb

For the PG option you'd just run:

  pip intall -r requirements-pgsql.txt

And it will install all of the necessary PIP dependencies for you.
Hope that helps!

Frank Wiles
Revolution Systems | http://www.revsys.com/
fr...@revsys.com   | (800) 647-6298



On Fri, May 20, 2016 at 5:07 AM, Priyadharshini S
<priyadharshinis...@gmail.com> wrote:
> When i trying to install RatticDB on ubuntu 12.04
> I got this error please help me to solve
>
> ./manage.py syncdb --noinput
> Traceback (most recent call last):
>   File "./manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 353, in execute_from_command_line
> utility.execute()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 327, in execute
> django.setup()
>   File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18,
> in setup
> apps.populate(settings.INSTALLED_APPS)
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
> line 85, in populate
> app_config = AppConfig.create(entry)
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line
> 90, in create
> module = import_module(entry)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> ImportError: No module named south
>
> --
> 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/d054978e-edf3-48a9-a2e9-1526fa641c1f%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/CANgO38n9oaqhnoNku3cHM6b%2BpXSo-6h7t602qTxBRvDEZL%2B_NA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ImportError: No module named south

2016-05-20 Thread Priyadharshini S
When i trying to install RatticDB on ubuntu 12.04 
I got this error please help me to solve

./manage.py syncdb --noinput
Traceback (most recent call last):
  File "./manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 353, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 327, in execute
django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 
18, in setup
apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", 
line 85, in populate
app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 
90, in create
module = import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named south

-- 
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/d054978e-edf3-48a9-a2e9-1526fa641c1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: ImportError: No module named south

2016-05-20 Thread Priyadharshini S


On Sunday, August 11, 2013 at 5:00:54 PM UTC+5:30, alekto.a...@gmail.com 
wrote:
>
> Hi, 
> am using django==1.5.1 and south==0.8.2, as well as pip-1.1-py2.7.egg 
> (python 2.7)
> I keep getting this error: ImportError: No module named south, when I run: 
> sudo python manage.py syncdb.
> I have added south as the last line to my INSTALLED_APPS in settings.py.
>
> Does anyone here have a suggestion how to solve this? 
> Thanks in advance!
>
>

-- 
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/b462f70d-5ddb-4a8c-b1e6-bc7a7d61a55f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django ImportError: No module named admin

2016-03-19 Thread addison . slabaugh


As a result of attempting to update admin.py of one of my Django apps, I 
now get a Server Error (500) that has brought my site down. When I import 
admin from django.contrib, I get the following traceback:


Traceback (most recent call last): File 
"/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 
74, in autodiscover_modules import_module('%s.%s' % (app_config.name, 
module_to_search)) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
import_module __import__(name) ImportError: No module named admin

Using print_stack() gives me a little deeper insight:


File "/home/ubuntu/gather/src/foodshop/wsgi.py", line 21, in  
application = get_wsgi_application() File 
"/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in 
get_wsgi_application django.setup() File 
"/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup 
apps.populate(settings.INSTALLED_APPS) File 
"/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 115, in 
populate app_config.ready() File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/apps.py", line 22, 
in ready self.module.autodiscover() File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 
24, in autodiscover autodiscover_modules('admin', register_to=site) File 
"/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 
74, in autodiscover_modules import_module('%s.%s' % (app_config.name, 
module_to_search)) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
import_module __import__(name) File "/home/ubuntu/gather/src/recipes/admin.py", 
line 6, in  class RecipesAdmin(admin.ModelAdmin): File 
"/home/ubuntu/gather/src/recipes/admin.py", line 9, in RecipesAdmin 
traceback.print_stack()

I use this module in several other apps within my project, so I don't 
understand why it's not working for this particular app. You can see my 
very simple Python code below, which is for an admin.


*admin.py*
from django.contrib import admin
from .models import Recipes

class RecipesAdmin(admin.ModelAdmin):
 list_display = ["__unicode__", "title", "rating", "date_modified"]
 prepopulated_fields = {"slug": ("SKU",)}
 class Meta:
 model = Recipes

admin.site.register(Recipes, RecipesAdmin)



*urls.py*

from django.conf import settings from django.conf.urls import include, url from 
django.conf.urls.static import static from django.contrib import admin from 
django.conf.urls import patterns, url, include from djangoratings.views import 
AddRatingFromModel urlpatterns = [ url(r'^$', 'customers.views.home', 
name='home'), url(r'^home/', 'customers.views.home', name='home'), 
url(r'^about/', 'recipes.views.about', name='about'), url(r'^menu/', 
'recipes.views.menu', name='menu'), url(r'^donate/', 'recipes.views.menu', 
name='menu'), # url(r'^contact/', 'recipes.views.contact', name='contact'), 
url(r'^admin/', include(admin.site.urls)), url(r'^about/healthy/', 
'recipes.views.healthy', name='healthy'), url(r'^about/premade/', 
'recipes.views.premade', name='premade'), url(r'^about/exceptional/', 
'recipes.views.exceptional', name='exceptional'), url(r'^accounts/', 
include('registration.backends.default.urls')), url(r'^cart/', 
'cart.views.get_cart', name='get_cart'), url(r'^add/', 'recipes.views.menu', 
name='menu'), # url(r'^add/(?P[-\w]+)/id=(?P[-\w]+)/$', 
'cart.views.add_to_cart', name='shopping-cart-add'), 
url(r'^update/(?P[-\w]+)/$', 'cart.views.specific_qty', 
name='shopping-cart-specify'), url(r'^remove/(?P[-\w]+)/$', 
'cart.views.remove_from_cart', name='shopping-cart-remove'), 
url(r'^subtract/(?P[-\w]+)/$', 'cart.views.subtract_from_cart', 
name='shopping-cart-subtract'), url(r'^clear_cart/', 'cart.views.clear_cart', 
name='shopping-cart-clear'), 
url(r'^contact/$','contact.views.email',name='email'), 
url(r'^feedback/$','contact.views.feedback',name='feedback'), url(r'^thanks/$', 
'contact.views.thanks',name='thanks'), url(r'^profile/$', 'cart.views.profile', 
name='profile'), url(r'^profile/new/$', 'cart.views.new_profile', 
name='new_profile'), url(r'^profile/error/$', 'cart.views.qty_error', 
name='qty_error'), url(r'^profile/cancel/$', 'cart.views.cancel_sub', 
name='cancel_sub'), url(r'^profile/feedback/$', 'recipes.views.feedback', 
name='feedback'), url(r'^rate/(?P\d+)/(?P\d+)/', 
AddRatingFromModel(), { 'app_label': 'recipes', 'model': 'recipes', 
'field_name': 'rating', }), url(r'^charge/$', 'cart.views.charge', 
name='charge'), url(r'^subscription/charge/$', 'cart.views.pay', name='pay'), 
url(r'^frequently_asked/$', 'cart.views.frequently_asked', 
name='frequently_asked'), url(r'^tender/$', 'cart.views.weekly_orders', 
name='weekly_orders'), url(r'^tender_postmates/$', 
'cart.views.tender_postmates', name='tender_postmates') 

Django ImportError: No module named admin

2016-03-18 Thread addison . slabaugh
As a result of attempting to update admin.py of one of my Django apps, I 
now get a Server Error (500) that has brought my site down. When I import 
admin from django.contrib, I get the following traceback:

Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", 
line 74, in autodiscover_modules
   import_module('%s.%s' % (app_config.name, module_to_search))
 File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
   __import__(name)
ImportError: No module named admin

Using print_stack() gives me a little deeper insight:

File "/home/ubuntu/gather/src/foodshop/wsgi.py", line 21, in 
  application = get_wsgi_application()
File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, 
in get_wsgi_application
  django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, 
in setup
  apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 
115, in populate
  app_config.ready()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/apps.py", 
line 22, in ready
  self.module.autodiscover()
File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", 
line 24, in autodiscover
  autodiscover_modules('admin', register_to=site)
File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py"
, line 74, in autodiscover_modules
  import_module('%s.%s' % (app_config.name, module_to_search))
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
  __import__(name)
File "/home/ubuntu/gather/src/recipes/admin.py", line 6, in 
  class RecipesAdmin(admin.ModelAdmin):
File "/home/ubuntu/gather/src/recipes/admin.py", line 9, in RecipesAdmin
  traceback.print_stack()

I use this module in several other apps within my project, so I don't 
understand why it's not working for this particular app. You can see my 
very simple Python code below, which is for an admin.

*admin.py*
from django.contrib import admin
from .models import Recipes

class RecipesAdmin(admin.ModelAdmin):
list_display = ["__unicode__", "title", "rating", "date_modified"]
prepopulated_fields = {"slug": ("SKU",)}
class Meta:
model = Recipes

admin.site.register(Recipes, RecipesAdmin)

*urls.py*
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.conf.urls import patterns, url, include
from djangoratings.views import AddRatingFromModel

urlpatterns = [

url(r'^$', 'customers.views.home', name='home'),
url(r'^home/', 'customers.views.home', name='home'),
url(r'^about/', 'recipes.views.about', name='about'),
url(r'^menu/', 'recipes.views.menu', name='menu'),
url(r'^donate/', 'recipes.views.menu', name='menu'),
# url(r'^contact/', 'recipes.views.contact', name='contact'),

url(r'^admin/', include(admin.site.urls)),

url(r'^about/healthy/', 'recipes.views.healthy', name='healthy'),
url(r'^about/premade/', 'recipes.views.premade', name='premade'),
url(r'^about/exceptional/', 'recipes.views.exceptional', name=
'exceptional'),

url(r'^accounts/', include('registration.backends.default.urls')),

url(r'^cart/', 'cart.views.get_cart', name='get_cart'),
url(r'^add/', 'recipes.views.menu', name='menu'),
# url(r'^add/(?P[-\w]+)/id=(?P[-\w]+)/$', 
'cart.views.add_to_cart', name='shopping-cart-add'),
url(r'^update/(?P[-\w]+)/$', 'cart.views.specific_qty', name
='shopping-cart-specify'),
url(r'^remove/(?P[-\w]+)/$', 'cart.views.remove_from_cart', 
name='shopping-cart-remove'),
url(r'^subtract/(?P[-\w]+)/$', 
'cart.views.subtract_from_cart', name='shopping-cart-subtract'),
url(r'^clear_cart/', 'cart.views.clear_cart', name='shopping-cart-clear'
),

url(r'^contact/$','contact.views.email',name='email'),
url(r'^feedback/$','contact.views.feedback',name='feedback'),
url(r'^thanks/$', 'contact.views.thanks',name='thanks'),
url(r'^profile/$', 'cart.views.profile', name='profile'),
url(r'^profile/new/$', 'cart.views.new_profile', name='new_profile'),
url(r'^profile/error/$', 'cart.views.qty_error', name='qty_error'),
url(r'^profile/cancel/$', 'cart.views.cancel_sub', name='cancel_sub'),
url(r'^profile/feedback/$', 'recipes.views.feedback', name='feedback'),

url(r'^rate/(?P\d+)/(?P\d+)/', AddRatingFromModel(), {
'app_label': 'recipes',
'model': 'recipes',
'field_name': 'rating',
}),

url(r'^charge/$', 'cart.views.charge', name='charge'),
url(r'^subscription/charge/$', 'cart.views.pay', name='pay'),

url(r'^frequently_asked/$', 'cart.views.frequently_asked', name=

Re: ImportError: no module named polls

2016-01-25 Thread James Schneider
On Jan 25, 2016 1:05 PM, "moon jo"  wrote:
>
> Using django 1.6.10
> I finished the polls tutorial and tried to create my own project.
> I tried to runserver and it gives me the import error. But it's a blank
project, haven't added anything in the settings.
> When I do import settings form django.conf and print
settings.INSTALLED_APPS, it prints this:
>
> ('django.contrib.auth', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sites',
'django.contrib.messages', 'django.contrib.staticfiles',
'django.contrib.admin', 'polls')
>
> Where is that 'polls' coming from? Every project I create, I get the same
error, they're looking for the 'polls' app.

Firstly, 1.6 is EoL, please upgrade your Django installation to a supported
version (>=1.8).

Django will not add this app to your settings.py on its own. Either you are
not using the official Django distribution, or something else is going on.
You are creating a new project with 'django-admin startproject
' right?

-James

-- 
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%2Be%2BciUjxBKM-nm-CsWMxGiO9q%2BeBdoLqY1TtomLj984-4Hpqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: no module named polls

2016-01-25 Thread Rafael E. Ferrero
if its a blank project you don't have a polls app yet,so... why you put
your polls app there?


Rafael E. Ferrero

2016-01-25 16:14 GMT-03:00 moon jo :

> Using django 1.6.10
> I finished the polls tutorial and tried to create my own project.
> I tried to runserver and it gives me the import error. But it's a blank
> project, haven't added anything in the settings.
> When I do import settings form django.conf and print
> settings.INSTALLED_APPS, it prints this:
>
> ('django.contrib.auth', 'django.contrib.contenttypes',
> 'django.contrib.sessions', 'django.contrib.sites',
> 'django.contrib.messages', 'django.contrib.staticfiles',
> 'django.contrib.admin', 'polls')
>
> Where is that 'polls' coming from? Every project I create, I get the same
> error, they're looking for the 'polls' 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 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/df91e3ff-aa9e-424a-9db2-f8d7091003a3%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/CAJJc_8W8nvOFKogPWfWOwVrZ0HRP7WDOqdGug4gp5EMaBxMcxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ImportError: no module named polls

2016-01-25 Thread moon jo
Using django 1.6.10
I finished the polls tutorial and tried to create my own project.
I tried to runserver and it gives me the import error. But it's a blank 
project, haven't added anything in the settings.
When I do import settings form django.conf and print 
settings.INSTALLED_APPS, it prints this:

('django.contrib.auth', 'django.contrib.contenttypes', 
'django.contrib.sessions', 'django.contrib.sites', 
'django.contrib.messages', 'django.contrib.staticfiles', 
'django.contrib.admin', 'polls')

Where is that 'polls' coming from? Every project I create, I get the same 
error, they're looking for the 'polls' 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 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/df91e3ff-aa9e-424a-9db2-f8d7091003a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: No module named security(SOLVED)

2016-01-04 Thread Gary Roach
Dead On knbk. I commented out the security line and the problem when 
poof. Thank you.


Gary R.

On 01/04/2016 06:29 PM, knbk wrote:
Seems like you have SecurityMiddleware in your middleware settings, 
which wasn't added until 1.8. If you started your project on 1.8+. 
your default settings file would include the new middleware and cause 
this error on 1.7.


On Tuesday, January 5, 2016 at 2:56:51 AM UTC+1, Gary Roach wrote:

I've been trying different things with django and different
tutorials. I
was using Ninja as my IDE but had to give it up because of lack of
support. I just switched to Eclipse with the PyDev plugin. (No I cant
get Pycharm). The IDE is complicated but seems to do everything I
wish
it to do if I work at it long enough.

The problem:
I am working on Tango With Django tutorial and have a virtual
environment setup with Python 2.7 and Django 1.7 . Debian Linux is
still
stuck with Eclipse 3.8 so I installed Eclipse Mars (4.5) from source.
The project properties show that python 2.7 is sourced from the
virtual
environment's local/bin/ directory. Both Python 2.7 and Django 1.7
were
installed in the virtual environment using pip with the no site
packages
switch. So everything should be walled off from the rest of the
system.
Further, the project was working OK until I tried to access the
/admin/
app. It hasn't worked since.

When I run debug on the project no errors show and the internal web
server starts fine. When I try to access either the rango/ app, the
admin/ app or just the 127.0.0.1:8000 <http://127.0.0.1:8000>
basic url the browser shows "A
server error occurred.  Please contact the administrator." The
Eclipse
console shows the following:

Traceback (most recent call last):
   File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
 self.result = application(self.environ, self.start_response)
   File

"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py",

line 64, in __call__
 return self.application(environ, start_response)
   File

"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py",

line 168, in __call__
 self.load_middleware()
   File

"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",

line 44, in load_middleware
 mw_class = import_string(middleware_path)
   File

"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/utils/module_loading.py",

line 26, in import_string
 module = import_module(module_path)
   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
import_module
 __import__(name)
ImportError: No module named security
[05/Jan/2016 00:21:51] "GET / HTTP/1.1" 500 59

I notice that the first and last items on the traceback list are
pulling
data from the global (system) python package. I've searched the
net for
information. This problem shows up several times but It is obvious
that
no one really understands what is causing it. I rebooted the
system but
the problem persisted. Any help will be sincerely appreciated.

Gary R.





--
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/568B3244.8070704%40verizon.net.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: No module named security

2016-01-04 Thread knbk
Seems like you have SecurityMiddleware in your middleware settings, which 
wasn't added until 1.8. If you started your project on 1.8+. your default 
settings file would include the new middleware and cause this error on 1.7. 

On Tuesday, January 5, 2016 at 2:56:51 AM UTC+1, Gary Roach wrote:
>
> I've been trying different things with django and different tutorials. I 
> was using Ninja as my IDE but had to give it up because of lack of 
> support. I just switched to Eclipse with the PyDev plugin. (No I cant 
> get Pycharm). The IDE is complicated but seems to do everything I wish 
> it to do if I work at it long enough. 
>
> The problem: 
> I am working on Tango With Django tutorial and have a virtual 
> environment setup with Python 2.7 and Django 1.7 . Debian Linux is still 
> stuck with Eclipse 3.8 so I installed Eclipse Mars (4.5) from source. 
> The project properties show that python 2.7 is sourced from the virtual 
> environment's local/bin/ directory. Both Python 2.7 and Django 1.7 were 
> installed in the virtual environment using pip with the no site packages 
> switch. So everything should be walled off from the rest of the system. 
> Further, the project was working OK until I tried to access the /admin/ 
> app. It hasn't worked since. 
>
> When I run debug on the project no errors show and the internal web 
> server starts fine. When I try to access either the rango/ app, the 
> admin/ app or just the 127.0.0.1:8000 basic url the browser shows "A 
> server error occurred.  Please contact the administrator." The Eclipse 
> console shows the following: 
>
> Traceback (most recent call last): 
>File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run 
>  self.result = application(self.environ, self.start_response) 
>File 
> "/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py",
>  
>
> line 64, in __call__ 
>  return self.application(environ, start_response) 
>File 
> "/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py",
>  
>
> line 168, in __call__ 
>  self.load_middleware() 
>File 
> "/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",
>  
>
> line 44, in load_middleware 
>  mw_class = import_string(middleware_path) 
>File 
> "/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/utils/module_loading.py",
>  
>
> line 26, in import_string 
>  module = import_module(module_path) 
>File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
> import_module 
>  __import__(name) 
> ImportError: No module named security 
> [05/Jan/2016 00:21:51] "GET / HTTP/1.1" 500 59 
>
> I notice that the first and last items on the traceback list are pulling 
> data from the global (system) python package. I've searched the net for 
> information. This problem shows up several times but It is obvious that 
> no one really understands what is causing it. I rebooted the system but 
> the problem persisted. Any help will be sincerely appreciated. 
>
> Gary R. 
>
>
>
>

-- 
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/aa6f7641-a431-4ede-8805-07254713a78c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ImportError: No module named security

2016-01-04 Thread Gary Roach
I've been trying different things with django and different tutorials. I 
was using Ninja as my IDE but had to give it up because of lack of 
support. I just switched to Eclipse with the PyDev plugin. (No I cant 
get Pycharm). The IDE is complicated but seems to do everything I wish 
it to do if I work at it long enough.


The problem:
I am working on Tango With Django tutorial and have a virtual 
environment setup with Python 2.7 and Django 1.7 . Debian Linux is still 
stuck with Eclipse 3.8 so I installed Eclipse Mars (4.5) from source. 
The project properties show that python 2.7 is sourced from the virtual 
environment's local/bin/ directory. Both Python 2.7 and Django 1.7 were 
installed in the virtual environment using pip with the no site packages 
switch. So everything should be walled off from the rest of the system. 
Further, the project was working OK until I tried to access the /admin/ 
app. It hasn't worked since.


When I run debug on the project no errors show and the internal web 
server starts fine. When I try to access either the rango/ app, the 
admin/ app or just the 127.0.0.1:8000 basic url the browser shows "A 
server error occurred.  Please contact the administrator." The Eclipse 
console shows the following:


Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
  File 
"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", 
line 64, in __call__

return self.application(environ, start_response)
  File 
"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", 
line 168, in __call__

self.load_middleware()
  File 
"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/core/handlers/base.py", 
line 44, in load_middleware

mw_class = import_string(middleware_path)
  File 
"/home/gary/workspace/TangoWithDjango/local/lib/python2.7/site-packages/django/utils/module_loading.py", 
line 26, in import_string

module = import_module(module_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
import_module

__import__(name)
ImportError: No module named security
[05/Jan/2016 00:21:51] "GET / HTTP/1.1" 500 59

I notice that the first and last items on the traceback list are pulling 
data from the global (system) python package. I've searched the net for 
information. This problem shows up several times but It is obvious that 
no one really understands what is causing it. I rebooted the system but 
the problem persisted. Any help will be sincerely appreciated.


Gary R.



--
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/568B2287.6000203%40verizon.net.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError at/ No module name

2015-11-07 Thread Scott Anderson
We just tripped across something similar here as well. The person doing the 
tutorial had flipped the 'startup' and 'put "blog" in the INSTALLED_APPS' 
steps of the tutorial. She commented out 'blog' from INSTALLED_APPS and 
startapp worked as intended.

-scott

On Sunday, August 11, 2013 at 8:11:11 PM UTC-4, Pranay Shah wrote:
>
> I just want to thank everyone. I had an error "no module name image" since 
> yesterday nite. I googled and found out that I need to install python image 
> library. I did that. I still continued getting error. Just then I came 
> across this post where someone was getting "no module... blog". I read it 
> and found out the prob. Initially I had an "image" view which I deleted 
> last nite as I was no longer gonna use it. But I didnt remove its mapping 
> form the urls.py. I commented the lines for image - views and it worked.
>
> Thank you all. Now I shall start working on the actual stuff which I was 
> supposed to work from last nite. Its actually my internship homework.
>
> Thank you once again. 
>
> On Thursday, 20 December 2012 05:27:42 UTC-8, djangobie wrote:
>>
>> Hi, I have just started practicing a tutorial for buidling a  basic blog 
>> ( 
>> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>>  )
>>
>> Did exactly the same (except, using 'djangopractice' as project name 
>> instead of 'djangorocks')
>> Actually It also did run twice, but than started showing ImportError.
>>
>> My files:
>> 
>> ***settings.py***
>> 
>> # Django settings for djangopractice project.
>> #import os, django
>> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
>> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>>
>> DEBUG = True
>> TEMPLATE_DEBUG = DEBUG
>>
>> ADMINS = (
>> # ('Your Name', 'your_...@example.com'),
>> )
>>
>> MANAGERS = ADMINS
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.mysql', # Add 
>> 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
>> 'NAME': 'djangopractice',  # Or path to 
>> database file if using sqlite3.
>> 'USER': 'root',  # Not used with sqlite3.
>> 'PASSWORD': '1290',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for 
>> localhost. Not used with sqlite3.
>> 'PORT': '',  # Set to empty string for 
>> default. Not used with sqlite3.
>> }
>> }
>>
>> # Local time zone for this installation. Choices can be found here:
>> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
>> # although not all choices may be available on all operating systems.
>> # In a Windows environment this must be set to your system time zone.
>> TIME_ZONE = 'Asia/Karachi'
>>
>> # Language code for this installation. All choices can be found here:
>> # http://www.i18nguy.com/unicode/language-identifiers.html
>> LANGUAGE_CODE = 'en-us'
>>
>> SITE_ID = 1
>>
>> # If you set this to False, Django will make some optimizations so as not
>> # to load the internationalization machinery.
>> USE_I18N = True
>>
>> # If you set this to False, Django will not format dates, numbers and
>> # calendars according to the current locale.
>> USE_L10N = True
>>
>> # If you set this to False, Django will not use timezone-aware datetimes.
>> USE_TZ = True
>>
>> # Absolute filesystem path to the directory that will hold user-uploaded 
>> files.
>> # Example: "/home/media/media.lawrence.com/media/"
>> MEDIA_ROOT = ''
>>
>> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
>> # trailing slash.
>> # Examples: "http://media.lawrence.com/media/;, "
>> http://example.com/media/;
>> MEDIA_URL = ''
>>
>> # Absolute path to the directory static files should be collected to.
>> # Don't put anything in this directory yourself; store your static files
>> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
>> # Example: "/home/media/media.lawrence.com/static/"
>> STATIC_ROOT = ''
>>
>> # URL prefix for static files.
>> # Example: "http://media.lawrence.com/static/;
>> STATIC_URL = '/static/'
>>
>> # Additional locations of static files
>> STATICFILES_DIRS = (
>> # Put strings here, like "/home/html/static&q

ImportError after some updates

2015-07-17 Thread Marta J.
Hi, I am following tutorial (for Django 1.8 
<https://docs.djangoproject.com/en/1.8/intro/tutorial01/>), I am using 
Windows 8, Pycharm, Python 2.7.9 and Django 1.8.3.
I have reached the third chapter (on views) and somewhere on the way I 
restarted my laptop and probably installed some updates. Out of sudden the 
commands "python manage.py ..." stopped working (to be precise I was trying 
to use python manage.py runserver command), and I was getting ImportError 
(a long stack trace with info Import by filename is not supported). 
So I moved my project to trash and tried to start a new project but was not 
able to run django-admin startproject :(
The present stacktrace (still with ImportError) refers to __init__.py in 
importlib directory (C:/Python27/Lib/importlib/__init__.py) and it seems to 
hate  __import__(name) part of import_module function. 
Could anyone help me on that as I cannot see what has changed since when 
everything worked smoothly :(
Here's the __init__.py code:

"""Backport of importlib.import_module from 3.x."""
# While not critical (and in no way guaranteed!), it would be nice to keep 
this
# code compatible with Python 2.3.
import sys

def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, 'rindex'):
raise ValueError("'package' not set to a string")
dot = len(package)
for x in xrange(level, 1, -1):
try:
dot = package.rindex('.', 0, dot)
except ValueError:
raise ValueError("attempted relative import beyond top-level "
  "package")
return "%s.%s" % (package[:dot], name)


def import_module(name, package=None):
"""Import a module.

The 'package' argument is required when performing a relative import. It
specifies the package to use as the anchor point from which to resolve 
the
relative import to an absolute import.

"""
if name.startswith('.'):
if not package:
raise TypeError("relative imports require the 'package' 
argument")
level = 0
for character in name:
if character != '.':
break
level += 1
name = _resolve_name(name[level:], package, level)
__import__(name)
return sys.modules[name]

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9c734b44-61e6-4400-9b0e-da07806621db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.8 ImportError: No module named formtools

2015-03-12 Thread Alasdair Nicol

On 11/03/15 14:22, Neto wrote:

Hi Simon,

pip install django-formtools doesn't work.

Could not find any downloads that satisfy the requirement django-formtools



It looks like it hasn't been django-formtools hasn't been released on 
PyPi yet. There's an issue [1] on the github repository to make a PyPi 
release.


Django 1.8 is in beta at the moment, hopefully django-formtools will be 
on PyPi by the time Django 1.8 is released. In the meantime, you can 
install django-formtools from github with:


pip install git+ssh://g...@github.com/django/django-formtools

Cheers,
Alasdair

[1]: https://github.com/django/django-formtools/issues/5


Em quarta-feira, 11 de março de 2015 03:12:06 UTC-3, Simon Charette
escreveu:

Hi Neto,

Here's an excerpt from the Django 1.8 release note

<https://docs.djangoproject.com/en/dev/releases/1.8/#removal-of-django-contrib-formtools>:

The formtools contrib app has been moved into a separate
package. *django.contrib.formtools* itself has been removed. The
docs provide migration instructions

<https://docs.djangoproject.com/en/dev/ref/contrib/formtools/#formtools-how-to-migrate>.

The new package is available on Github
<https://github.com/django/django-formtools/> and on PyPI.


TLDR; pip install django-formtoolsand replace all your references to
*django.contrib.formtools* to *formtools*.

Simon

Le mercredi 11 mars 2015 00:33:29 UTC-4, Neto a écrit :

I'm trying to use form wizard but when I put
'django.contrib.formtools', in INSTALLED_APPS appear on my
terminal 'ImportError: No module named formtools'

--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/4bc1d119-292b-4514-bce3-b2a0e9176e7e%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/4bc1d119-292b-4514-bce3-b2a0e9176e7e%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.



--
Alasdair Nicol
Developer, MEMSET

mail: alasd...@memset.com
 web: http://www.memset.com/

Memset Ltd., registration number 4504980.
Building 87, Dunsfold Park, Stovolds Hill, Cranleigh, Surrey, GU6 8TB, UK

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55005756.50306%40memset.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   6   >