# Getting Started

## Prerequisites

#### Code Editor of your choice

Before you begin, make sure you have the following installed on your machine:

* [Node.js](https://nodejs.org/en) ( Node v20.\*)
* [Python](https://www.python.org/) (3.6 or higher)
* [Django](https://www.djangoproject.com/) (4.2 or higher)

### Build Assets

&#x20; Before running the application we need to build theme assets:

1. Open your project to vs code
2. Start a command prompt window or terminal and change directory to Admin/
3. Install packages using one of following commands

```
npm install

npm run build
```

**This command will fetch all dependencies listed in `/package.json` and place them into`/node_modules` folde**r.

### Install Python

#### Django is a Python web framework. See [What Python version can I use with Django?](https://docs.djangoproject.com/en/4.0/faq/install/#faq-python-version-support) for details.

1. Get the latest version of Python at <https://www.python.org/downloads/> or with your operating system’s package manager.
2. Download the executable installer and run it.
3. After installation, open the command prompt and check that the Python version matches the version you installed by executing:

```
python --version
```

#### Check Pip Version

```
py -m pip --version
upgrade pip
py -m pip install --upgrade pip
```

#### Virtualenv

Make sure to have the `virtualenv` installed globally & running on your computer. You can skip this step if you have already installed it on your computer.

Virtualenv installation command for Linux & mac os

```
python3 -m pip install --user virtualenv
```

Virtualenv installation command for Windows

```
py -m pip install --user virtualenv
or
py -m pip install virtualenv
```

Create a virtual environment for our project. It's always recommended to create separate virtual environments for  each project

```
python -m venv environment-name

for mac os
python3 -m venv environment-name
```

Activate Virtual Environment on Windows

```
environment-name/Scripts/activate
```

Activate Virtual Environment on mac OS

```
source ./environment-name/bin/activate
```

<mark style="color:red;">**Note**</mark> <mark style="color:red;"></mark><mark style="color:red;">:</mark> Depending on your installation, you may need to use either pip3 or pip and for python you may need to use either python3 or python.

#### Django And Other Dependencies

Install Django on linux & mac OS

```
pip install -r requirements.txt
```

#### Run Database migrations

<pre><code><strong>python manage.py makemigrations
</strong>
python manage.py migrate
</code></pre>

#### Setting up Static Files

Go to Admin/ablepro/settings.py and add following command:-

```
STATIC_URL = 'static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR,'dist')]
```

#### Run below command for run your project

```
python manage.py runserver
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://phoenixcoded.gitbook.io/able-pro/django/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
