
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Jcms is an easy to use cms for Django(python)
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
The only thing that you need to have installed is pip. But if you haven't this means you are also not using django which you should.
Jcms is easy to install. First you install it via pip
pip install jcms
INSTALLED_APPS = [
'jcms'
]
from django.conf.urls import path, include
urlpatterns = [
path('admin/', include('jcms.urls')),
]
Now to add a user you can do this via the commandline. Find more on this in the documentation of Django
There can only be one model with the same name
These model names are in use:
You can add menu items and urls to jcms. This means that the urls you add are connected to the Jcms app.
What you first have to do is add the jcms.py file to the app. The file structure of the app is underneath
practice-app
jcms.py
migrations
static
templates
other-folders
Everything for jcms can be done in the jcms.py file.
You can disable the warning for each setting if you don't want to add it by adding this to jcms.py
from jcms.components import NoConfig
menu_item = NoConfig
from jcms.generators import CMSGenerator
from jcmstest.models import Test, PK
urlpatterns = [
CMSGenerator(Test, ['type', 'value', 'content'], ['type', 'value']),
CMSGenerator(PK, ['name'], ['name'])
]
The following options can be given:
CMSGenerator makes the following views:
This is a basic example of a api view for jcms.
from jcms.generators import APIGenerator
from jcmstest.models import Test
urlpatterns = [
APIGenerator(Test, ['type', 'value', 'content'], lookup_field='type'
method_fields={'overview_fields': ['id', 'type', 'value', 'content']})
]
Required variables are:
The options you can give to APIGenerator are:
For every each option (overview, create, update, retrieve, delete) you can pass certain fields if you don't want to use the basic ones. You can pass them in the dict object of method_fields
The names for the views are:
First you need to create a menu_item.py in the jcms.py file.
from jcms.models import GenericMenuItem, SingleMenuItem
from jcmstest.models import Test, PK
menu_item = GenericMenuItem('Test', [
SingleMenuItem('Test', 'testList'),
SingleMenuItem('PK', 'pkList'),
])
You can give the following options:
The last step is to add the menu item to jcms. You can do this by going to your django settings and adding this line.
JCMS_APPS = ['practice-app']
This are only the apps that should be in Jcms.
You can use these icons like this:
{% include "icons/[icon-name].svg" %}
The icons you can use are =:
These are the template tags that you can use that are in Jcms
Add a item to an array
{% load add_item %}
{% add_item array new_item as array %}
Load a crud url based upon the model
{% load crud_url %}
{% url "Create"|crud_url:model %}
Get menu items for the cms
{% load get_menu_items %}
{% get_menu_items as menu_items %}
Gets the name of a model
{% load get_model_name %}
{{ view.model|get_model_name }}
Gets the attribute of a object dynamically
{% load get_object_attr %}
{{ object|get_object_attr:field }}
Ask Jessie Liauw A Fong to for deployment
FAQs
This is a cms written in Django and made by JCB Development
We found that jcms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.