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
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
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
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
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
5 matches
Mail list logo