pycharm rename doesn't affect references in jinja template html - python

i'm renaming an html.j2 file with scope=project, but references in another html.j2 located in the same folder as the file i'm renaming are not affected, while .py files outside of the folder are being edited just fine.
is this to do with the file-type? or scope? a limitation of refactor/rename? or something else?
this is a small project atm so it's no biggie to manually edit, or use find/replace, but i'd like to understand before i make bigger projects.
thanks!
my (partial) filestructure is
├───SpotifySite
│ │ requirements.txt
│ │ spot_flask_app.py
│ │ __init__.py
│ │
│ └───application
│ │ .cache
│ │ forms.py
│ │ playground.py
│ │ routes.py
│ │ site_spotify_functions.py
│ │ __init__.py
│ │
│ ├───static
│ │ main.css
│ │
│ ├───templates
│ │ artist_playlist.html.j2
│ │ home.html.j2
│ │ layout.html.j2
│ │ made_playlist.html.j2
│ │ return_artists.html.j2
│ │ search.html.j2
│ │ show_tracklist.html.j2
...
eg after refactor/rename 'layout.html.j2' to 'layout.html', 'home.html.j2' remains like this:
{% extends "layout.html.j2" %}
{% block content %}
...

Related

How to copy image from sub_subfolders to only one folder using python

I want to copy images from multi subfolders into only one folder using python or any library that can do with python framework
my folders as described in tree below
$ tree
.
├── main_folder
│ ├── Subfolder_1
│ │ └── Subfolder1_1
│ │ └── ├── 0.png
│ │ ├── 1.png
│ │ ├── 2.png
│ │ └── 3.png
│ │ └── Subfolder1_2
│ │ └── ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ └── 7.png
.....
│ ├── Subfolder_2
│ │ └── Subfolder2_1
│ │ └── |____.png
│ │ ├── 8.png
│ │ └── 9.png
│ │ └── Subfolder2_2
│ │ └── ├── 10.png
│ │ ├── 11.png
│ │ ├── 12.png
│ │ └── 13.png
│ └── Subfolder_3
│ └── Subfolder3_1
│ └── |___ .png
│ ├── 14.png
│ ├── 15.png
│ ├── 16.png
│ │ └── Subfolder3_2
│ │ └── ├── 17.png
│ │ ├── 18.png
│ │ ├── 19.png
│ │ └── 20.png
│
└── script.py
The expected results destination_folder
will look like the tree below
── destination_folder
├── 0.png
├── 1.png
├── 2.png
└── 3.png
.........
├── n-1.png
└── n.png
just use a mixture of glob for finding files and shutil for copying files.
import glob
import os
import shutil
dest_folder = 'destination_folder'
if not os.path.isdir(dest_folder):
os.mkdir(dest_folder)
for item in glob.glob('**/*.png',recursive=True):
filename = os.path.basename(item)
full_path = os.path.abspath(item)
shutil.copy(full_path, os.path.join(dest_folder,filename))
if you only want pictures with numbers you can add an if condition to it
for item in glob.glob('**/*.png',recursive=True):
filename = os.path.basename(item)
if filename.split('.')[0].isdigit():
full_path = os.path.abspath(item)
shutil.copy(full_path,os.path.join(dest_folder,filename))

Unable to add dll files set in setup.py

I'm unable to add dll files using package_data in setup.py file. Here's a look at directory structure:
my_project
├── key
│ ├── 1_0
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ ├── 1_1
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ ├── 1_2
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ └── __init__.py
├── my_program.py
└── __init__.py
I've been trying without success to add the required.dll files with the installation of this module. I know I have to add it in the setup.py file. What I've tried so far (I'll skip all unnecessary parameters) :
First:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'': ['my_project\\key\\1_0\\sub_dir\\_required.dll',
'my_project\\key\\1_1\\sub_dir\\_required.dll',
'my_project\\key\\1_2\\sub_dir\\_required.dll']},
...)
Second:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'key': ['1_0\\sub_dir\\_required.dll',
'1_1\\sub_dir\\_required.dll',
'1_2\\sub_dir\\_required.dll']},
...)
Third:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'my_project\\key\\1_0\\sub_dir': ['_required.dll'],
'my_project\\key\\1_1\\sub_dir': ['_required.dll'],
'my_project\\key\\1_2\\sub_dir': ['_required.dll']}
...)
Whenever I call python setup.py sdist --format=zip, dll files are never included. BTW, I'd rather not change directory structure, unless there is no other option.
What am I missing here?
Regards.
François

