Hi group ;-)
I have a little challenge.
We have a frontend angular api. Wich sinds data to my django backend from
an input form.
And Contact in the frontend How to just my serializer / models file right
so the contact data is in my database?
contact?: {
name: string;
email: string;
phone: st
Hi Tim,
IMHO, you can change angular's request body as per model defined in app so
that, serializer can validate and save into table.
Regards,
Krishna
On Wed, 31 Oct 2018 at 15:11, Tim Vogt wrote:
> Hi group ;-)
>
> I have a little challenge.
>
> We have a frontend angular api. Wich sinds da
i used foreign key for make relationship between two model class but it
does not work properly, i used this for make subscription and on first
model their is choices for subscription.
help me why it is not working
--
You received this message because you are subscribed to the Google Groups
"Dj
Where is model codes?
On Wednesday, 31 October 2018 17:15:53 UTC+5:30, amit pant wrote:
>
> i used foreign key for make relationship between two model class but it
> does not work properly, i used this for make subscription and on first
> model their is choices for subscription.
> help me why it
Use:
on_delete = models.CASCADE
In Foreign Key
On Wed 31 Oct, 2018, 5:15 PM amit pant, wrote:
> i used foreign key for make relationship between two model class but it
> does not work properly, i used this for make subscription and on first
> model their is choices for subscription.
> help me wh
Hi,
We are using django 1.11 for our ecommerce site.
We are developing unit tests for our views using django testing framework.
We are facing issue with a simple implementation:
import unittest
from django.urls import reverse
from django.test import Client
class ViewTests(unittest.TestCase
Two things I can see:
you should be inheriting from TestCase in django.test, not unittest.
Second, you should find your answer at
https://stackoverflow.com/questions/27136048/django-unit-test-response-context-is-none
.
I believe the attribute you're trying to access was deprecated in django
Hi,
Normal ListView result a list with "model"_list as name... there's any way
to change these name?
T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*
e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
<
Hi Jason,
Thanks for your prompt response.
I was using Django TestCase but it wasn't working then. Hence, I resorted
to unittest as shown in Django 1.11 documentation. Also, the attribute was
working fine in django shell.
Please refer to the documentation here:
https://docs.djangoproject.com
It would be helpful to see the complete traceback. What you provided
doesn't show where the exception originates.
On Tuesday, October 30, 2018 at 10:38:38 PM UTC-4, Pacôme Avahouin wrote:
>
> Hello guys,
>
> I'm trying to upload user avatar (ImageField type) with my own custom user
> model foll
So Do you mean i change the angular?
Of my models file? If the last apply how?
Sincere,
Tim
On Wednesday, October 31, 2018 at 12:10:51 PM UTC+1, Krishnasagar
Subhedarpage wrote:
>
> Hi Tim,
>
> IMHO, you can change angular's request body as per model defined in app so
> that, serializer can vali
Hello Tim,
Thanks for answering.
Here is the complete traceback.
By the way when i commented out the 'upload_file' function still i'm
getting the same error.
I believe the origin might be somewhere else.
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/user/edit-profile
It looks like the width_field option on the model field isn't a string.
On Wednesday, October 31, 2018 at 10:28:42 AM UTC-4, Pacôme Avahouin wrote:
>
> Hello Tim,
>
> Thanks for answering.
>
> Here is the complete traceback.
> By the way when i commented out the 'upload_file' function still i'm
>
Tim you just saved me right now:) I have spent the all night trying to
figure it out.
Thanks a lot.
Now when i removed the width_field it works fine. But how to
define height_field and width_field directly from the model?
Cause when i put their values in quotes i got another error.
--
You recei
height_field and width_field should be strings. What's the error and what
does your model fields look like?
On Wednesday, October 31, 2018 at 10:53:53 AM UTC-4, Pacôme Avahouin wrote:
>
> Tim you just saved me right now:) I have spent the all night trying to
> figure it out.
> Thanks a lot.
> No
>
> My model fields look like this:
>
> class CustomAbstractUser(AbstractBaseUser, PermissionsMixin):
> """
> An abstract base class implementing a fully featured User model with
> admin-compliant permissions.
>
> Email and password are required. Other fields are optional.
> ""
You've misunderstood the purpose of height_field and width_field. Please
read the documentation:
https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ImageField.height_field
You need to use a third-party app to do image resizing. Check out
https://djangopackages.org/grids/g
I have a custom function to check if a user is authorized to do
certain functions:
@login_required
def checkpermission(request, permiss):
username = request.user.username
print(f"username is {username}")
print(f"User.objects.filter() is {User.objects.filter()}")
userobj = User.obje
Yes you right Tim, i have misunderstood the purpose of height_field and
width_field, i'm new in Django :)
Gonna check more in the documentation and try a third-party app to resize
images.
Thanks a lot for the help. I appreciate.
--
You received this message because you are subscribed to the Goo
@login_required needs "request" as the first parameter.
On Wed, Oct 31, 2018 at 11:58 AM Joel Mathew wrote:
> I have a custom function to check if a user is authorized to do
> certain functions:
>
> @login_required
> def checkpermission(request, permiss):
> username = request.user.username
>
It seems to be a bug as reported in
https://code.djangoproject.com/ticket/29908. The ForeignKey must use
to_field to reproduce the problem.
On Saturday, October 20, 2018 at 4:38:51 AM UTC-4, Carsten Fuchs wrote:
>
> Can anyone help please?
>
> Am 2018-10-11 um 16:58 schrieb Carsten Fuchs:
> >
21 matches
Mail list logo