How can i add a module in odoo15 - odoo-15

I use mac to study odoo,
And i use this document to build my first module with command
./odoo-bin --addons-path=/Users/xuhongxin/src/custom,addons
And i successfully start the odoo,
But i can not find the estate module;
How can i solve this problem?
the document is :
https://www.odoo.com/documentation/15.0/developer/howtos/rdtraining/03_newapp.html
my manifest.py is :
{
'name': 'estate',
'summary': 'estate',
'description': "estate",
'website': 'https://www.odoo.com/page/crm',
'depends': [
'base_setup',
'sales_team',
'mail',
'calendar',
'resource',
'fetchmail',
'utm',
'web_tour',
'contacts',
'digest',
'phone_validation',
],
'data': [
'security/crm_security.xml',
'security/ir.model.access.csv',
'data/crm_lead_prediction_data.xml',
'data/crm_lost_reason_data.xml',
'data/crm_stage_data.xml',
'data/crm_team_data.xml',
'data/digest_data.xml',
'data/mail_data.xml',
'data/crm_recurring_plan_data.xml',
'wizard/crm_lead_lost_views.xml',
'wizard/crm_lead_to_opportunity_views.xml',
'wizard/crm_lead_to_opportunity_mass_views.xml',
'wizard/crm_merge_opportunities_views.xml',
'views/assets.xml',
'views/calendar_views.xml',
'views/crm_recurring_plan_views.xml',
'views/crm_menu_views.xml',
'views/crm_lost_reason_views.xml',
'views/crm_stage_views.xml',
'views/crm_lead_views.xml',
'views/digest_views.xml',
'views/mail_activity_views.xml',
'views/res_config_settings_views.xml',
'views/res_partner_views.xml',
'views/utm_campaign_views.xml',
'report/crm_activity_report_views.xml',
'report/crm_opportunity_report_views.xml',
'views/crm_team_views.xml',
],
'demo': [
'data/crm_team_demo.xml',
'data/mail_activity_demo.xml',
'data/crm_lead_demo.xml',
],
'css': ['static/src/css/crm.css'],
'installable': True,
'application': True,
'auto_install': False
}

You must pay attention to the path that odoo is having while searching for addons which is where all modules are located. You can check this via running the server in the command line and looking for the path that says is running or taking the info from, mostly is addons directory, make sure your module is running inside that exact path and if not, just add the path to the variable that stores the addons paths.

Related

List subfolders in sidebar navigation

