Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add Coderedcms to an existing wagtail website? #327

Open
OBKF opened this issue Jul 6, 2020 · 9 comments
Open

Is it possible to add Coderedcms to an existing wagtail website? #327

OBKF opened this issue Jul 6, 2020 · 9 comments

Comments

@OBKF
Copy link

OBKF commented Jul 6, 2020

I am almost done with creating a website and I came across this cms, so I wonder if I can Integrate it into my wagtail project?

@OBKF OBKF added the Type: Question Further information is requested label Jul 6, 2020
@eeintech
Copy link

Definitely is possible, I did this myself, you'll have access to the CodeRedCMS pages that you can create content from.

@safaci2000
Copy link

I did this not long ago. The main downside is that you'll have to revisit the whole styling of the pages. Any of my current 'pages' have a certain look that needs to be updated for the CodeRedPages. Otherwise everything else works, dynamic menus, all the variety of pages that CodeRed Provides etc.

@vsalvino
Copy link
Contributor

This is completely possible, and in fact encouraged. Unfortunately we do not have a good guide on this, but here is the general idea:

  1. In a new folder, follow the coderedcms quickstart to create a new "boilerplate" project (I'll call it "myproject").
  2. Copy the myproject/website/ folder into the wagtail project. Update the wagtail project's django settings file to include the new 'website' app in INSTALLED_APPS.
  3. Review the settings from myproject/myproject/settings/base.py, and add the necessary settings to your existing wagtail project's settings. You should also do the same with myproject/myproject/urls.py.
  4. At this point you can being using coderedcms within the new website django app. Follow the example in website/models.py to add various coderedcms classes, mixins, and blocks to your other wagtail page models as needed.
  5. Don't forget to run python manage.py makemigrations website and python manage.py migrate when doing model changes.

@OBKF
Copy link
Author

OBKF commented Jul 16, 2020

Thank you all for the help,

My website isn't that dependent on Wagtail, I just need to add a way for editors to post updates and blog pages so their audience can have updates, so no worry about styling and such.

I will give it a try and ask questions if I get stuck, and thank you all again.

@OBKF
Copy link
Author

OBKF commented Oct 30, 2020

@vsalvino Thank, I ended up porting the whole thing to a new Coderedcms project since I needed to change a lot of things (bad design by me :p ).

So do I close this or leave it open for future references?

@vsalvino
Copy link
Contributor

Glad you figured it out. You can leave the issue open, I tagged it as a documentation deficiency, as we should add a guide for how to add coderedcms to an existing site.

@OBKF
Copy link
Author

OBKF commented Oct 30, 2020

@vsalvino Ok got it, at the end of the day it was really easy to customize (It could be easier to integrate your own template tho) ones you play with it a bit and it is just an app built with wagtail.

@msantoshk
Copy link

@OBKF you are right. one day I thought about why I selected coderedcms unnecessaryly. whereas I can do this same using wagtail but later got the clarity that even selecting coderedcms I can do the same customization as a wagtail. the only issue which always faces is wagtail updates are very frequent and coderedcms not integrating an update as soon as a new release of wagtail comes.

@rcoldiron rcoldiron removed the Type: Question Further information is requested label Feb 17, 2022
@vsalvino vsalvino pinned this issue Jun 9, 2022
@biofsphere
Copy link

This is completely possible, and in fact encouraged. Unfortunately we do not have a good guide on this, but here is the general idea:

  1. In a new folder, follow the coderedcms quickstart to create a new "boilerplate" project (I'll call it "myproject").
  2. Copy the myproject/website/ folder into the wagtail project. Update the wagtail project's django settings file to include the new 'website' app in INSTALLED_APPS.
  3. Review the settings from myproject/myproject/settings/base.py, and add the necessary settings to your existing wagtail project's settings. You should also do the same with myproject/myproject/urls.py.
  4. At this point you can being using coderedcms within the new website django app. Follow the example in website/models.py to add various coderedcms classes, mixins, and blocks to your other wagtail page models as needed.
  5. Don't forget to run python manage.py makemigrations website and python manage.py migrate when doing model changes.

@vsalvino unfortunately I am a bit lost at step 3 above. There are quite a few settings and urls paths to change that involve coderedcms imports. It would be great to find an article that explains in further details how to either...: (1) extend a Wagtail website with CRX where we can further extend this with news apps or; (2) that explains how to extend a Wagtail CRX website with new apps.

I am willing to write one as long as I get these working and done both ways. My intent is to wrap my Django project around Wagtail CRX. I have 5 others apps I wish to see it in the Wagtail CRX admin for that purpose.

I noticed Wagtail docs explains how to extend itself with new apps, but once we are working with CRX those instructions don't seem fit. I am not an experienced programmer, though, but a hobbyist climbing the skills. Perhaps in two weeks time I'll get all of it sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants