Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.