django-generate-scaffold icon indicating copy to clipboard operation
django-generate-scaffold copied to clipboard

Syntax error on install with Python 3.4 ?

Open Daneaux opened this issue 11 years ago • 6 comments
trafficstars

When installing the latest dev build (or the master branch), I get the following error:

Running setup.py install for django-generate-scaffold File "/Users/Danny/Projects/InterviewProject/dj15_env/lib/python3.4/site-packages/generate_scaffold/management/commands/generatescaffold.py", line 186 exec code in globals() ^ SyntaxError: invalid syntax

Daneaux avatar Apr 01 '14 03:04 Daneaux

Ok so, forgive me, but this is my first dive into python and django, so obviously this codebase doesn't compile with python 3.*

To get it to compile, I've changed "exec code in ..." to exec(code, globals()) And fiddled with StringIO to get it to work.

So now it compiles properly and I was able to call 'setup.py' and get it installed. Works through manage.py, sweet.

BUT: when I go to actually generate something, it fails with "reload undefined" Bummer, was super excited to use this...

Daneaux avatar Apr 01 '14 04:04 Daneaux

@Daneaux thanks for your interest and for the issue. To be honest, I haven't maintained this for a long while. Back when I made it, Django didn't even support Python 3! How times have changed! :open_mouth:

If you can get it to work and send a pull request, I'd be more than happy to merge it. And if you'd be interested in making sure it works from now on, I'd love to give you write access to the repo.

Otherwise, I'll try and debug this as soon as I can get around to it, but don't hold your breath! :sweat_smile:

modocache avatar Apr 01 '14 22:04 modocache

@modocache was this fixed by any chance? or any work around to suggest?

divyaiyer avatar Feb 16 '16 09:02 divyaiyer

@divyaiyer Thanks for your interest, but unfortunately I haven't been able to prioritize this project at all lately. I'd be happy to review pull requests that get this working with Python 3, though! :)

modocache avatar Feb 16 '16 15:02 modocache

I see. Will definitely give a try. Thank you @modocache

divyaiyer avatar Feb 17 '16 03:02 divyaiyer

https://github.com/arjamizo/django-generate-scaffold/commit/e4bc1fed110da884b63a3c9e52e851eda9b1eb89 I made it running, but still it lacks parsing command arguments

arjamizo avatar Feb 08 '18 12:02 arjamizo