In my config.js file I have created this sidebar
sidebar: {
'/docs/': [
'',
'gettingStarted',
'guides',
'media'
],
'/docs/gettingStarted/': [
'creatingFirstApplication',
'installing',
'understanding'
],
'/docs/gettingStarted/creatingFirstApplication': [
'setup'
],
'/docs/gettingStarted/installing': [
'installation'
],
'/docs/gettingStarted/understanding': [
'why',
'useCases',
'coreConcepts',
'architecture',
'gettingHelp'
],
'/docs/guides/': [
'firstApplication'
],
'/docs/media/': [
'downloads',
'onlineResources'
],
'/docs/media/downloads': [
'brochure'
],
'/docs/media/onlineResources': [
'articles',
'videos'
]
}
but I am only able to see the top level markdown files when building the page. So here you can see my project structure
When building the page only README.md, gettingStarted.md, guides.md, and media.md get rendered.
How can I fix it?
Please let me know if you need more information!
So this is the current state
and this is an example showing what I would like to achieve
I found more information here
https://vuepress.vuejs.org/theme/default-theme-config.html#multiple-sidebars
I tried to reverse my configuration
sidebar: {
'/docs/gettingStarted/creatingFirstApplication': [
'setup'
],
'/docs/gettingStarted/installing': [
'installation'
],
'/docs/gettingStarted/understanding': [
'why',
'useCases',
'coreConcepts',
'architecture',
'gettingHelp'
],
'/docs/gettingStarted/': [
'creatingFirstApplication',
'installing',
'understanding'
],
'/docs/guides/': [
'firstApplication'
],
'/docs/media/downloads': [
'brochure'
],
'/docs/media/onlineResources': [
'articles',
'videos'
],
'/docs/media/': [
'downloads',
'onlineResources'
],
'/docs/': [
'',
'gettingStarted',
'guides',
'media'
]
}
but this didn't help.
I created a small repository providing a small documentation with two pages per directory.
https://github.com/Garzec/VuePressTest
I hope this helps.
It's... a little confusing but from what I understand you need subfolders...
Remember that VuePress sidebar is used to organize how the user sees the items in a specific order. The sources not matters name or where the .md file is. You can add from any path but is better to follow the Directory structure convention.
There are some considerations in your case.
Firstly...
For subfolders routes, you need to create a README.md (take it like an index.html). So, you need a Default Page Routing. Router expects that the ending /{page}/ has a /{page}/README.md
Try renaming your index pages to its subfolder like '{name}/README.md'.
For example media.md --> media/README.md.
Secondly...
There are some tree errors in your config.
I noticed you use sidebar: {} (as an object). This is intended to make multiple sidebars (different pages/sections), like in VuePress documentation Guide | Config Reference | Plugin |etc you see in its navbar. If this is your goal, you have to place all child items inside '/docs/' for example and create a fallback:
sidebar: {
'/docs/': [
'', // this is your docs/README.md
// all sub-items here (I explain later)
],
'/': [ // Your fallback (this is your landing page)
'' // this is your README.md (main)
]
}
Thirdly...
As I introduced before, you need to place all the items under that main.
Instead of creating a different route for each page, you can (after renaming I mentioned before) you need to remember that Sidebar (at least in the default theme) only have 1 route level. Their hierarchy levels are made by H2, h3, h4...,
not by file structure.
BUT... You can organize your sidebar sections by grouping it. For example:
sidebar: {
'/docs/': [
'', // this is your docs/README.md
{
title: 'Getting Started',
collapsable: false,
children: [
'gettingStarted/', // 'docs/gettingStarted/README.md' if you renamed before
'gettingStarted/creatingFirstApplication',
'gettingStarted/creatingFirstApplication/setup', // maybe better to move content to `creatingFirstApplication.md`
'gettingStarted/installing/installation',
// Maybe group all this in another another group if is much extense (instead of Getting Started)
// or join into one file and use headers (to organize secions)
'gettingStarted/understanding/why',
'gettingStarted/understanding/useCases',
'gettingStarted/understanding/coreConcepts',
'gettingStarted/understanding/architecture',
'gettingStarted/understanding/gettingHelp',
]
},
{
title: 'Guides',
collapsable: false,
children: [
'guides/', // 'docs/guides/README.md' if you renamed before
'guides/firstApplication',
]
},
{
title: 'Media',
collapsable: false,
children: [
'media/', // 'docs/media/README.md' if you renamed before
'media/downloads/brochure',
'media/onlineResources/articles',
'media/onlineResources/videos',
]
}
],
'/': [ // Your fallback (this is your landing page)
'' // this is your README.md (main)
]
}
If you need split more, think in another section (instead of '/docs/' use each part as a new navbar item (like Guide | Config Reference | Plugin |etc)).
If not, you can also set the option sidebarDepth to 2:
themeConfig: {
sidebar: {
// . . .
},
sidebarDepth: 2
}
I hope this helps you. :)
Note: Maybe I missed some route, so check it your self.
Note 2: Not run in local, but should be fine the structure/syntax. Again, check it and comment,
The answer above really helped us. We're running Vuepress 1.3.1 and ran into some issues using the sidebar groups example code above. (under thirdly)
We ended up with a fairly complex sidebar and had to structure it accordingly. Below is an abbreviated version of our config file. (whole config file)
module.exports = {
// Removed other config options for readability
themeConfig: {
// Removed other themeConfig options for readability
sidebar: [
"/",
{
title: 'AccuTerm',
path: '/accuterm/',
collapsable: true,
children: [
{
title: 'Mobile',
path: '/accuterm/mobile/',
collapsable: true,
children: [
['/accuterm/mobile/quick-start/', 'Quick Start'],
['/accuterm/mobile/colors-and-themes-settings/', 'Colors & Themes Settings'],
['/accuterm/mobile/connection-settings/', 'Connection Settings'],
['/accuterm/mobile/keyboard-and-clipboard-settings/', 'Keyboard & Clipboard Settings'],
['/accuterm/mobile/screen-settings/', 'Screen Settings'],
['/accuterm/mobile/terminal-settings/', 'Terminal Settings'],
['/accuterm/mobile/user-guide/', 'User Guide']
]
},
{
title: 'Web',
path: '/accuterm/web/',
collapsable: true,
children: [
['/accuterm/web/web-introduction/', 'Web Introduction'],
['/accuterm/web/getting-started/', 'Getting Started'],
['/accuterm/web/release-notes/', 'Release Notes'],
['/accuterm/web/activating-accuterm-desktop-licensing/', 'Activating AccuTerm Desktop Licensing'],
['/accuterm/web/batch-user-actions/', 'Batch User Actions'],
['/accuterm/web/change-password/', 'Change AccuTerm.IO Password'],
['/accuterm/web/clipboard-settings/', 'Clipboard Settings'],
['/accuterm/web/connection-settings/', 'Connection Settings'],
['/accuterm/web/creating-profiles/', 'Creating Profiles'],
['/accuterm/web/creating-roles/', 'Creating Roles'],
['/accuterm/web/creating-users/', 'Creating Users'],
['/accuterm/web/font-and-character-settings/', 'Font & Character Settings'],
['/accuterm/web/installing-accuterm-io-server/', 'Installing AccuTerm IO Server'],
['/accuterm/web/keyboard-options/', 'Keyboard Options'],
['/accuterm/web/mouse-settings/', 'Mouse Settings'],
['/accuterm/web/sound-settings/', 'Sound Settings'],
['/accuterm/web/terminal-screen-options/', 'Terminal Screen Options'],
['/accuterm/web/terminal-settings/', 'Terminal Settings'],
['/accuterm/web/web-profiles/', 'Web Profiles'],
['/accuterm/web/rezume-session-resilience/', 'AccuTerm ReZume Session Resilience'],
['/accuterm/web/phi-reports/', 'PHI Reports']
]
}
]
},
["/docs/jbase/", "jBASE"]
]
}
};
Directory Structure
Hopefully seeing this example will help clarify sidebar groups. To see the whole sidebar and directory structure view it on github:
Vuepress config file
Vuepress directory structure

