Re: Aide

2019-07-05 Thread PASCUAL Eric
Google est ton ami : "django mongodb" fournit un tas de réponses à cette question, y compris des références à des packages d'extension de Django. Eric From: django-users@googlegroups.com on behalf of Djamiyou CHITOU Sent: Thursday, July 4, 2019 11:48 To: Djang

Re: Aide

2019-07-05 Thread Arnaud Tsombeng
HI Djamiyou, you can find a solution to you question on django documentation. Regards Le ven. 5 juil. 2019 à 00:50, Djamiyou CHITOU a écrit : > Salut tous svp! j'aimerais associé mongoDB a django que faire? > > -- > You received this message because you are subscribed to the Google Groups > "Dja

help

2019-07-05 Thread Manjunatha Sai Uppu
I am new to web development in django , i have some questions that 1. Is it necessary to learn html,css? 2. what are the advantages and disadvantages of django? 3. how it is useful? 4. any best resources that u can provide for me? thanks in advance...! -- You received this message because you

Django 2.2 Media files

2019-07-05 Thread Michał Ratajczak
Hi, i'm new in Django, I'm trying to configure media files correctly. That's in my model.py: class Question(models.Model): description = models.CharField(max_length=200) image = models.ImageField(upload_to='media/', null=True, blank=True) in settings.py: STATIC_URL = '/static/' MEDIA_U

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-07-05 Thread sachin thakur
I am also facing the same problem i am using PostgreSQL data base . please do share this issue bug *Thanks and Kind Regards* *Sachin Thakur* about

Re: help

2019-07-05 Thread Jani Tiainen
Hi. Please don't hijack other people threads but start a new one. pe 5. heinäk. 2019 klo 15.55 Manjunatha Sai Uppu kirjoitti: > I am new to web development in django , i have some questions that > 1. Is it necessary to learn html,css? > No. Absolutely no. You can write plain backend code fo

Re: Django 2.2 Media files

2019-07-05 Thread John Bagiliko
Remove the upload_to in the model. On Fri, Jul 5, 2019, 12:55 PM Michał Ratajczak wrote: > Hi, i'm new in Django, I'm trying to configure media files correctly. > > That's in my model.py: > > class Question(models.Model): > description = models.CharField(max_length=200) > image = models.

Re: Django 2.2 Media files

2019-07-05 Thread John Bagiliko
Since you already configured static folder called media in settings.py, if you specifify upload_to='/media', Django will create a folder 'media' inside the media folder. On Fri, Jul 5, 2019, 2:21 PM John Bagiliko wrote: > Remove the upload_to in the model. > > On Fri, Jul 5, 2019, 12:55 PM Micha

Re: Connecting to SQL Server

2019-07-05 Thread Joe Reitman
When does this error occur? During runserver or when executing a commit from your model? On Thursday, July 4, 2019 at 11:48:40 AM UTC-5, John Burke wrote: > > For this particular instance, I don't need the port number. > > On Thu, Jul 4, 2019 at 11:47 AM Joe Reitman > wrote: > >> Don't you need

Re: How to convert files from .bin to .png with Python or Django

2019-07-05 Thread Fernando Garrido Villalobos
Aldian F. The .bin files have content of data in binary format that was copied from a disk to this output file El miércoles, 3 de julio de 2019, 18:52:35 (UTC-5), Fernando Garrido Villalobos escribió: > > How to create a function that have like argument the path of a .bin file > and returns

Re: access league by league-code REST api

2019-07-05 Thread omar ahmed
please explain ? On Friday, July 5, 2019 at 7:25:08 AM UTC+2, Serdar Emirci wrote: > > > /League > /League > > > Serdar EMIRCI > > > omar ahmed >, 5 Tem 2019 Cum, 00:43 > tarihinde şunu yazdı: > >> hiii .. >> i use REST api to get data from "https://www.football-data.org"; .. >> i want to cr

saving inherited model overwrites base model

2019-07-05 Thread Kalev Takkis
Hi all, tl;dr: saving inherited model overwrites fields in parent models with empty strings I have the following models: class Contact(models.Model): comment = models.CharField(max_length=255, blank=True) emails = models.ManyToManyField( Email, blank=True, throug

Re: Django 2.2 Media files

2019-07-05 Thread Anonymous Anon
I just find it really useful to save it in Google cloud On Fri., Jul. 5, 2019, 8:25 a.m. John Bagiliko, < john.bagil...@aims-senegal.org> wrote: > Since you already configured static folder called media in settings.py, if > you specifify upload_to='/media', Django will create a folder 'media' > i

Gravar um valor num atributo novo da models User

2019-07-05 Thread Marcos - GMail
Customizei meus códigos para os demostrados no curso do Gileno Alves Santa Cruz Filho e ficou muito mais limpo e organizado a parte de customização da minha model User. O que falta pra mim? Eu criei mais um atributo(campo) de nome "Role" na minha models.py "Class User" e gostaria de gravar um ou ma

Re: Django 2.2 Media files

2019-07-05 Thread Michał Ratajczak
I Remove upload_to and it still wasn't working and next i did in my template.html: {% get_media_prefix as *STATIC_PREFIX* %} <- i added this line because {{ item.image }} returns only 'image.jpg'. Now a url is correct :) {% for item in images %} {% endfor %}

Re: Django 2.2 Media files

2019-07-05 Thread Jani Tiainen
Hi. What you did is correct and expected. Upload_to is relative path to MEDIA_ROOT in case of normal file upload backend. There are many others like S3. Now MEDIA_URL is absolute path of web server which points to MEDIA_ROOT. In development you can use static file serving trick like you did. No

Re: saving inherited model overwrites base model

2019-07-05 Thread Jani Tiainen
Hi. I think you have a bit confused terms model inheritance and abstract models. Normal model inheritance in Django means that there will be implicit one to one relation to base model. Inherited model still receives all fields from parent model. On save data is just saved to correct models. To bo

Re: Django 2.2 Media files

2019-07-05 Thread Michał Ratajczak
Oh yeah! That's it ! Big thank's for you :) W dniu piątek, 5 lipca 2019 22:14:52 UTC+2 użytkownik Jani Tiainen napisał: > > Hi. > > What you did is correct and expected. > > Upload_to is relative path to MEDIA_ROOT in case of normal file upload > backend. There are many others like S3. > > Now ME

Re: How to convert files from .bin to .png with Python or Django

2019-07-05 Thread Joe Reitman
Try using the Pillow library. On Wednesday, July 3, 2019 at 6:52:35 PM UTC-5, Fernando Garrido Villalobos wrote: > > How to create a function that have like argument the path of a .bin file > and returns a .png file ... > I need your help, > thank you so much. > -- You received this message