sorinmarti / django_ndr_core

NDR_CORE is a django app which helps you build a web interface for your NDR data. This repository contains the sources to the ndr_core module.

Home Page:http://ndrcore.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-ndr-core

NDR Core version

Django NDR Core is a django app which helps you build a web interface to present your research data. This repository contains the sources to the ndr_core module. You are free to clone or download it, but you'll only need it if you want to develop it further (which is highly welcomed). To use NDR Core you can install it from PyPi or check out the Docker image.

DjangoCI Status PyPi Status Documentation Status PyPI version License DOI pylint score

More Information

How to use NDR Core

First you need to install NDR Core. You can do this in different ways. You can install it from PyPi, you can use the Docker image, or you can clone this repository and install it from the sources.

It is recommended to use the docker image for local testing and configuration. For production use you should install NDR Core from PyPi and use a webserver like nginx to serve the application.

Use the Docker image

The Docker image is available on Docker Hub. You can pull it with the following command:

docker pull sorinmarti/django_ndr_core

You can run the image with the following command:

docker run -p 8000:8000 sorinmarti/django_ndr_core

This will start the application on port 8000. You can access it with your browser on http://localhost:8000.

Install NDR Core from Scratch

This is a step-by-step guide to install NDR Core on a Ubuntu Machine (or similar). It is recommended to use a virtual environment for the installation. This guide assumes that you have a fresh Ubuntu installation. If you already have Python and pip installed, you can skip the first two steps.

Make sure you have Python and pip installed, update pip to the latest version

python3 --version
pip3 --version
python3 -m pip install --upgrade pip

If installed, a version number is shown. If not, follow the next step

Install python and pip

sudo apt-get update
sudo apt-get install python3.11
sudo apt-get -y install python3-pip

Create a project directory

Create a directory for your project and change into it. This will be the root directory of your project. It contains the virtual environment and the django project.

mkdir <project_root>
cd <project_root>

Create a virtual environment

pip3 install virtualenv 
virtualenv venv 

Activate the virtual environment and upgrade pip

source venv/bin/activate
python -m pip install --upgrade pip

Install ndr_core

This will install all the needed dependencies and also install django.

pip install django-ndr-core

Start a django project

Replace <project_name> with the name of your project. It can be the same as your project root directory.

django-admin startproject <project_name>
cd <project_name>

settings.py

Open <project_name>/settings.py and add the ndr_core module and its dependencies to INSTALLED_APPS: (Leave the existing settings in place).

INSTALLED_APPS = [
    [...],
    'ndr_core'
]

Initialize your NDR Core app

Django works as such that there are different apps. django-ndr-core is a django-app which lets you create and manage your own app. Use the following command initialize your own.

python manage.py init_ndr_core

Start configuring and entering content

Run your server.

python manage.py runserver

Visit http://localhost:8000/ to view your website and http://localhost:8000/ndr_core/ to access the configuration interface. The last command runs your server on port 8000. This is not suitable for production use. You should use a webserver like nginx to serve your application. See the Documentation for more information.

Roadmap

  • Create a basic version of the module
  • Create a Docker image
  • Create a PyPi package
  • Create a documentation
  • Create a demo site
  • Add more features
  • Add more tests
  • Add more documentation
  • Add more examples
  • Add more configuration options
  • Add more themes
  • Add more languages

About

NDR_CORE is a django app which helps you build a web interface for your NDR data. This repository contains the sources to the ndr_core module.

http://ndrcore.org

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 67.0%Language:Python 22.5%Language:HTML 9.9%Language:CSS 0.6%Language:Dockerfile 0.0%