Wallaby with Browserify and TypeScript modules

I am trying to get Wallaby to work with a TypeScript app, using Browserify and Wallabify. However, when I run Wallaby, it outputs No failing tests, 0 passing, and all test indicators are grey.
The file app/spec.setup.ts is responsible for loading node modules dependencies such as chai, sinon, and the app's main module. app/spec.util.ts provides some helpers, imported by individual spec files.
module.exports = function() {
var wallabify = require('wallabify');
var wallabyPostprocessor = wallabify({
entryPatterns: [
'app/spec.setup.ts',
'app/src/**/*.spec.ts'
]
}
);
return {
files: [
{pattern: 'app/spec.setup.ts', load: false, instrument: false},
{pattern: 'app/spec.util.ts', load: false, instrument: false},
{pattern: 'app/src/**/*.ts', load: false},
{pattern: 'app/src/**/*.spec.ts', ignore: true}
],
tests: [
{pattern: 'app/src/**/*.spec.ts', load: false}
],
testFramework: 'mocha',
postprocessor: wallabyPostprocessor,
bootstrap: function (w) {
// outputs test file names, with .ts extensions changed to .js
console.log(w.tests);
window.__moduleBundler.loadTests();
}
};
};
What's interesting is that I don't get any feedback from changing entryPatterns, even setting it to an empty array or invalid file names. The result is still the same. Only if I remove it entirely, I get errors such as Can't find variable: sinon.
I've also figured that the entryPatterns list may need the compiled file names, i.e. .js instead of .ts extension. However, when I do that, I get Postprocessor run failure: 'import' and 'export' may appear only with 'sourceType: module' on spec.setup.ts.
I don't know what is the correct way to configure Wallabify for TypeScript compilation, and I couldn't find any complete examples on the web, so I'd appreciate any hints.
P.S. with my current StackOverflow reputation I couldn't add two new tags: wallaby and wallabify. Could someone do me a favour and add the two tags please.
Because TypeScript compiler renames files to .js and applied before wallabify, you need to change your entry patterns like this to make it work:
entryPatterns: [
'app/spec.setup.js',
'app/src/**/*.spec.js'
]

Durandal.js optimizer not working (empty main-built.js)

