mycms | Large content management system developed by flask
kandi X-RAY | mycms Summary
kandi X-RAY | mycms Summary
** How to use **.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the followers of a user .
- Bind an email
- Delete a group .
- Run migrations .
- List posts .
- Page .
- clear all messages
- Abanner view .
- Delete focus .
- Add tags to album .
mycms Key Features
mycms Examples and Code Snippets
Community Discussions
Trending Discussions on mycms
QUESTION
I am currently building my first (statically generated) website with nuxt and a headless Wordpress as CMS. I am also using the module nuxt-i18n
for multi-language support: German (default) and English.
The setup
To fetch data from the multi-language Wordpress I use the module wp-nuxt
and then store the data from the CMS in thes vuex
store. Dependent on the client browser language or when the language is changed by the user manually, the endpoint of $wp
(wp-nuxt
) is changed, so the appropiate content will be fetched and stored in the store.
Now, on NuxtServerInit()
some basic data is fetched from the CMS for the locale defined by the route (e.g. http://myserver/en/news
will fetch basic data from the english CMS endpoint http://wphost/mycms/en/wp-json/wp/v2/...
, see /en/
in endpoint). For each layout/page further content is fetched via asyncData()
and fetch()
, also, of course, for the current locale.
The problem
This works fine, as long nuxt is ran via nuxt dev
. If the locale is switched by the user, the fetches for the other locale will be handled by asyncData()
and fetch()
on the client.
nuxt generate
works also for the locale the site was first loaded with, however has troubles when switching locales: The data is not found in the store.
My guess is: On generate
nuxt is calling nuxtServerInit()
, asyncData()
and fetch()
for each route. This will fill the store of each route with the routes locale data. For DE-Routes (e.g. myserver/impressum
) german content, for EN-routes (e.g. myserver/en/site-notice
) english content. But if the locale is changed by the user, the stores of these routes only contain content for the current locale and asyncData()
and fetch()
won't be called to fill the store (of course, this is by design of generate
).
Consequently, it seems to me that nuxt is storing different "vuex store instances" for the different routes and cannot switch to the store on user initiated locale switch.
Possible workarounds
There are a few simple workarounds I already tried and seem to solve the issue but are far from perfect:
Trigger a reload on language switch, so the site is realoaded and nuxt is loading the store for the route with the correct locale. - I don't like it, it feels hacky.
Fill the store via
nuxtServerInit()
with data of both languages, by fetching against both CMS endpoints. - I don't like it either, it feels hacky and although it may work for two languages this has huge overhead, the more content the CMS has.
I hope I was able to describe the problem appropriately. Is there something I am missing? I haven't found anything on this, so far. I would appreciate if you have any thoughts on that.
Thanks, Valentin
...ANSWER
Answered 2021-Mar-18 at 11:35Cause of the problem
I finally got to the source of the issue. I will share my misconceptions with you so it might help someone with similar setup.
So first of all, on generate
saves the results of the nuxtServerInit()
of the store and the asyncData()
and fetch()
of the layout and page components for each route in a payload.js
file to simulate the API calls on the generated static site (https://nuxtjs.org/blog/going-full-static/#crazy-fast-static-applications).
When writing the original post, I did two things, which made nuxt not store the whole payload of the fetch()
method of each page component when switching language manually:
On
nuxtServerInit()
I fetched some API data for all routes (e.g. site title, list of main pages for the navbar, etc.)On
fetch()
in the page components I fetched needed resources only if these were not already in the nuxt store. This would make sense imho in a SSR/SPA site, because you don't need to fetch (and wait), if you already have the data.
Consequently, this means nuxt generate
fetches this data for each page with nuxtServerInit()
saving the payload associated with nuxtServerInit
. However, it does not save the payload on fetch()
because the if condition in the page component's fetch()
method at the time of generation returns false - because the data was fetched already with nuxtServerinit()
.
As a result, switching the locale on the generated static site triggered the simulated fetch()
for the routes page component, but the payload for this method didn't contain the data.
Solution
The simplest solution is to not fetch any or at least any locale-specific data on nuxtServerInit()
if isStatic
is true and do the fetching in page or layout components.
QUESTION
So I'm using this to save my images in the file fylesystems.php and it works, but now I want to deploy my project and 'root' => 'public/uploads' doesn't work. I know I'm doing something wrong but I don't know what, help please.
...ANSWER
Answered 2020-May-27 at 09:14You need to use public_path,
QUESTION
I would like to use R and the Tidyverse to write one (long) statement to read data from a PDF-table and show as animated plot.
What i can't get right is
- retrieving the table-header
- and turning the numeric values into a numeric format.
Note that i try this because i want to learn using the Tidyverse-functions. With multiple steps i did succeed (see code below).
I just like to learn if its possible in one continous 'flow'.
Thanks for your advice!
...ANSWER
Answered 2019-Apr-10 at 12:18To be honest I believe that when it comes to the use of tidyverse
, many things are a matter of taste, sure there are best practices, and intended purposes, but the preferences of a developer plays a big role.
Here's for example the main things that I would change, not because they are better, just because I'm more comfortable this way:
QUESTION
in the code
...ANSWER
Answered 2017-Oct-11 at 15:39= is assignment operator. use comparison operator == here.
QUESTION
Having an issue with a piece of code when trying to pull an array out of a while loop. The code is as follows
...ANSWER
Answered 2017-Sep-20 at 11:41It is because you have dumped array inside while loop. var_dump
after while loop then check
QUESTION
I'm using apache api openmeetings. When i try to add a new user, I get HTTP Response Error 500 and the following error in the openmeetings log:
...ANSWER
Answered 2017-Sep-06 at 13:07OK, This is clearly bad design in OM 3.3.1 :(
Both user
and confirm
parameters are annotated as @QueryParam
(should be @FormParam
)
So you have to call it as follows:
QUESTION
I have tried so hard to start using Propel, I sat down for 2 hours reading their whole documentation, but it realy doesn't tell you where you run 'propel init' command.
http://propelorm.org/documentation/02-buildtime.html
It says I have to run 'propel init' at the bottom of the page, first step of the easy way? But where? I tried opening cmd on windows in my project root and running it but I get:
ANSWER
Answered 2017-Mar-12 at 14:15The slides from a conference presentation Up and Running with Propel2 detail the process to install this command, and as a bonus, walk you through an example of running the command.
I can answer any question on the slides, since I gave the talk.
QUESTION
I'm going to create a CMS in Node.js and Express i have a folder structure like below:
- MyCMS
- plugins
- themes
- uploads
- index.js
i want to load plugins from plugins folder:
- plugins
- sample-plugin
- awesome-plugin
i want to know how to make my CMS pluggable?
what is best way to make an application pluggable?
and then how to load plugins?
(i need a plugin system at all)
EDIT: As i said, i need a plugin system like wordpress. wordpress has hooks (actions and filters), is it best? how to implement it?
...ANSWER
Answered 2017-Feb-28 at 08:17You don't really need a plugins folder as NPM essentially does this for you. You then maintain a list of npm packages that are officially supported. You could look at Ember-CLI and see what they do with their 'ember install' and specific packages for Ember.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install mycms
You can use mycms like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page