Git Product home page Git Product logo

djangocms-installer's Issues

check for libjpeg-dev before installing pillow

I ran into the situation that the installer fails at the end when Pillow is not compiled / installed with libjpeg support.

There are two things I'd like to propose that could be done to help users getting along wih this:

  • check if libjpeg is there before installing pillow - because we already know it will fail otherwise
  • if the former is not possible or hard to do (it might be hard to detect properly if the dev files are there on all platforms you might want to support, but it might also be possible, I'm not a C lib expert) - there should be at least a better hint on what is to do - install libjpeg-dev or some similar package, uninstall pillow, delete all remaninders from the previous aldryn run (project dir, manage.py), run aldryn again

-p option isn't optional when using django 1.5.5

When using django 1.5.5 instead of for example 1.5, and not giving the -p option, there is an error - and not exactly one that helps users to understand what's happening.

It just says - after a few seconds of nothing happening:

Error while creating target project, please check the given configuration

It should be saying that since django 1.5.5 -p must be given - or better, we might implement it differently, and use the project name as default, and male -p optional if the user wants it differently.
It's not uncommon or django projects that the project and main app have the same name.

Unexecuted test asserts in tests/config.py

In the tests for the configuration checks there are multiple assertions that are never executed.

Reason for this is that they are indented to be part of the with block, while they must be outside, after the with block to actually be executed.

I tried to fix that, but after getting the assertions to be executed, I fail to get them to be run properly. I might not yet have fully understood how the mock.patch that is used there works, so I guess that need to be figured out.

install failing when trying to use Use Twitter Bootstrap Theme = yes

Failure:
raise TemplateDoesNotExist(name)
"django.template.base.TemplateDoesNotExist: fullwidth.html"

Defect:
in file: djangocms_installer/django/init.py
method: _build_settings(config_data):

relevant buggy code:

if config_data.bootstrap == 'yes':
cms_templates = 'CMS_TEMPLATES_BOOTSTRAP'
else:
cms_templates = 'CMS_TEMPLATES'

Should be:

if config_data.bootstrap:
cms_templates = 'CMS_TEMPLATES_BOOTSTRAP'
else:
cms_templates = 'CMS_TEMPLATES'

Can't add multiple languages in interactive mode

$ Languages to enable. Option can be provided multiple times, or as a comma separated list: en,de

ends up with these languages:

  • e
  • n
  • ,
  • d
  • e

also tried:

  • "en","de" -> " becomes a language too
  • en;de

but they didn't work either

missing or invalid reference to json file

(env)[rui@alarm demo]$ python starting_page.py
Traceback (most recent call last):
File "starting_page.py", line 15, in
with open('starting_page.json') as data_file:
FileNotFoundError: [Errno 2] No such file or directory: 'starting_page.json'

settings.py created with 3 duplicate, and 1 redundant, setting

On Ubuntu 13.04 Raring, in version 0.3.4, when running the installer with the values suggested in the tutorial:

SITE_ID, STATIC_ROOT, STATICFILES_DIRS are all created twice.
BASE_DIR is created once, only referenced when setting STATIC_ROOT (which overwrites the previously set value of STATIC_ROOT). Does BASE_DIR need to exist if PROJECT_PATH already exists?

Also, PROJECT_PATH is set to the my_demo subdirectory containing settings.py rather than its parent directory containing manage.py. Is this deliberate? Isn't PROJECT_PATH normally set to the root project directory?

DJANGO_SETTINGS_MODULE not set raises error

(env)[rui@alarm demo]$ python starting_page.py
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/django/conf/init.py", line 38, in _setup
settings_module = os.environ[ENVIRONMENT_VARIABLE]
File "/home/rui/workspace/demo/env/lib/python3.3/os.py", line 676, in getitem
raise KeyError(key) from None
KeyError: 'DJANGO_SETTINGS_MODULE'

exception

ownloading/unpacking django-cms from https://github.com/divio/django-cms.git@develop
HTTP error 404 while getting https://github.com/divio/django-cms.git@develop
Could not install requirement django-cms from https://github.com/divio/django-cms.git@develop because of error HTTP Error 404: Not Found
Cleaning up...
Could not install requirement django-cms from https://github.com/divio/django-cms.git@develop because of HTTP error HTTP Error 404: Not Found for URL https://github.com/divio/django-cms.git@develop
Storing complete log in /Users/patricklauber/.pip/pip.log
Traceback (most recent call last):
File "/Users/patricklauber/Documents/workspace/test_project/env/bin/aldryn", line 8, in
load_entry_point('aldryn-installer==0.1.0', 'console_scripts', 'aldryn')()
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/main.py", line 22, in execute
install.check_install(config_data)
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/install/init.py", line 52, in check_install
raise EnvironmentError("\n".join(errors))
EnvironmentError: Pillow is not installed check for installation errors

Windows, virtualenv & python

You need to make sure the python extensions and filetype are associated correctly and to the current virtualenv. Currently, windows just uses the globally install python.

C:\Windows\system32> assoc .py=Python.file
.py=Python.file

and

C:\Windows\system32> ftype Python.File="C:\Users\Username\workspace\demo\env\Scripts\python.exe" "%1" %*
Python.File="C:\Users\Username\workspace\demo\env\Scripts\python.exe" "%1" %*

plugin is missing in settings.py

I installed django-cms dev 14 with django 1.6 and filer plugins using djangocms-installer . cmsplugin_filer_image is not in settings.py and so it is not available in the browser in frontend.
Also MEDIA_URL and MEDIA_ROOT are not defined in settings.py , which is not explained in tutorial on using djangocms-installer.

test as project name invalid, maybe make sure it does not has conflict with existing modules and dependencies

Successfully installed django-classy-tags south html5lib Pillow django-mptt django-sekizai Django django-reversion djangocms-text-ckeditor djangocms-admin-style djangocms-column djangocms-style django-cms
Cleaning up...
CommandError: 'test' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.
Traceback (most recent call last):
File "/Users/patricklauber/Documents/workspace/test_project/env/bin/aldryn", line 8, in
load_entry_point('aldryn-installer==0.1.0', 'console_scripts', 'aldryn')()
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/main.py", line 23, in execute
django.create_project(config_data)
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/django/init.py", line 31, in create_project
raise EnvironmentError(message)
EnvironmentError: Command '['django-admin.py', 'startproject', 'test']' returned non-zero exit status 1

verbose output on demand

Up until the point where the installer runs some database stuff, the user can sit a few seconds or longer (e.g. when network is slow and dependencies are installed) in front of the command, appearing nothing is happening.

Even without verbose option chosen, there should be some message to the user that aldryn installer is actually doin something.

It miught also be interesting to only print out all the other stuff - database migrations and such, when verbosity is requested, oitherwise just a short message "running migrations", "installing dependencies" , etc.

exception

File "/Users/patricklauber/Documents/workspace/test_project/env/bin/aldryn-installer", line 8, in
load_entry_point('aldryn-installer==0.1.0', 'console_scripts', 'aldryn-installer')()
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/main.py", line 13, in execute
config_data = config.parse(sys.argv[1:])
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/config/init.py", line 118, in parse
requirements.append(args.db_driver)
AttributeError: 'Namespace' object has no attribute 'db_driver'

ImportError: No module named compat.dj

When I use "djangocms -p . my_demo", and the error ocurr.

ImportError: No module named compat.dj Traceback (most recent call last): File "./env/bin/djangocms", line 9, in load_entry_point('djangocms-installer==0.3.1', 'console_scripts', 'djangocms')() File "/home/colin4124/D/MyProject/Try/django/demo/env/local/lib/python2.7/site-packages/djangocms_installer/main.py", line 29, in execute django.setup_database(config_data) File "/home/colin4124/D/MyProject/Try/django/demo/env/local/lib/python2.7/site-packages/djangocms_installer/django/**init**.py", line 227, in setup_database "manage.py", "syncdb", "--all", "--noinput"]) File "/usr/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/colin4124/D/MyProject/Try/django/demo/env/bin/python', '-W', 'ignore', 'manage.py', 'syncdb', '--all', '--noinput']' returned non-zero exit status 1