I'm trying to get Durandal.js optimizer working on my test project, but it seems to generate nothing to main-built.js. I use the following command from node.js command prompt, in durandal/amd folder:
optimizer.exe --verbose true
Result is
Using default base configuration.
Configuring for deploy with almond (custom).
{
"name": "durandal/amd/almond-custom",
"inlineText": true,
"stubModules": [
"durandal/amd/text"
],
"paths": {
"text": "durandal/amd/text"
},
"baseUrl": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp",
"mainConfigFile": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main.js",
"include": [
"main-built",
"main",
"bindings/tinymce-binding",
"durandal/app",
"durandal/composition",
"durandal/events",
"durandal/http",
"text!durandal/messageBox.html",
"durandal/messageBox",
"durandal/modalDialog",
"durandal/system",
"durandal/viewEngine",
"durandal/viewLocator",
"durandal/viewModel",
"durandal/viewModelBinder",
"durandal/widget",
"durandal/plugins/router",
"durandal/transitions/entrance",
"raphael-amd/eve.0.3.4",
"raphael-amd/raphael.2.1.0.amd",
"raphael-amd/raphael.2.1.0.core",
"raphael-amd/raphael.2.1.0.svg",
"raphael-amd/raphael.2.1.0.vml",
"viewmodels/flickr",
"viewmodels/modal1",
"viewmodels/myPage",
"viewmodels/shell",
"viewmodels/welcome",
"text!views/detail.html",
"text!views/flickr.html",
"text!views/modal1.html",
"text!views/myPage.html",
"text!views/shell.html",
"text!views/welcome.html"
],
"exclude": [],
"keepBuildDir": true,
"optimize": "uglify2",
"out": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main-built.js",
"pragmas": {
"build": true
},
"wrap": true,
"insertRequire": [
"main"
]
}
Deleting old output file.
Tracing dependencies for: durandal/amd/almond-custom
Then, when I check main-built.js, it is empty. Can anyone help me what is the problem? I have several AMD modules in the test project, including Raphael.js AMD modules.
My requirejs configuration looks like this:
requirejs.config({
paths: {
'text': 'durandal/amd/text',
'eve': './raphael-amd/eve.0.3.4',
'raphael.core': './raphael-amd/raphael.2.1.0.core',
'raphael.svg': './raphael-amd/raphael.2.1.0.svg',
'raphael.vml': './raphael-amd/raphael.2.1.0.vml',
'raphael': './raphael-amd/raphael.2.1.0.amd',
'tinymce': "../Scripts/tinymce/jquery.tinymce.min"
}
});
In the same amd folder, where optimizer is stored, try running node r.js -o app.build.js. I've seen r.js sometimes choke about some dependencies, which resolves without problem when loading via require.js. For whatever reason the error messages won't show up when using optimizer --verbose. Typically the error message provides enough information to see where this occurs and if you've to update require.contig.paths or a specific define dependency.

How can I optimize this custom dojo 1.7.2 build

I am working on my first project which uses a dojo 1.7.2 component, and only need a vertical slider widget. I was able to create a custom build which is supposed to include only the modules needed for my stated dependencies. Using the following build profile, and the command C:\dojo-release-1.7.2-src\util\buildscripts>build -p profiles/km.admin.dashboard.profile.js -r the resulting release/dojo/dojo.js.uncompressed.js is 796kb, and the release/dojo/dojo.js is 236kb. Is there any way to exclude more unneeded modules to reduce the file size? For instance, I just opened the release/dojo/dojo.js.uncompressed.js and took a quick look, there is a dojo/json package, I am not using any json. How do I exclude it? Thank you.
dependencies = {
layers: [
{
name: 'dojo.js',
customBase: true,
dependencies: [
'dojo/dojo',
'dojo.aspect',
'dojo/selector/acme',
'dojo/cldr/nls/number',
'dijit.form.VerticalSlider',
'dijit.form.VerticalRule',
'dijit.form.VerticalRuleLabels'
]
}
],
staticHasFeatures: {
'dojo-trace-api':0,
'dojo-log-api':0,
'dojo-publish-privates':0,
'dojo-sync-loader':0,
'dojo-xhr-factory':0,
'dojo-test-sniff':0
},
prefixes: [
[ 'dijit', '../dijit' ],
[ 'dojox', '../dojox' ]
]
}
There are some approaches by which you can trim down dojo.js to a bare minimum and keep adding the modules within dojo.js that you really need.
See:
http://dojotoolkit.org/reference-guide/1.7/build/customBase.html
and also:
http://www.sitepen.com/blog/2008/07/01/dojo-in-6k/ (this is somewhat old and cutombase approach in the first link might work better)

TemplateDoesNotExist at/

