3 Commits 8c3159f599 ... 5c313e3c25

Autor SHA1 Mensaje Fecha
  Christian T Vidal 5c313e3c25 Update base.py hace 2 años
  Christian T Vidal 14b0358229 Update requirements.txt hace 2 años
  Christian T Vidal a9fad0fa2e Update urls.py hace 2 años
Se han modificado 3 ficheros con 5 adiciones y 5 borrados
  1. 4 1
      adm/mysql/base.py
  2. 0 3
      mobeesia/urls.py
  3. 1 1
      requirements.txt

+ 4 - 1
adm/mysql/base.py

@@ -80,7 +80,10 @@ class DatabaseWrapper(_DatabaseWrapper):
         return database
 
     def _get_alias_by_params(self, conn_params):
-        target_str = ''.join([str(conn_params[_]) for _ in ['host', 'port', 'database', 'user', 'password']])
+        if "database" in conn_params:
+            target_str = ''.join([str(conn_params[_]) for _ in ['host', 'port', 'database', 'user', 'password']])
+        else:
+            target_str = ''.join([str(conn_params[_]) for _ in ['host', 'port', 'db', 'user', 'passwd']])
         for k, v in settings.DATABASES.items():
             _str = ''.join([str(v[_]) for _ in ['HOST', 'PORT', 'NAME', 'USER', 'PASSWORD']])
             if _str == target_str:

+ 0 - 3
mobeesia/urls.py

@@ -1,10 +1,7 @@
 
-from django.contrib import admin
-from django.urls import path
 from django.conf.urls import url
 from django.conf.urls import include
 
 urlpatterns = [
     url(r'^', include('chatbot.urls')),
-    path('admin/', admin.site.urls),
 ]

+ 1 - 1
requirements.txt

@@ -1,4 +1,4 @@
-Django
+Django==3.0.3
 django-cloud-browser==0.5.4
 django-composite-foreignkey==1.1.0
 django-conn-pool==2.1.0