Re: Nested Model Issue

2019-08-10 Thread mohamed habib
You can use a signal to ensure that a profile is created for each user. Make sure all the fields in your Profile model are nullable: ``` class Profile(models.Model): GENDER_CHOICES = ( ('male', 'Male'), ('female', 'Female') ) user = models.ForeignKey(User,on_delete=models.

Re: Tutorial Problems...

2019-08-10 Thread aman kumar
hello... While using field type null ... what is difference between "Empty string" and Null=True i.e null ..value for "no data" in string based field...? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gro

Nested Model Issue

2019-08-10 Thread Soumen Khatua
Hi Folks, My requirement is whenever i create a user in post method that user can pass username and password, Address models contain some field and Profile models contains some field. If he is authenticated users and want to create one prifile he need to pass Address model contains some field and P

Re: LANGUAGE_CODE

2019-08-10 Thread DANIEL URBANO DE LA RUA
It may be not getting yor locale from your folders On Sun, 28 Jul 2019, 20:09 Yves de Champlain HI > > Django translation works very well for me, except that when I try to > change LANGUAGE_CODE in settings.py, my site remains in French. I need to > change my OS system settings to see the English

Re: LANGUAGE_CODE

2019-08-10 Thread DANIEL URBANO DE LA RUA
Prefix_default_language in urls file inside i18n_patterns On Sun, 28 Jul 2019, 20:09 Yves de Champlain HI > > Django translation works very well for me, except that when I try to > change LANGUAGE_CODE in settings.py, my site remains in French. I need to > change my OS system settings to see the

Re: LANGUAGE_CODE

2019-08-10 Thread Yves de Champlain
Hi I looked for the cookie, but did not find it. How do you find them when running django server on localhost:8000 ? yves Le dimanche 28 juillet 2019 22:57:42 UTC-4, Aldian Fazrihady a écrit : > > Hi Yves, please clear cookies and refresh your django app page afterwards. > > It is possible to

Re: Django models and json integration

2019-08-10 Thread Suraj Thapa FC
Can you pls elaborate or have any working code On Sat, 10 Aug, 2019, 9:40 PM Andrew C., wrote: > Two options: > > 1) Save the JSON files and link it with a FileField > > 2) Use PostgreSQL’s Django-specific JSONField. > > On Sat, Aug 10, 2019 at 9:46 AM Suraj Thapa FC > wrote: > >> How can I li

Re:

2019-08-10 Thread Andrew C.
I suppose in a view, you can write something along these lines: import json from os import path from django.conf import settings def index(request): if request.method == ‘POST’: form = YourForm(request.POST) if form.is_valid(): field1 = form.cleaned_data.get(‘fi

Re: django.db.utils.OperationalError: (2002, 'Can\'t connect to local MySQL server through socket \'/cloudsql/instance:us-central1:project_name\' (2 "No such file or directory")')

2019-08-10 Thread Budi Hermansyah
please search for how to access your sql on gcp with ssh and with IP addr... then repace the following setting using that IP... from: 'HOST': '/cloudsql/instance:us-central1:project', to 'HOST': 'xx.xx.xx.xx', On Sat, Aug 10, 2019 at 6:38 AM Solomon Mbak wrote: > Hi. > > For two days I have bee

Re: How to build users tagging system in my comment textarea.

2019-08-10 Thread Andrew C.
You would probably need AJAX calls. I think there’s a package called Django-autocompletelite which can help you with this. So, in your HTML, you can use use AJAX to see when a user types the @ character with a single letter and then show a box with some usernames with that. On Sat, Aug 10, 2019 at

Re: Django models and json integration

2019-08-10 Thread Andrew C.
Two options: 1) Save the JSON files and link it with a FileField 2) Use PostgreSQL’s Django-specific JSONField. On Sat, Aug 10, 2019 at 9:46 AM Suraj Thapa FC wrote: > How can I linked a JSON file with my db... Json files contains the key > value pair of the user data.. > If the id in the db a

Django models and json integration

2019-08-10 Thread Suraj Thapa FC
How can I linked a JSON file with my db... Json files contains the key value pair of the user data.. If the id in the db and the id in the json files matches i can fetch and read it.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

[no subject]

2019-08-10 Thread Suraj Thapa FC
How do I write my front-end form response in.. .json file -- 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 thi

How to build users tagging system in my comment textarea.

2019-08-10 Thread Ashutosh Kumar
Hi Guys, I need help in adding user tagging feature in comment textarea, like how to get the users list pops out on the keypress "@". -- 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