While you cannot use Python operators and functions directly in the
templates, you can write your own "wrappers" around those you need:
https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/
On Wednesday, 27 May 2020 15:57:34 UTC+2, Daniel Roseman wrote:
>
> On Wednesday, 27 May 2020
When you make any changes to the field, AlterField will be added rather
than AddField.
On Thu, May 28, 2020 at 7:32 AM Erin Masatsugu
wrote:
> If I have this a model in app A:
> class AppAModel(models.Model):
> name = models.CharField(max_length=50, default="")
>
> and this model in app B:
>
If I have this a model in app A:
class AppAModel(models.Model):
name = models.CharField(max_length=50, default="")
and this model in app B:
class AppBModel(models.Model):
name = models.CharField(max_length=50, default="")
and a I add a foreign key to AppAModel in app C:
class AppCModel(mo
Thanks Samuel it worked
On Thu, May 28, 2020, 12:23 AM Samuel Nogueira wrote:
> In your Comment model you have a author field wich is a ForeignKey. The
> error is pointing exactly to that field, since it is a not null field. To
> overcome this you must pick the ID of the logged user and set the
In your Comment model you have a author field wich is a ForeignKey. The error is pointing exactly to that field, since it is a not null field. To overcome this you must pick the ID of the logged user and set the author field with the user ID. You can do that in your views.py the same way as you did
Sure! Here it is: https://github.com/SamuelNoB/Primeiro-Projeto-Django-REST Sorry if my requirements.txt is messy. I didn’t set properly my venv and it pulled all packages of my system De: Mujahid AbbasEnviado:quarta-feira, 27 de maio de 2020 19:16Para: Django usersAssunto: RES: Re: Deploy on hero
I try to let user add comments to blog post am making... When I run
makemigrations and migrate, everything seemed fine . The form displayed well
but shows the following error when I fill the form and click on the submit
button. Django.db.utils.IntegrityError: NOT NULL constraint failed:
blog_co
Well
On Thu 28 May, 2020, 2:37 AM Ammar M. Adam, wrote:
> Welcome 😊 anytime 😁
> On May 27, 2020 23:30, "Lansana Sangare" wrote:
>
>> Thanks guy, it works now
>>
>> Ammar M. Adam schrieb am Di., 26. Mai 2020,
>> 23:43:
>>
>>> The FileField Must have a function for that
>>> Use help(django.model
Could you share you GitHub repo so that I'll help you
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To view this dis
Actually I want to fetch all users from User table and users location from
Location table which is many to many relation from same Profile table. Is
it possible???
On Thu 28 May, 2020, 2:54 AM Soumen Khatua,
wrote:
> Now I'm facing one problem whenever I'm trying to iterate a loop I'm
> getting
Now I'm facing one problem whenever I'm trying to iterate a loop I'm
getting too many SQL variables. Actually after iterating the loop I want to
render all the value in the template.
if could you resolve this it would be very good for me.
Thank you for your time and response
Regards,
Soumen
On T
Welcome 😊 anytime 😁
On May 27, 2020 23:30, "Lansana Sangare" wrote:
> Thanks guy, it works now
>
> Ammar M. Adam schrieb am Di., 26. Mai 2020, 23:43:
>
>> The FileField Must have a function for that
>> Use help(django.models.FileField)
>> It must have some sort of FileField.read() or something l
Profile.objects.filter().select_related("user").prefetch_related("location")
On Thu, May 28, 2020, 2:01 AM Soumen Khatua
wrote:
> I also know about this concept but I don't how I can achieve it, Could
> you give me an example?
> Suppose I have:
>
>
>
>
>
>
>
> *class Profile(models.Model):us
I also know about this concept but I don't how I can achieve it, Could
you give me an example?
Suppose I have:
*class Profile(models.Model):user = models.OneToOneField(
settings.AUTH_USER_MODEL,on_delete = models.CASCADE,
related_name="profile")location = models.ManyToMan
Thanks guy, it works now
Ammar M. Adam schrieb am Di., 26. Mai 2020, 23:43:
> The FileField Must have a function for that
> Use help(django.models.FileField)
> It must have some sort of FileField.read() or something like that.
> Am also a beginner but I think this should work with you 😉.
> On Ma
Hi John,
On 27/05/2020 19.06, John McClain wrote:
Hello All,
Can anyone provide a method to split payments via paypal. I basically
want to earn a commission on the sale and pass the balance to the seller
through my marketplace.
Maybe this would be a better place to ask:
https://www.paypa
Hello All,
Can anyone provide a method to split payments via paypal. I basically want
to earn a commission on the sale and pass the balance to the seller through
my marketplace.
Thanks,
John
--
John McClain
Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com
--
You received
Read about django channels
On Wed, 27 May 2020, 1:30 pm meera gangani,
wrote:
> I want to create chatroom in django like slack, where user can post
> messages to the room and at the same time other user can see those message
> immediately
>
> What Can I Do?
> And What are the Libraries I install
You got solution for your query?
On Wed, May 27, 2020, 14:52 Ifeanyi Chielo
wrote:
> at the html file of your template folder, use something like
> {{table1.skin_care1}}
> {{table1.skin_care2}} etc
>
> note skin_care1, skin_care etc are fields in your model table 'table1'
>
> Dr. Chielo C. I
Ok. Now I've dealt with this returned None problem, but I still have no
idea what to do to keep my form content after clicking submit button. Does
next parmeter generated by login_required contain only link or also form
content?
W dniu środa, 27 maja 2020 15:58:22 UTC+2 użytkownik Jan Gregorczy
the error message is
unsupported format string passed to NoneType.__format__
Le mer. 27 mai 2020 à 13:09, Akinfolarin Stephen <
akinfolarinsteph...@gmail.com> a écrit :
> i feel in your last session you are trying to concatenate a string and an
> integer use the int function to convert it to stri
When I test the function you offer 'self.id' returns 'None'
Le mer. 27 mai 2020 à 13:09, Akinfolarin Stephen <
akinfolarinsteph...@gmail.com> a écrit :
> i feel in your last session you are trying to concatenate a string and an
> integer use the int function to convert it to string then the numbe
Hi Jan,
On 27/05/2020 14.01, Jan Gregorczyk wrote:
At the moment I'm getting this errror:
The view questions.views.answer didn't return an HttpResponse object. It
returned None instead.
Consider what will happen if the form is *not* valid, ie. this statement
returns false:
if form.is_val
On Wednesday, 27 May 2020 13:21:24 UTC+1, ratnadeep ray wrote:
>
> Hi all,
>
> Currently I am trying to print the type of a variable from the Django
> template html file as follows:
>
> The type of feature list report for version
>> {%type(version)%} is
>
>
> For the above, I am getting the
*I* have problem similar to this one:
https://stackoverflow.com/questions/50272631/django-form-data-lost-on-making-login-required-on-post
I want answer to be added if user is logged in otherwise redirect user to
login page, let him login and then add his answer. My problem is that I
lose content
select_related for fk and prefetch_related for m2m in django, you can chain
them together
Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in
On Wed, May 27, 2020 at 4:51 PM Soumen Khatua
wrote:
> Hi Folks,
> I have many to many relationships and Foreign Key in the
i feel in your last session you are trying to concatenate a string and an
integer use the int function to convert it to string then the number will
show
On Monday, May 25, 2020 at 5:48:29 AM UTC+14, Anselme SERI wrote:
>
> from django.db import models
>>
>>
>> def codeid():
>> lastid = MyMod
I’m trying to optimize a few different things.
I am looking to try to change this into a more database driven routine, instead
of having to iterate through each and every record. While not time consuming
(overall), I would like to try to make it a bit cleaner…
Effectively I am calculating whic
On Thursday, May 28, 2020 at 2:45:30 AM UTC+14, Samuel Nogueira wrote:
>
> Hi guys. Does anyone have/know a walkthrough for deploying my django
> application using geodjango and postgres with postgis on heroku? I was
> struggling with that yesterday until I've given up.
> I was developing my dj
Hi guys. Does anyone have/know a walkthrough for deploying my django
application using geodjango and postgres with postgis on heroku? I was
struggling with that yesterday until I've given up.
I was developing my django app in win10, with python 3.7.7.
--
You received this message because you are
Hi Anselme,
On 27/05/2020 13.33, Anselme SERI wrote:
What I want to do is fill in the 'code' field of my 'Diploma' template.
For example, the first record of the model will have the value
'BAC1' in the 'code' field, the second 'BAC2', , 'BAC01653'
.
The approach I have chose
Hi all,
Currently I am trying to print the type of a variable from the Django
template html file as follows:
The type of feature list report for version
> {%type(version)%} is
For the above, I am getting the following error:
Invalid block tag on line 9: 'type(version)'. Did you forget
Hello,
I will try to explain it to you in the language I understand best and I
hope that you will have an excellent translator to identify me.
english version
What I want to do is fill in the 'code' field of my 'Diploma' template. For
example, the first record of the model will have the value 'BA
I want to create chatroom in django like slack, where user can post
messages to the room and at the same time other user can see those message
immediately
What Can I Do?
And What are the Libraries I install?
Please Help Me Out!!
Thanks In Advance
-Meera Gangani
--
You received this message bec
Hi Folks,
I have many to many relationships and Foreign Key in the table, I'm using
select_realted(foreign key filed name) to optimize the query but I want to
fetch many to many and foreign key at the same time , How I can do this in
very optimized way?
Thank You
Regards,
Soumen
--
You received
Okay!! I have solved it myself:
the mistake was that 'subscribers' is itself a list, so 'to_email' should
be 'sub' instead of '[sub]'.
Thank You
On Wednesday, 27 May 2020 14:01:28 UTC+5:30, Anubhav Madhav wrote:
>
> Hello everyone!!
>
> I have stuck in the middle of my project. Please help.
>
>
Please can someone help me look into this.
I have done everything to use django-social-share but it refused to work with
the templates I defined.
Can you help me take a look.
https://stackoverflow.com/questions/62038241/how-do-i-make-custom-templates-for-django-social-share
--
You received this
at the html file of your template folder, use something like
{{table1.skin_care1}}
{{table1.skin_care2}} etc
note skin_care1, skin_care etc are fields in your model table 'table1'
Dr. Chielo C. Ifeanyi
Chief Programmer,
Head Webometrics Section
ICT Unit, UNN
08032366433, 08154804230
ifeanyi.chi..
Please refer to this to understand the doubt more clearly:
https://stackoverflow.com/questions/62038925/custom-model-action-function-in-django-admin
On Wednesday, 27 May 2020 14:01:28 UTC+5:30, Anubhav Madhav wrote:
>
> Hello everyone!!
>
> I have stuck in the middle of my project. Please help
Hello everyone!!
I have stuck in the middle of my project. Please help.
I have created a custom function within a model, which sends a newsletter
email to the subscribed users. I registered this model action in admins.py
, so that I can perform that action using admin panel.
After that, when
Thanks
On Wed, 27 May, 2020, 1:04 pm Derek, wrote:
> Lots of examples out there, but here is one:
>
>
> https://www.gun.io/blog/how-to-list-items-in-a-dictionary-in-a-django-template
>
> For working with static files (such as CSS or images), have a look at:
>
> https://scotch.io/tutorials/workin
Lots of examples out there, but here is one:
https://www.gun.io/blog/how-to-list-items-in-a-dictionary-in-a-django-template
For working with static files (such as CSS or images), have a look at:
https://scotch.io/tutorials/working-with-django-templates-static-files
On Monday, 25 May 2020 17:06:
42 matches
Mail list logo