here is my site url http://webtrick.heliohost.org/
my template directory settings:
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__) , 'templates').replace('\\','/')
)
view.py
from django.http import HttpResponse
from django.template import Template , Context
from django.shortcuts import render_to_response
def index(request):
return render_to_response('index.html')
url.py
from django.conf.urls.defaults import patterns, include, url
from webtrickster.views import index
urlpatterns = patterns('',
url(r'^$', index)
)
i don't know what's wrong with this code
any help appreciated
Make sure your Django app is in the INSTALLED_APPS in settings.py. That was my problem with it. So if you have the templates folder in your polls app folder, you need to add the 'polls' at the end of the installed apps in the settings file.
Add you application into setting.py end of the INSTALLED_APPS like below:
INSTALLED_APPS = [
...
'django.contrib.staticfiles',
'mysite'
]
and your templates dir should be in mysite like
mysite
-settings.py
-templates/
I wasted a lot of time trying to figure out what was wrong with my 'templates' directory and found out that :
You may have forgotten to add TEMPLATE_DIR in the following segment of settings.py :
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
So it should have 'DIRS': [TEMPLATE_DIR,], instead of 'DIRS': [],
Also see answers for : TemplateDoesNotExist at /
os.path.join(os.path.dirname(__file__) ,'../templates').replace('\\','/')
That worked for me.
First you need to make one folder named 'templates' in your django project folder then, you can add template directory by two ways open your settings file then add any of the following code
1) You can specify your template path directly by
TEMPLATE_DIRS = (
'D:/Django/web/Kindset/templates' #your file path ,this is my template directory path
)
2) Or if you want to use generic path means use
TEMPLATE_DIRS = (
'os.path.join(BASE_DIR, "templates"),'
)
You may forgot to install you app
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'tutorials'
]
Make sure you also add dirs properly in your templates
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
TEMPLATE_DIRS = (
"mysite/templates"
)
TemplateDoesNotExist - file exists, no permissions issue
My templates folder wasn't a python package because it was missing the __init__.py file.
This might have been the reason why Django was not locating my templates.
Many good answers here, but on updating an old project (nightmare=zinnia, django_cms, AUTH_USER_MODEL = 'accounts.CustomUser') that was not maintained for many moons from django 1.6 to django 1.7 as stage one of a very long process, I found nothing worked. Then I noticed that the errors had quotes around the template it was trying to load:
/home/vagrant/venv/crowd88/local/lib/python2.7/site-packages/djangocms_admin_style/templates/'core/includes/ga.html' (File does not exist)
So I looked at the source and found that quotes are stripped this way:
# lib/python2.7/site-packages/cms/utils/plugins.py
...
template = get_template(force_unicode(node.template).strip('"'))
...
Then I noticed that single quotes were being used in the loaders
{% include core/includes/ga.html' %}
So the fix was
{% include "core/includes/ga.html" %}
using a regex process
Move your "templates" folder to the main and not in any sub folder. Or on the same level as other projects folder. This might have been the reason why Django was not locating my templates.
My project worked after doing this.
make sure your dirs directory in settings.py looks like this
'DIRS': [os.path.join(BASE_DIR, 'templates')],
By default, inside the settings.py file, the 'DIRS' array is empty as you can see below.
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
So to solve the issue, just add BASE_DIR / 'templates' to the array to look like below. And you are good to go.
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
Go to the settings.py file and check the TEMPLATES section. Notice the DIR value, by default it should be []. Add "os.path.join(BASE_DIR, 'templates')" inside this. It should look like this :
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
I encountered the same error. After checking TEMPLATE_DIR and INSTALLED_APPS a thousand times I noticed a small typo in one .html template:
{% extends "my_app/base.html " %}
should have been
{% extends "my_app/base.html" %}
(notice the white space in the first command)
If you have tried some of the solutions above and it not worked try checking whether the template is within the correct folder.
Template outside of the templates/appname folder:
appname/
|
|__templates/
| |
| |__appname/
| |__appname_form.html
|__appname_list.html <------ outside of the appname/ folder (WRONG)
Like this if you have a url that send to this template, Django will through a TemplateDoesNotExist since the template does not follow the path you placed in TEMPLATES.DIRS.
Try fixing like:
Template inside of the templates/appname folder:
appname/
|
|__templates/
| |
| |__appname/
| |__appname_form.html
| |__appname_list.html <------ inside of the appname/ folder (RIGHT)
Therefore, like this you may fix this exception.
if {% extends "blog/base.html" %} make sure base.html is in the blog folder and not in Templates or any other directory. That solved it for me.
This worked for me:
1.Make a folder in your app called static and create the css file in the static folder
2.Make another folder still in your app called templates and create the html file there
On the first line of your html file write this: {% load static %}
Link the css file inside the head tag as follows: href="{% static 'index.css' %}"
Thank me later.
Got the same problem !
I've already followed all solutions provided above but pfff ! I were lost and maybe someone could face it too!
So I solved it by only
return render(request, 'profile.html')
and not
return redirect(request, "profile.html")
Happy debugging !!!
After debugging a lot, i found out that the path which i was giving in views.py to render the template is wrong so it was showing TemplateDoesNotExist at/ error
for Example the mistake i was making is this
Wrong code :-
return render(request, 'show/index.html', {'product_objects': product_objects})
Right code :-
return render(request, 'shop/index.html', {'product_objects': product_objects})
the app name was shop not show.
Hope it will help someone
I think the answer is pretty simple just give the right path
Use this if you have your templates folder in your app
BASE_DIR = Path(__file__).resolve().parent.parent
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'DIRS': [BASE_DIR,"templates"],