Re: guys help me please, I cannot upload images from django form,

2020-08-29 Thread Jonathan Villavicencio
Hello! in the class Posts in the field "image" add upload_to=upload_path for example: image = models.ImageField(blank=True, null=True, verbose_name='surat', upload_to=upload_path) upload_path is a method write it before of the class definition def upload_path(instance, filename): return '/'.jo

Re: Can't connect databases together

2020-01-17 Thread Jonathan Villavicencio
for example: https://docs.djangoproject.com/en/3.0/ref/models/fields/#foreignkey El vie., 17 de ene. de 2020 a la(s) 11:43, Jonathan Villavicencio ( codejonvi...@gmail.com) escribió: > In your model define a class and in out make the relationship with other > class that reference the other

Re: Can't connect databases together

2020-01-17 Thread Jonathan Villavicencio
In your model define a class and in out make the relationship with other class that reference the other table in the database El vie., 17 de ene. de 2020 a la(s) 11:14, Stephen (stephen.u...@gmail.com) escribió: > sqlite3 > > On Friday, 17 January 2020 16:53:01 UTC+1, Jonathan Vill

Re: Can't connect databases together

2020-01-17 Thread Jonathan Villavicencio
Hello Stephen, What is the database you are using? El vie., 17 de ene. de 2020 a la(s) 10:25, Stephen (stephen.u...@gmail.com) escribió: > How can I connect 2 database tables together please?. I am trying to > display some objects in a table by selecting an object that is in another > table. How

Re: Model form will not display in the URL assigned

2019-08-14 Thread Jonathan Villavicencio
Hello!, change the " of the fields of the Meta class to ' in the class Busines..(forms.ModelForm) El mié., 14 ago. 2019 a las 12:38, Kean () escribió: > Hi, > > New to Django, I'm trying to create a form which means user can update in > the browser and it gets stored in the database, however my f