Python glob module is not working with multi selection?

In linux, my folder looks like that:
src
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── app-routing.module.ts
│ ├── components
│ │ ├── catalog-main
│ │ │ ├── catalog-main.component.css
│ │ │ ├── catalog-main.component.html
│ │ │ ├── catalog-main.component.spec.ts
│ │ │ └── catalog-main.component.ts
│ │ ├── catalog-sidebar
│ │ │ ├── catalog-sidebar.component.css
│ │ │ ├── catalog-sidebar.component.html
│ │ │ ├── catalog-sidebar.component.spec.ts
│ │ │ └── catalog-sidebar.component.ts
│ │ └── top-bar
│ │ ├── top-bar.component.css
│ │ ├── top-bar.component_handy.css
│ │ ├── top-bar.component_handy.html
│ │ ├── top-bar.component.html
│ │ ├── top-bar.component.spec.ts
│ │ └── top-bar.component.ts
│ ├── icons-provider.module.ts
│ ├── pages
│ │ ├── login
│ │ │ ├── login.component.css
│ │ │ ├── login.component.html
│ │ │ ├── login.component.spec.ts
│ │ │ ├── login.component.ts
│ │ │ ├── login.module.ts
│ │ │ └── login-routing.module.ts
│ │ ├── monitor
│ │ │ ├── monitor.component.css
│ │ │ ├── monitor.component.html
│ │ │ ├── monitor.component.spec.ts
│ │ │ ├── monitor.component.ts
│ │ │ ├── monitor.module.ts
│ │ │ └── monitor-routing.module.ts
│ │ ├── monitor2
│ │ │ └── monitor2.module.ts
│ │ └── welcome
│ │ ├── welcome.component.css
│ │ ├── welcome.component.html
│ │ ├── welcome.component.ts
│ │ ├── welcome.module.ts
│ │ └── welcome-routing.module.ts
│ ├── reducers
│ │ └── index.ts
│ └── store
│ ├── catalog.actions.ts
│ ├── catalog.reducer.ts
│ └── userinfo.ts
├── assets
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── main.ts
├── polyfills.ts
├── styles.css
├── test.ts
└── theme.less
I use this command output 29 files:ll src/**/*.ts | wc -l
I use this command output 32 files:ll src/{**,}/*.ts | wc -l, new files are src/main.ts, src/test.ts, src/polyfills.ts, they are direct in src folder
But in python3,
I use glob.glob("src/**/*.ts") output all 32 files,
I use glob.glob("src/{**,}/*.ts") output all 0 files
So, which is standard glob syntax?
which is standard glob syntax?
Because you tagged linux I assume you use bash. Bash has nostandard (ie. it's not in posix) extension not related to globbing brace expansion.
The:
ll src/{**,}/*.ts | wc -l
is first expanded to:
ll src/**/*.ts src/*.ts | wc -l
by bash when doing brace expansion. Then next happens globbing expansion. Python does not do any shell expansions when parsing glob arguments, so python searches for files/directories named { and ending with , and } taken literally as characters - as it finds none, the count is 0.
So you are not comparing globbing, you are comparing globbing with shell expansion with only globbing. You can compare your commands with bash with brace expansions disabled set +B or use another shell without brace expansions, like busyboxs.
Neither. The man page for the POSIX function glob(3) allows neither syntax.
** is an extension, invented and first popularised by zsh. Bash and some others copied it and generally did something slightly incompatible. Bash and Python both copied it, but chose slightly different behaviour when interacting with other globbing syntax.
This makes sense: After all, while glob(3) is a POSIX function, precisely specified and to be implemented exactly as specified, zsh is merely a role model, from one one can deviate at will. And one has to deviate, because zsh has a lot of globbing extensions.

How to import a file from a subdirectory in python from a subpackage in another directory?

I have the following directory structure in my home projects folder.
|ALL-IN-ONE
|demo
|__init__.py
|__main__.py
|models
|grpc
|allinone_server.py
And I want to import from allinone_server.py a function defined in main.py called images_demo. I have tried
from demo.__main__ import images_demo
It is not working. How can I import it? The function I am trying to import is located inside main.py which is inside demo directory. I am trying to import it from the file allinone_server.py in grpc. I guess I have made my question clear now.
Here is the whole tree for the project
├── demo
│ ├── __init__.py
│ ├── __main__.py
│ └── __pycache__
│ ├── __init__.cpython-36.pyc
│ └── main.cpython-36.pyc
├── description
├── environment.yml
├── HEAD
├── hooks
│ ├── applypatch-msg.sample
│ ├── commit-msg.sample
│ ├── fsmonitor-watchman.sample
│ ├── post-update.sample
│ ├── pre-applypatch.sample
│ ├── pre-commit.sample
│ ├── prepare-commit-msg.sample
│ ├── pre-push.sample
│ ├── pre-rebase.sample
│ ├── pre-receive.sample
│ └── update.sample
├── imgs
│ └── 44.jpg
├── info
│ └── exclude
├── __init__.py
├── loggers
│ ├── __init__.py
│ └── __pycache__
│ └── __init__.cpython-36.pyc
├── models
│ ├── adience_large1.h5
│ ├── adience_small1.h5
│ ├── AgeModel.json
│ ├── detection_age_gender_large1.h5
│ ├── detection_age_gender_small1.h5
│ ├── detection_age_gender_smile_large1.h5
│ ├── detection_age_gender_smile_small1.h5
│ ├── detection_age_large1.h5
│ ├── detection_age_small1.h5
│ ├── detection_large1.h5
│ ├── detection_small1.h5
│ ├── grpc
│ │ ├── adele_2016.jpg
│ │ ├── allinone_client.py
│ │ ├── all_in_one_pb2_grpc.py
│ │ ├── all_in_one_pb2.py
│ │ ├── all_in_one.proto
│ │ ├── allinone_server.py
│ │ ├── benedict_cumberbatch_2014.png
│ │ ├── cat.png
│ │ ├── classroom_in_tanzania.jpg
│ │ ├── decoded1.py
│ │ ├── decoded.py
│ │ ├── elon_musk_2015.jpg
│ │ ├── laos.jpg
│ │ ├── model_face.jpg
│ │ ├── __pycache__
│ │ │ ├── all_in_one_pb2.cpython-36.pyc
│ │ │ ├── all_in_one_pb2_grpc.cpython-36.pyc
│ │ │ └── decoded.cpython-36.pyc
│ │ ├── sophia.jpg
│ │ ├── test
│ │ │ ├── __init__.py
│ │ │ ├── __pycache__
│ │ │ │ └── __init__.cpython-36.pyc
│ │ │ └── test_images
│ │ │ ├── adele_2016.jpg
│ │ │ ├── benedict_cumberbatch_2014.png
│ │ │ ├── classroom_in_tanzania.jpg
│ │ │ ├── elon_musk_2015.jpg
│ │ │ ├── __init__.py
│ │ │ ├── laos.jpg
│ │ │ ├── model_face.jpg
│ │ │ ├── sophia.jpg
│ │ │ ├── waaah.jpg
│ │ │ ├── woman.jpg
│ │ │ └── zebra_stripes.jpg
│ │ ├── waaah.jpg
│ │ ├── woman.jpg
│ │ └── zebra_stripes.jpg
So you've referred to main.py, but you also have __main__.py in your directory structure. I'll assume that your directory actually contains main.py instead of __main__.py.
To import from levels up in a package, start your import with a period.
To import just one function you would use from .main import images_demo
Now, let's start by saying main.py is in grpc/ along with allinone_server.py, then we'll move it to different directories and see how the import changes.
If it were in grpc/ from .main import images_demo
If it were in models/ from ..main import images_demo
If it were in __ALL-IN-ONE/ from ...main import images_demo
If it were in __demo/ from ...__demo.main import images_demo
Every extra period brings you up one level in the hierarchy, then you use the name of the next level down in the target path until you reach where you want to be.
Now let's suppose you wanted to import the whole of main.py.
If it were in grpc/ from . import main
If it were in models/ from .. import main
If it were in __ALL-IN-One/ from ... import main
If it were in __demo/ from ...__demo import main
Finally, the dot notation to move up a level only works if the file that uses it is in a package, so this will work fine if at the top level you start your program in a scope outside of this package then use from __ALL-IN-ONE.models.grpc import allinone_server
However, if you run allinone_server.py directly then it will fail to import anything above it as it isn't being imported as part of a package. Try that out, and let me know if that needs better explanation.
Good luck!
You can't import a function from another folder directly and for that you have to use this:
import sys
sys.path.insert(0, "../../demo/")
Another step is to rename __main__ to main.
here is the exact example that worked for me:
The tree:
.
├── demo
│   ├── __init__.py
│   ├── main.py
│  
└── models
└── grpc
└── allinone_server.py
main.py:
def images_demo():
print("hello there")
The calling file(allinone_server.py):
import sys
sys.path.insert(0, "../../demo/")
import main
main.images_demo()

ImportError: No module named weather_Core_Engine.weather_DB_Handler

I'm trying to build a project on python using Django on pythinanywhere.
I'm not familiar at all with Django so any hints it's more than welcome.
I created a Django app called profiles and there i created some db models. so far so good.
I'm using sqlite3 and I managed to migrate the db and to correctly start my project.
now I have modified the file models.py but while running the migration using the command:
"python ./manage.py makemigrations"
I have the following issue:
"$ python ./manage.py makemigrations Traceback (most recent call last): File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 353, in execute
self.check() File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 385, in check
include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 372, in _run_checks
return checks.run_checks(**kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 24, in check_resolver
for pattern in resolver.url_patterns: File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 310, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 303, in urlconf_module
return import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name) File "/home/Alexio/Mico_Weather_BackTrace/Mico_Weather_BackTrace/urls.py", line 21, in <module>
from profiles import views File "/home/Alexio/Mico_Weather_BackTrace/profiles/views.py", line 3, in <module>
from profiles.weather_Core_Engine.weather_DB_Handler import DB_handler ImportError: No module named weather_Core_Engine.weather_DB_Handler"
here is the file view.py
from django.shortcuts import render
from profiles.weather_Core_Engine.weather_DB_Handler import DB_handler
from profiles.weather_Core_Engine.weather_Request_Handler import request_weather
import time
import datetime
# Create your views here.
def home(request):
context = locals()
template = 'home.html'
return render(request,template,context)
def about(request):
DB_handler.populate_db()
# get input
city = 'Asti'
days = '2017/09/01'
#s = "01/12/2011"
days_to_time = time.mktime(datetime.datetime.strptime(days, "%Y/%m/%d").timetuple())
print ("Hello ale before")
#new_val = request_weather.history(city, days)
new_val = request_weather.historyOpen(city, days)
print ("Hello ale After")
print (new_val)
cities = DB_handler.get_cities()
context = {
'city_name':'about_Ale',
'city_name_db':cities,
'title':'News'
#'city_name':'about'+ str(cities).encode('utf-8')
#'city_name':'about'+ cities.strip().decode('utf-8')
}
template = 'about.html'
return render(request,template,context)
also here it the modified models.py:
from __future__ import unicode_literals
from django.db import models
import datetime
# Create your models here.
class profile(models.Model):
name = models.CharField(max_length=120)
description = models.TextField(default='description default text')
def __unicode__(self):
return self.name
class Cities(models.Model):
id = models.IntegerField(primary_key=True)
date = models.DateField(("Date"), default=datetime.date.today)
city_name = models.CharField(max_length=2048)
Json = models.TextField()
I don't understand the import issue while migrating the db.
the python code for the server works fine and there is no import issue.
if needed here is the project tree:
├── Mico_Weather_BackTrace
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── __pycache__
│ │ ├── __init__.cpython-35.pyc
│ │ ├── settings.cpython-35.pyc
│ │ └── urls.cpython-35.pyc
│ ├── settings.py
│ ├── settings.pyc
│ ├── urls.py
│ ├── urls.pyc
│ └── wsgi.py
├── apixu-python-master
│ ├── README.md
│ ├── apixu
│ │ ├── __init__.py
│ │ ├── client.py
│ │ └── tests
│ │ ├── current_tests.py
│ │ └── forecast_tests.py
│ └── setup.py
├── db.sqlite3
├── manage.py
├── media
├── profiles
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── __pycache__
│ │ ├── __init__.cpython-35.pyc
│ │ ├── admin.cpython-35.pyc
│ │ ├── models.cpython-35.pyc
│ │ ├── models.cpython-36.pyc
│ │ ├── views.cpython-35.pyc
│ │ └── weather_DB_Handler.cpython-35.pyc
│ ├── admin.py
│ ├── admin.pyc
│ ├── apps.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0001_initial.pyc
│ │ ├── 0002_profile_description.py
│ │ ├── 0002_profile_description.pyc
│ │ ├── 0003_cities.py
│ │ ├── 0003_cities.pyc
│ │ ├── __init__.py
│ │ └── __init__.pyc
│ ├── models.py
│ ├── models.pyc
│ ├── templates
│ │ ├── about.html
│ │ ├── base.html
│ │ └── home.html
│ ├── tests.py
│ ├── tests.pyc
│ ├── views.py
│ ├── views.pyc
│ └── weather_Core_Engine
│ ├── __pycache__
│ │ ├── weather_DB_Handler.cpython-35.pyc
│ │ └── weather_Request_Handler.cpython-35.pyc
│ ├── weather_CityRegstration_Handler.py
│ ├── weather_DB_Handler.py
│ ├── weather_Request_Handler.py
│ └── weather_Updater_Handler.py
└── static
├── admin
│ ├── css
│ │ ├── base.css
│ │ ├── changelists.css
│ │ ├── dashboard.css
│ │ ├── fonts.css
│ │ ├── forms.css
│ │ ├── login.css
│ │ ├── rtl.css
│ │ └── widgets.css
│ ├── fonts
│ │ ├── LICENSE.txt
│ │ ├── README.txt
│ │ ├── Roboto-Bold-webfont.woff
│ │ ├── Roboto-Light-webfont.woff
│ │ └── Roboto-Regular-webfont.woff
│ ├── img
│ │ ├── LICENSE
│ │ ├── README.txt
│ │ ├── calendar-icons.svg
│ │ ├── gis
│ │ │ ├── move_vertex_off.svg
│ │ │ └── move_vertex_on.svg
│ │ ├── icon-addlink.svg
│ │ ├── icon-alert.svg
│ │ ├── icon-calendar.svg
│ │ ├── icon-changelink.svg
│ │ ├── icon-clock.svg
│ │ ├── icon-deletelink.svg
│ │ ├── icon-no.svg
│ │ ├── icon-unknown-alt.svg
│ │ ├── icon-unknown.svg
│ │ ├── icon-yes.svg
│ │ ├── inline-delete.svg
│ │ ├── search.svg
│ │ ├── selector-icons.svg
│ │ ├── sorting-icons.svg
│ │ ├── tooltag-add.svg
│ │ └── tooltag-arrowright.svg
│ └── js
│ ├── SelectBox.js
│ ├── SelectFilter2.js
│ ├── actions.js
│ ├── actions.min.js
│ ├── admin
│ │ ├── DateTimeShortcuts.js
│ │ └── RelatedObjectLookups.js
│ ├── calendar.js
│ ├── cancel.js
│ ├── change_form.js
│ ├── collapse.js
│ ├── collapse.min.js
│ ├── core.js
│ ├── inlines.js
│ ├── inlines.min.js
│ ├── jquery.init.js
│ ├── popup_response.js
│ ├── prepopulate.js
│ ├── prepopulate.min.js
│ ├── prepopulate_init.js
│ ├── timeparse.js
│ ├── urlify.js
│ └── vendor
│ ├── jquery
│ │ ├── LICENSE-JQUERY.txt
│ │ ├── jquery.js
│ │ └── jquery.min.js
│ └── xregexp
│ ├── LICENSE-XREGEXP.txt
│ ├── xregexp.js
│ └── xregexp.min.js
├── media
├── static
│ └── css
│ ├── font-awesome.min.css
│ ├── main.css
│ ├── roboto.css
│ ├── w3-theme-black.css
│ └── w3.css
└── static-only
├── admin
│ ├── css
│ │ ├── base.css
│ │ ├── changelists.css
│ │ ├── dashboard.css
│ │ ├── fonts.css
│ │ ├── forms.css
│ │ ├── login.css
│ │ ├── rtl.css
│ │ └── widgets.css
│ ├── fonts
│ │ ├── LICENSE.txt
│ │ ├── README.txt
│ │ ├── Roboto-Bold-webfont.woff
│ │ ├── Roboto-Light-webfont.woff
│ │ └── Roboto-Regular-webfont.woff
│ ├── img
│ │ ├── LICENSE
│ │ ├── README.txt
│ │ ├── calendar-icons.svg
│ │ ├── gis
│ │ │ ├── move_vertex_off.svg
│ │ │ └── move_vertex_on.svg
│ │ ├── icon-addlink.svg
│ │ ├── icon-alert.svg
│ │ ├── icon-calendar.svg
│ │ ├── icon-changelink.svg
│ │ ├── icon-clock.svg
│ │ ├── icon-deletelink.svg
│ │ ├── icon-no.svg
│ │ ├── icon-unknown-alt.svg
│ │ ├── icon-unknown.svg
│ │ ├── icon-yes.svg
│ │ ├── inline-delete.svg
│ │ ├── search.svg
│ │ ├── selector-icons.svg
│ │ ├── sorting-icons.svg
│ │ ├── tooltag-add.svg
│ │ └── tooltag-arrowright.svg
│ └── js
│ ├── SelectBox.js
│ ├── SelectFilter2.js
│ ├── actions.js
│ ├── actions.min.js
│ ├── admin
│ │ ├── DateTimeShortcuts.js
│ │ └── RelatedObjectLookups.js
│ ├── calendar.js
│ ├── cancel.js
│ ├── change_form.js
│ ├── collapse.js
│ ├── collapse.min.js
│ ├── core.js
│ ├── inlines.js
│ ├── inlines.min.js
│ ├── jquery.init.js
│ ├── popup_response.js
│ ├── prepopulate.js
│ ├── prepopulate.min.js
│ ├── prepopulate_init.js
│ ├── timeparse.js
│ ├── urlify.js
│ └── vendor
│ ├── jquery
│ │ ├── LICENSE-JQUERY.txt
│ │ ├── jquery.js
│ │ └── jquery.min.js
│ └── xregexp
│ ├── LICENSE-XREGEXP.txt
│ ├── xregexp.js
│ └── xregexp.min.js
└── css
├── font-awesome.min.css
├── main.css
├── roboto.css
├── w3-theme-black.css
└── w3.css
any hint?
You don't have a __init__.py file to make weather_Core_Engine a module.
at the end, I understood why my server was compiling but the DB migration was failing.
I was using the wrong Python version to launch the migration.
forcing the python version I managed to correctly migrate the DB:
$ python3.5 manage.py makemigrations
I would anyway like to thank anyone who tried to help me :)

Categories