dreipol / djangocms-spa-vue-js

Run your django CMS project as a single-page application (SPA) with vue.js and vue-router.
MIT License
59 stars 9 forks source link

Project not working after adding 'djangocms-spa-vue-js' to settings file under installed apps #1

Open ajinkyapuar opened 6 years ago

ajinkyapuar commented 6 years ago

Description

Describe what you were trying to get done. Installed djangocms-spa-vue-js, added 'djangocms_spa_vue_js' to my settings.py under installed apps and then tried to start the server

Tell us what happened, what went wrong, and what you expected to happen. started giving errors.

What I Did

Paste the command(s) you ran and the output.
> python manage.py runserver

Unhandled exception in thread started by <function wrapper at 0x105ea8488>
Traceback (most recent call last):
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper
    fn(*args, **kwargs)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 107, in inner_run
    autoreload.raise_last_exception()
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/utils/autoreload.py", line 252, in raise_last_exception
    six.reraise(*_exception)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper
    fn(*args, **kwargs)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/username/anaconda/envs/myenv/lib/python2.7/site-packages/djangocms_spa_vue_js/models.py", line 2, in <module>
    from django.views.defaults import ERROR_404_TEMPLATE_NAME
ImportError: cannot import name ERROR_404_TEMPLATE_NAME
If there was a crash, please include the traceback here.
chschuermann commented 6 years ago

Hi @ajinkyapuar. Thanks for trying out our packages and sorry for the missing docs. Unfortunately this package depends on the variable ERROR_404_TEMPLATE_NAME that was added in Django 1.10. Do you have any change to upgrade your project, or should we implement a workaround?

ajinkyapuar commented 6 years ago

Sure I can upgrade my Django Version. Thanks. Could you also help me with the initial setup of the two packages? Here's the repository I've created for testing it out. I can add you as collaborator and create this as a sample project for future reference.

chschuermann commented 6 years ago

Hopefully I will find some time tomorrow to clone your repository and help you with the setup.

chschuermann commented 6 years ago

Could you please add me as collaborator so I can push a few changes to your code?

chschuermann commented 6 years ago

Thanks for adding me. I just pushed the branch "feature/setup" with some changes.

ajinkyapuar commented 6 years ago

Thanks a lot. Give me sometime to test it out. I shall get back to you.

ajinkyapuar commented 6 years ago

Appreciate your help! Similarly could you help with the djangocms-spa-vue-js package to setup a simple SPA?

chschuermann commented 6 years ago

Your example already includes both packages (djangocms-spa & djangocms-vue-js).

ajinkyapuar commented 6 years ago

I had started with the djangocms-spa-vue-js integration when this issue occurred. Haven't completed the steps ahead given in the README.md

chschuermann commented 6 years ago

That point is definitely not clear enough in the README. The djangocms-spa-vue-js needs the installation of djangocms-spa (incl. those installation steps).

ajinkyapuar commented 6 years ago

Yes I did complete the steps given in the djangocms-spa README. Then moved to the djangocms-spa-vue-js installation and the issue occurred after adding 'djangocms-spa-vue-js' to the settings.py file. Could you help with the next steps of djangocms-spa-vue-js package setup and a simple SPA?

chschuermann commented 6 years ago

Have you seen my feature branch? https://github.com/ajinkyapuar/djangocms-test/tree/feature/setup

I was able to setup up both packages in a working example. The only thing left is the frontend part. This package helps you for sure: https://github.com/dreipol/vue-fetch-route

ajinkyapuar commented 6 years ago

Yes I have and I was asking for help with the frontend part. Sorry to bother you so much. I will look into it myself. Thank you for all the help.