Anonymous
like aws , pythonanywhere, ets
Anonymous
*etc
Dilli
How to call AI model in django pls anyone help
sravan
Dilli
Maksim
можно ли как то сделать чтобы ckeditor не изменял шрифт? был только один
cj
Luis
You should provide a User instance... try just using DonorRegister
Luis
Upload your code to pastebin and share it (DonorRegister model, your view, form, etc)
Luis
The problem here is your are trying to store a wrong data type
Luis
Let's see where is the problem
Luis
Sorry. my english sucks...
Shikhar
Suppose I've saved an image url in admin panel how can I use it in my template
Anonymous
Shikhar
Like I declare image_url in models. Then when we have to save post instead of taking file from the system I directly put url on the feild
Anonymous
Anonymous
Just get that image_url from object
Shikhar
I use article as object. " article.image_url " is that correct
Anonymous
In your views.py
articals=ModelName.objects.all()
In html template
{% for artical in articals %}
<img src="{{artical.image_url}}">
{% endfor %}
Anonymous
Shikhar
Do I've to use media_root
Anonymous
Anonymous
you just have to modify your views.py and template
Felix
short question… if i have an message model is it better to create a simple Integerfield for senders and recievers ID or should i use two foreignkeys? like this:
user_writer = models.ForeignKey('User',
related_name='%(class)s_user_writer',
on_delete=models.CASCADE, default=None
)
user_recipient = models.ForeignKey('User',
related_name = '%(class)s_user_recipient',
on_delete=models.CASCADE, default=None
)
Денис
Денис
but related_names are strange. I'd rather use just "messages_written" and "messages_received"
Felix
Mikhail
https://github.com/daviddrysdale/python-phonenumbers
Who 've been working with this library? I need to add one more template , besides already existing
E. G I want to consider number that starts with 8XXXXXXXXXX as valid
Not only +1XXXXXXXXXX , that already settled in settings
Logan
I have created the Apis for jwt auth but how i can use it in django or flask just like we use it in react-redux to keep track of the token?
Logan
I Have created the APIs in flask
Raad
https://pastebin.com/fAhWZ9JQ
Hello,
I need to to fix this error. TypeError: create_superuser() missing 1 required positional argument: 'username'
Raad
I want use email address as a username
SD
Try this
user = self.create_user(username=email, password=password)
Raad
SD
SD
In setting.py
Raad
Raad
Still getting same error
Raad
AUTH_USER_MODEL = 'app.Users'
I have line in the setting too
Raad
You mean I need to move them to the UserManager model?
raven
user client side programming for that i.e js
Ayomide
Please can anyone help with deploying django apps to heroku?
Doragonsureiyā
Please can anyone help with deploying django apps to heroku?
Please don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello I need help on $z"
Just ask about your problem directly! With 43k+ people the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
Ayomide
Who has a very clear explanation on class based views...or where i can learn from
Ayomide
Most tutorials dont cover all the use cases
Денис
Vahe
Hello guys,
How can I save text(which contains html tags) in the database and then use it with the tags.
For example the following:
<h2>title of the text</h2>
<p>dnnfjfkifjdnfkfijdj</p>
cj
Vahe
Vahe
Ayomide
Luis
Please, next time don't upload your code here. Use pastebin and share the link.
In your model, uname is a ForeignkeyField to User model. In your view you are trying to assign POST['username'] to uname and this is wrong.
You should query database for the User (filtering for that username) and use the User instance as uname to create your model.
Anonymous
It is similar to del.dog and hasteb.in
Ghorz
https://duckduckgo.com/?q=what%20is%20pastebin&ia=about
Jigani
Hey guys! Anyone knows how to go about building an e commerce site with Django.... I'm a beginner, just finished successfully building the polls app from the documentation...:-)
Ghorz
Ghorz
Ghorz
Hey guys! Anyone knows how to go about building an e commerce site with Django.... I'm a beginner, just finished successfully building the polls app from the documentation...:-)
Don't post homework questions
Hackers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions.
Resist the temptation to close your request for help with semantically-null questions like “Can anyone help me?” or “Is there an answer?” First: if you've written your problem description halfway competently, such tacked-on questions are at best superfluous. Second: because they are superfluous, hackers find them annoying — and are likely to return logically impeccable but dismissive answers like “Yes, you can be helped” and “No, there is no help for you.”
In general, asking yes-or-no questions is a good thing to avoid unless you want a yes-or-no answer.
Jigani
Luis
Hi guys! I'm working with django admin, A model with ManyToManyField (using TabularInLine widget) and m2m_change signal.
I found some limitations with this technique 'cause m2m_change is not triggered (https://cutt.ly/0ek67Sn). How can I keep my TabularInLine and trigger from admin m2m_change manually ?
Aleksey
Hello everyone! I have been trying to set mysql for django project. Last time I did it successfully and project worked correctly. But I had to reinstall Windows and now I start project again. So, I face some troubles. At first, django asked me to install mysqlclient. I did it and than next error followed: Microsoft Vissual C±+ is required. I did it too. When I start manage.py runserver Visual Studio are running instead of server working. Could anybody advise how to solve it?
I use Python 3.7 (64 bit), Installed with VS
Luis
Luis
Aleksey
Yes
Luis