You are not logged in.

#1 2014-02-14 19:10:02

Eniotan
Member
Registered: 2009-04-08
Posts: 11

[eric] no Django project in Python3 (solved)

For my first steps in Python, I would like use Python3, with eric-ide and the Django framework.

I'd installed :
python-django 1.6.2-1
eric 5.4.0-1 (and pluginProjectDjango  3.3.2 (activate : yes ; autoactivate : yes))
python 3.3.3-1

The problem :
When I create a new project, I choose Python3 as programming language, but don't have «Django» in projects type list (it's ok with Python2).

Any idea ?

Last edited by Eniotan (2014-02-15 08:07:02)

Offline

#2 2014-02-14 19:38:16

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [eric] no Django project in Python3 (solved)

Does importing Django work in the shell?

Type python from your shell. Then at the Python prompt, try to import Django with import django.

Offline

#3 2014-02-14 20:20:51

Eniotan
Member
Registered: 2009-04-08
Posts: 11

Re: [eric] no Django project in Python3 (solved)

No problem importing Django :

$python
Python 3.3.3 (default, Nov 26 2013, 13:33:18) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> 

Offline

#4 2014-02-14 21:46:16

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [eric] no Django project in Python3 (solved)

eric-ide probably has no template for a Django project. You should be able to create an empty python project and use django there, though.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2014-02-14 22:20:27

Eniotan
Member
Registered: 2009-04-08
Posts: 11

Re: [eric] no Django project in Python3 (solved)

@progandy :
I don't mind : in this case, why a «django project item» in the menu if I select Python2 ?

Offline

#6 2014-02-14 22:26:29

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [eric] no Django project in Python3 (solved)

Maybe there is a difference between python2 and python3. or it just doesn't detect your python installation? Do you have ipython(2) installed?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#7 2014-02-14 22:40:50

Eniotan
Member
Registered: 2009-04-08
Posts: 11

Re: [eric] no Django project in Python3 (solved)

No ipython installed.
I hope there is some archers having tried to work with this software environment...

Offline

#8 2014-02-15 00:54:20

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [eric] no Django project in Python3 (solved)

I dissected the detection algorithm. It is a pretty dumb thing that does much and accomplishes almost nothing except providing errorprone code. It should work with a small patch:

sudo sed -i "s/\/python$/&3 /" /bin/django-admin3.py

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#9 2014-02-15 08:06:36

Eniotan
Member
Registered: 2009-04-08
Posts: 11

Re: [eric] no Django project in Python3 (solved)

It's ok with your patch!!!  smile

Thanks !!!

Offline

#10 2014-12-30 13:24:16

splashy
Member
Registered: 2010-08-21
Posts: 128

Re: [eric] no Django project in Python3 (solved)

Thank you progandy that helped me out.

Offline

Board footer

Powered by FluxBB