-q should use default values where nothing is specified

I believe that all config options should have a default, and in fact, in the interactive run, they have.

As such, when running on the command line with -q, I expect the installer to use defaults where I don't specify anything explicitly.

I think that's the most convenient way for everybody to deal with.

Like this people can write scripts to fully automate a new project setup with minimum effort, as they only need to specify non default values, at the same time everybody wanting to specify anything can still do so.

other exception

atabase configuration (in URL format) [default sqlite://locahost/project.db]:
django CMS version (choices: 2.4, stable, beta, develop) [default stable]: develop
Django version (choices: 1.4, 1.5, stable) [default stable]: 1.5
Activate Django I18N / L10N setting (choices: yes, no) [default yes]: yes
Install and configure reversion support (choices: yes, no) [default yes]:
Languages to enable. Option can be provided multiple times, or as a comma separated list: de,fr
Optional default time zone [default America/Chicago]:
Activate Django timezone support (choices: yes, no) [default yes]:
Activate CMS permission management (choices: yes, no) [default yes]:
Downloading/unpacking https://github.com/divio/django-cms/archive/develop.zip
Downloading develop.zip (2.7MB): 2.7MB downloaded
Running setup.py egg_info for package from https://github.com/divio/django-cms/archive/develop.zip

warning: no files found matching '*' under directory 'stacks/templates'
warning: no previously-included files matching '*.pyc' found under directory '*'

Requirement already satisfied (use --upgrade to upgrade): django-classy-tags>=0.3.4.1 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): south>=0.7.2 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): html5lib in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Pillow>=2 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): django-mptt>=0.5.1,<0.5.3 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): django-sekizai>=0.7 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Django<1.6 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): django-reversion>=1.7,<1.8 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): djangocms-text-ckeditor>=2 in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): djangocms-admin-style in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): djangocms-column from git+https://github.com/divio/djangocms-column.git#egg=djangocms-column in ./env/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): djangocms-style from git+https://github.com/divio/djangocms-style.git#egg=djangocms-style in ./env/lib/python2.7/site-packages
Cleaning up...
Traceback (most recent call last):
File "/Users/patricklauber/Documents/workspace/test_project/env/bin/aldryn", line 8, in
load_entry_point('aldryn-installer==0.1.0', 'console_scripts', 'aldryn')()
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/main.py", line 24, in execute
django.patch_settings(config_data)
File "/Users/patricklauber/Documents/workspace/test_project/env/lib/python2.7/site-packages/aldryn_installer/django/init.py", line 59, in patch_settings
with open(config_data.settings_path, 'r') as fd_original:
IOError: [Errno 2] No such file or directory: 'test_project/settings.py'

