inchidi
a moment
pino@mastrobirraio ~$
wait
pino@mastrobirraio ~$
i've duplicated MEDIA_ROOT into settings
pino@mastrobirraio ~$
let me try setting the MEDIA_URL
pino@mastrobirraio ~$
mmh
pino@mastrobirraio ~$
the outcome is the same
inchidi
folder media/home/photos/ inside your project dir exists and not empty right?
inchidi
the outcome is the same
can you copy the url here just like this for example localhost:8000/media/home/photos/WhatsApp_Image.jpg
inchidi
if you get the url from inspect element of this element it would be great because that what rendered
pino@mastrobirraio ~$
But i see the image into the directory
inchidi
what happen if you delete one of the /media in the url
pino@mastrobirraio ~$
nothing
pino@mastrobirraio ~$
the outcome is the same
inchidi
the outcome is the same
share your root urls.py
pino@mastrobirraio ~$
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('home/', include('demo.home.urls')), path('user/', include('demo.user.urls')), path('dashboard/', include('demo.dashboard.urls')), ]
pino@mastrobirraio ~$
yes now it works
pino@mastrobirraio ~$
i've added it to the urls of the dashboard app
pino@mastrobirraio ~$
thank you very much
Mirco
yes now it works
Just for my curiosity, your DEBUG was False ?
Mirco
👍🏻👍🏻 gotcha
Mohit
In order to use the power of django and python with machine learning, and including the form submission without page refresh, drag and drop etc, should I integrate django with angular js? Because with using angular 2+ django can only be used for rest_framework
Mohit
Where is everyone
Mohit
Ok so what if I want the power of python, like AI integration
Mohit
Can this be implement in rest framework
Mirco
Yup , why not ?
Mohit
Hmmm ok
Roman
Hey. I have table schema in sqlalchemy how use this in django models class Centralidresource(Base): tablename = 'centralidresource' id = Column(INTEGER(), primary_key=True) central_id = Column(String(12), nullable=False) block = Column(TINYINT(4), nullable=False)
Mirco
Your class should inherit from models.Model and you can keep every field, you should use CharField, IntegerField etc. Have a look at official docs
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Any sql gurus here ? https://pastebin.com/HTes8ZqP
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I want the query to return/substitut the user_id with the user name row
Mirco
If I don't go wrong instead of select all , by specifying ( for example ) select reviews.text, users.name from reviews inner join users on reviews.id = users.id and book_id = 3 It should work
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
ahh
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I see
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I will try
Mirco
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
SELECT * FROM reviews JOIN users ON reviews.user_id = users.id WHERE reviews.id = 3; I was able to get what I wanted with this, the above syntax got confusing fast.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
password and everythig 😂
Mirco
Good 😀😀
Anonymous
is there away that let the user upload only zip files
Arulmurugan
is there away that let the user upload only zip files
You can add a validation to check for file type.
Wang
everyone good afternoon
Wang
How do you save your mobile number in django?
Anonymous
Anonymous
By using a database?!
Wang
is it model.CharField?
Anonymous
Integer field
Wang
By using a database?!
what's Field in django
Anonymous
Or big integer
Wang
Integer field
are u kidding me
Anonymous
How long are your phone numbers?
Wang
11
Anonymous
Big integer can store that
Wang
i want difine the phonenumber Field by myself as emailField
Anonymous
Hmm?
Wang
i wish have a Field like email, i can direct to use it save phonenumber
.
Thanks
Wang
Hmm?
ok i find a best way
Anonymous
Can you not post photo of screen
Mohamed
https://wsvincent.com/format-phone-numbers-in-django/
Mohamed
How do you save your mobile number in django?
inchidi
ok i find a best way
thats not the best way, even the example there (+99999) is invalid phone number. i recommend you to use this package instead https://github.com/stefanfoulis/django-phonenumber-field
Dmitriy
There is a rather large set of models for the postgres database described by sqlalchemy, what would you recommend using for validation if you choose between zope.interfaces and marshmallow?
Dmitriy
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Anders (izznogooood) 🇳🇴: How do you handle linebreaks and paragraphs in jinja2? Django has a filter |linebreaks that does this automatically. No such thing in flask.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Don't shoot me...
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
maybe can use br tag
Yes, but then the user would have to do that in their input form...
Anonymous
hello guys - did someone here used Elasticsearch with django?
Anonymous
I have some doubts I didn't find response googling
8 โ‚ฌ โˆ† $ "|"
anyone
8 โ‚ฌ โˆ† $ "|"
here
8 โ‚ฌ โˆ† $ "|"
have react-native group?
8 โ‚ฌ โˆ† $ "|"
or knows react
Mirco
Yup, there's @react-native-en Go there