Re: importar datos en tiempo real de una base de datos externa

2020-03-20 Thread Luis Zárate
Hola, Revisa la siguienten documentación - https://docs.djangoproject.com/en/3.0/topics/db/multi-db/ - https://docs.djangoproject.com/en/3.0/howto/legacy-databases/ La idea es que puede hacer una app que sea una conexión a la db a travez de modelos creados con inspectdb (debe hacer algunas

Re: Inability to Connect django with MySQL database

2020-03-20 Thread Luis Zárate
This looks like your Mysql user can login without password in localhost (are you sure, your user has correct permissions?). Try to create a user with password and allow login from localhost, and change your django settings, also try to connect with your user with mysql client from localhost. El

Re: django staticfiles problem

2020-10-15 Thread Luis Zárate
You have a problem here {% static '/css/base.css' %} the correct is {% static 'css/base.css' %} Also is a bad idea set media folder in static. take a look here https://docs.djangoproject.com/en/3.1/howto/static-files/ El mié., 14 oct. 2020 a las 23:05, Farai M () escribió: > Why have

Re: can Django replace PHP ?

2021-06-28 Thread Luis Zárate
Hi, you can create several web applications with Django. So I guest you can replace all web stuff with Django or other lib in python for web development. El lun, 28 jun 2021 a las 7:17, Krishna Adhikari () escribió: > Hello all my seniors > > I am doing Data Science programming (python) for 3

Re: SChedule email

2021-07-01 Thread Luis Zárate
You can create a custom command using this doc https://docs.djangoproject.com/en/3.1/howto/custom-management-commands/ Now, you can call it like python manage.py mycustomcommandname so in Linux environment you can use crontab (with crontab -e) to execute the command. El jue, 1 jul 2021 a las

Re: Send PDF as an email's attachment ( Working with xhtml2pdf library)

2021-10-25 Thread Luis Zárate
Hi, Here is solved: https://github.com/luisza/async_notifications/blob/master/async_notifications/tasks.py El vie, 8 oct 2021 a las 7:45, MR INDIA () escribió: > Answer to this query on stack overflow > > Raw

Re: Help on Creating a Superuser account on render.

2024-04-10 Thread Luis Zárate
Maybe something like python manage.py shell -c "from django.contrib.auth.hashers import make_password;from django.contrib.auth.models import User; admin = User(username='username', email='exam...@example.com', password=make_password('password'), is_superuser=True,is_staff=True);admin.save()"

Re: How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

2024-04-12 Thread Luis Zárate
See https://docs.djangoproject.com/en/5.0/topics/class-based-views/#supporting-other-http-methods Also on view you have a variable called, where you can limit the available methods. http_method_names El vie, 12 abr 2024 a las 7:20, Mamadou Alpha Bah (< mamadoualphabah...@gmail.com>) escribió:

Re: DRF Trailing Slah

2024-04-12 Thread Luis Zárate
Check your URL.py and append the slash, also take a look of https://docs.djangoproject.com/en/5.0/ref/settings/#append-slash El vie, 12 abr 2024 a las 15:40, MISHEL HANNA () escribió: > Hello > i have endpoint when add / to the end of it i can not send request it > return this > Not Found:

Re: How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

2024-04-12 Thread Luis Zárate
Also a recomendation, see that `dispatch` method call the view as handler(request, *args, **kwargs) So maybe is a good idea do something like: class MyView(view): def put(self, request, *args, **kwargs): ... Regards, El vie, 12 abr 2024 a las 16:13, Luis Zárate () escribió

<    1   2   3