Python3 compatibility

Hello!

I have both Python versions installed on my CentOS (2.6.6 and 3.3). I would prefer running Django CMS under Python 3.3. Installation works fine until setup_database calls:

subprocess.check_call(["python", "-W", "ignore", "manage.py", "syncdb", "--all", "--noinput"])

Since "python" command runs Python 2.6.6, for which django is not installed, it fails with "No module named django.core.management" error.

Executing the command manually with python3 fails because of those renamed Django CMS plugins (already reported).

Thank you for making this tool, it will simplify the installation a lot!

Michal

when extending base.html from page.html, a base.html should be included

With a simple basic install, I realize that we end uo having the normal "index.html" template - which I do not yet see how it should be used in this blank state, and there's a page.html - which cannot be used for anything as trying to use it(e.g. by default when adding a page through the API that wants to use it) results in an error about the extended template not existing.

I'll go and make a fix for it today or tomorrow when ready with some other stuff.

Error creating admin user. I accepted default value "oubiga"

Hi,
I got this error when I was trying to install django-cms using djangocms-installer.
I set a “Hobby Dev Heroku Postgres” database url.
Os x, Python 2.7.6, pip==1.5.4 and virtualenv==1.11.4

...
Creating admin user
Username (leave blank to use 'oubiga'): 
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 102, in handle
    self.UserModel._default_manager.db_manager(database).get_by_natural_key(username)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/contrib/auth/models.py", line 167, in get_by_natural_key
    return self.get(**{self.model.USERNAME_FIELD: username})
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/query.py", line 301, in get
    num = len(clone)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/query.py", line 854, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/backends/util.py", line 69, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
django.db.utils.DatabaseError: SSL SYSCALL error: Operation timed out

Traceback (most recent call last):
  File "/Users/oubiga/Envs/uxiolopezvenv/bin/djangocms", line 11, in <module>
    sys.exit(execute())
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/djangocms_installer/main.py", line 29, in execute
    django.setup_database(config_data)
  File "/Users/oubiga/Envs/uxiolopezvenv/lib/python2.7/site-packages/djangocms_installer/django/__init__.py", line 263, in setup_database
    "manage.py", "createsuperuser"])
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/oubiga/Envs/uxiolopezvenv/bin/python', '-W', 'ignore', 'manage.py', 'createsuperuser']' returned non-zero exit status 1```

Add custom settings support

Allow user to pass extra settings argument to the installer to be merged in the generated settings file.
This is a future proof feature that enable user to provide settings required by newer version of a dependency than the one the installer has been tested on (see the easy-thumbnails 2.0 thing)

test_whitespace_project_path in tests/config.py is a copy of test_invalid_project_path

This test is just a copy paste from the other one - only differring in the one, unexecuted(see our latest learnings about the with/assertRaises) assertion

If I can get an understanding of what it's supposed to test for, I can implement it properly, but it has no docstring to explain it's intended functionality.

Otherwise I'd just like to remove it.

check_install using incorrect path to image files returns false fail

using virtualenv and following the tutorial for djcms 3.0 beta3 the path it was looking in for images was:
/home/rui/workspace/demo/env/lib/python3.3/site-packages/djangocms_installer/install/../share/test_image.png
and although the share directory was there, the png file was not, it should do an os.path.exists(file) first

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.