Re: Form not displaying

2020-03-29 Thread Ernest Thuku
Can you display your views please?
On Mar 30, 2020 05:13, "Jeff Waters"  wrote:

> Apologies if I'm posting this twice - my original message isn't displayed
> in the list of messages.
>
> I am creating a website using Django. I'd like to give users the chance to
> comment on pictures they have posted. I have created a comment model and a
> comment form, and put the following code into the HTML document for the
> photo gallery:
>
> Leave a comment
> 
> {{ comment_form.as_p }}
> {% csrf_token %}
> Submit
>  However, the form is not displaying - there is nothing between 'Leave a
> comment' and the submit button on the page. I don't understand this as my
> form in forms.py appears to be configured correctly:
>
> class CommentForm(forms.ModelForm):
> body = forms.CharField(help_text="What is your comment?",
> widget=forms.TextInput(attrs={'size': '1000'}),
>required=True)
>
> class Meta:
> model = Comment
> fields = ('body',)
> def as_p(self):
> # Returns this form rendered as HTML s.
> return self._html_output(
> normal_row='%(field)s',
> error_row='%s',
> row_ender='',
> help_text_html=' %s',
> errors_on_separate_row=True)`
> So does my model in models.py:
>
> class Comment(models.Model):
> COMMENT_MAX_LENGTH = 1000
> image = models.ForeignKey(Picture, on_delete=models.CASCADE,
> related_name="comments")
> user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
> body = models.TextField(max_length=COMMENT_MAX_LENGTH)
> created_on = models.DateTimeField(auto_now_add=True)
> active = models.BooleanField(default=False)
>
> class Meta:
> ordering = ['created_on']
>
> def __str__(self):
> return 'Comment {} by {}'.format(self.body, self.user)
>
> When I go into the source code on the site, it shows that the form is
> hidden. Also, when I change comment_form.as_p to something random, no error
> messages are generated. It's like something is causing Django to skip past
> that bit of code.
>
> I'd really appreciate any suggestions anyone could please offer.
>
> Thanks
>
> Jeff
>
> --
> 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 discussion on the web visit https://groups.google.com/d/
> msgid/django-users/ac7ac525-9bc4-4043-a142-b97b1d3d0e5c%40googlegroups.com
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPsfuofTW8RywcqoK6T4SZz%2BqtkAWHHg7UAoshXOupOh6nj_WQ%40mail.gmail.com.


Re: Forienkey to same table

2020-03-29 Thread Stephen J. Butler
Instead of using the model class, or string name of the model class, use
the string value 'self'.

https://docs.djangoproject.com/en/3.0/ref/models/fields/#foreignkey

On Sun, Mar 29, 2020 at 9:44 PM Mohsen Pahlevanzadeh <
m.pahlevanza...@gmail.com> wrote:

> I have table A with my following fields:
> 1. id (PK)
> 2. fname (text)
> 3. name (text)
> 4. A_id (integer)
>
> I have problem with 4th field, Because it has to refrenced to id
> field. I can't implement it into Django.
>
> How can I write model class for above table in models.py ?
>
> --mohsen
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJFFGZKZLQDNMA%2BzSUFKvUX8c0eMe%2B7do73cV1RyZTO1q-A3gg%40mail.gmail.com
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxVFOKpakv8OBP6FQXnCyfnskhsxgkXfbf22DL%3DB8E-c%3Dg%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Phako Perez
Hi,

I’m also interested to join your team, have 3+ years working with python 
Currently I’m teaching python to a group in order them to improve theirs career 

Thanks in advance 

Sent from my iPhone

> On 29 Mar 2020, at 20:48, chinna  wrote:
> 
> 
> Hi,
> 
> I am Premkumar having 3 years of experience in web and rest api development 
> using python and Django. I would like to join your team
> 
>> On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak  wrote:
>> I am looking for a django developer who has expertise in building enterprise 
>> grade solutions. 
>> 
>> 
>> -- 
>> 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 discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com.
> 
> -- 
> 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 discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread chinna
Hi,

I am Premkumar having 3 years of experience in web and rest api development
using python and Django. I would like to join your team

On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com.


Forienkey to same table

2020-03-29 Thread Mohsen Pahlevanzadeh
I have table A with my following fields:
1. id (PK)
2. fname (text)
3. name (text)
4. A_id (integer)

I have problem with 4th field, Because it has to refrenced to id
field. I can't implement it into Django.

How can I write model class for above table in models.py ?

--mohsen

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJFFGZKZLQDNMA%2BzSUFKvUX8c0eMe%2B7do73cV1RyZTO1q-A3gg%40mail.gmail.com.


Form not displaying

2020-03-29 Thread Jeff Waters
Apologies if I'm posting this twice - my original message isn't displayed in 
the list of messages.

I am creating a website using Django. I'd like to give users the chance to 
comment on pictures they have posted. I have created a comment model and a 
comment form, and put the following code into the HTML document for the photo 
gallery:

Leave a comment

{{ comment_form.as_p }}
{% csrf_token %}
Submit
s.
return self._html_output(
normal_row='%(field)s',
error_row='%s',
row_ender='',
help_text_html=' %s',
errors_on_separate_row=True)`
So does my model in models.py:

class Comment(models.Model):
COMMENT_MAX_LENGTH = 1000
image = models.ForeignKey(Picture, on_delete=models.CASCADE, 
related_name="comments")
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
body = models.TextField(max_length=COMMENT_MAX_LENGTH)
created_on = models.DateTimeField(auto_now_add=True)
active = models.BooleanField(default=False)

class Meta:
ordering = ['created_on']

def __str__(self):
return 'Comment {} by {}'.format(self.body, self.user)

When I go into the source code on the site, it shows that the form is hidden. 
Also, when I change comment_form.as_p to something random, no error messages 
are generated. It's like something is causing Django to skip past that bit of 
code.

I'd really appreciate any suggestions anyone could please offer.

Thanks

Jeff

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ac7ac525-9bc4-4043-a142-b97b1d3d0e5c%40googlegroups.com.


Form not being published

2020-03-29 Thread Jeff Waters
I am creating a website using Django. I'd like to give users the chance to 
comment on pictures they have posted. I have created a comment model and a 
comment form, and put the following code into the HTML document for the photo 
gallery:

Leave a comment

{{ comment_form.as_p }}
{% csrf_token %}
Submit


However, the form is not displaying - there is nothing between 'Leave a 
comment' and the submit button on the page. I don't understand this as my form 
in forms.py appears to be configured correctly:

class CommentForm(forms.ModelForm):
body = forms.CharField(help_text="What is your comment?", 
widget=forms.TextInput(attrs={'size': '1000'}),
   required=True)

class Meta:
model = Comment
fields = ('body',)
def as_p(self):
# Returns this form rendered as HTML s.
return self._html_output(
normal_row='%(field)s',
error_row='%s',
row_ender='',
help_text_html=' %s',
errors_on_separate_row=True)`

So does my model in models.py:

class Comment(models.Model):
COMMENT_MAX_LENGTH = 1000
image = models.ForeignKey(Picture, on_delete=models.CASCADE, 
related_name="comments")
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
body = models.TextField(max_length=COMMENT_MAX_LENGTH)
created_on = models.DateTimeField(auto_now_add=True)
active = models.BooleanField(default=False)

class Meta:
ordering = ['created_on']

def __str__(self):
return 'Comment {} by {}'.format(self.body, self.user)

When I go into the source code on the site, it shows that the form is hidden. 
Also, when I change comment_form.as_p to something random, no error messages 
are generated. It's like something is causing Django to skip past that bit of 
code.

I'd really appreciate any suggestions anyone could please offer.

Thanks

Jeff

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4be7728e-ef60-45a9-8a35-1920ee5d5143%40googlegroups.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread ola neat
Halo i got experience with django & i don't mind joining your team

On Sun, Mar 29, 2020, 18:56 Lax Nayak  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHLKn70OX4M0vhB%3DRSMg_1Y5FqGkocBdZhf17-2N-MfX8H2GnA%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Osezele Orukpe
Hello Lax,
I'm a django developer with over 2 years experience ready to join your team
as soon as we reach an agreement.
Look forward to hearing from you.

LINKEDIN: https://www.linkedin.com/in/osezele-orukpe-1a37a9167/


On Sun, Mar 29, 2020 at 9:20 PM Emmanuel klutse  wrote:

> Hello,
> I’m also an intermediate Django and react developer
> With 2 years working experience.
> Looking forward to hear from you.
> Thx and best regards.
>
> On Sun, 29 Mar 2020 at 9:09 PM, Ernest Thuku  wrote:
>
>> Hey Lax,
>> I am Ernest. A Django and react.js developer. It will be pleasure working
>> with you.
>> GitHub : https://github.com/Ernest-Macharia
>> On Mar 29, 2020 21:26, "Motaz Hejaze"  wrote:
>>
>> Hi Lax ..
>> Ready yo join your team as soon as we reach an agreement ..
>>
>> Please checkout my LinkedIn account :
>> https://www.linkedin.com/in/al-motaz-hejazy/
>>
>>
>> On Sun, Mar 29, 2020 at 8:00 PM Shakil Ahmmed 
>> wrote:
>>
>>> Hello  Lax Nayak,
>>> I am a intermediate developer . I want to work with some team ,
>>> My Github : https://github.com/ShakilAhmmed
>>>
>>>
>>> On Sun, Mar 29, 2020 at 11:57 PM Lax Nayak  wrote:
>>>
 I am looking for a django developer who has expertise in building
 enterprise grade solutions.


 --
 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 discussion on the web visit
 https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
 
 .

>>>
>>>
>>> --
>>>
>>> 
>>> Shakil Ahmmed
>>> about.me/shakilahmmed
>>> 
>>>
>>> --
>>> 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 discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BEpJfzqeLfB_4ez_cPrU_qQNgy_Jz0Dym6aHUQa23nahsQb_A%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHV4E-dkzvOz22DgF%3Da2Q2%3DX1y-htP6Q_jtJZU_fHRBGP2fN1Q%40mail.gmail.com
>> 
>> .
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPsfuofkfW1dPmCPFJyOoOHxUt2DqN7WDYNsRZXAkErojCLuhQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAw18mDGrQ-o84Q-5y-BBAqeG%3D2cZD6YReAV8o-DpkR2D0Eb7w%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE-pVJa0N5DgRVUneSwXcn5XfA1BicF3JY7SO16xtMvV73zBbA%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Emmanuel klutse
Hello,
I’m also an intermediate Django and react developer
With 2 years working experience.
Looking forward to hear from you.
Thx and best regards.

On Sun, 29 Mar 2020 at 9:09 PM, Ernest Thuku  wrote:

> Hey Lax,
> I am Ernest. A Django and react.js developer. It will be pleasure working
> with you.
> GitHub : https://github.com/Ernest-Macharia
> On Mar 29, 2020 21:26, "Motaz Hejaze"  wrote:
>
> Hi Lax ..
> Ready yo join your team as soon as we reach an agreement ..
>
> Please checkout my LinkedIn account :
> https://www.linkedin.com/in/al-motaz-hejazy/
>
>
> On Sun, Mar 29, 2020 at 8:00 PM Shakil Ahmmed 
> wrote:
>
>> Hello  Lax Nayak,
>> I am a intermediate developer . I want to work with some team ,
>> My Github : https://github.com/ShakilAhmmed
>>
>>
>> On Sun, Mar 29, 2020 at 11:57 PM Lax Nayak  wrote:
>>
>>> I am looking for a django developer who has expertise in building
>>> enterprise grade solutions.
>>>
>>>
>>> --
>>> 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 discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>>
>> 
>> Shakil Ahmmed
>> about.me/shakilahmmed
>> 
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BEpJfzqeLfB_4ez_cPrU_qQNgy_Jz0Dym6aHUQa23nahsQb_A%40mail.gmail.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-dkzvOz22DgF%3Da2Q2%3DX1y-htP6Q_jtJZU_fHRBGP2fN1Q%40mail.gmail.com
> 
> .
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPsfuofkfW1dPmCPFJyOoOHxUt2DqN7WDYNsRZXAkErojCLuhQ%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAw18mDGrQ-o84Q-5y-BBAqeG%3D2cZD6YReAV8o-DpkR2D0Eb7w%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Ernest Thuku
Hey Lax,
I am Ernest. A Django and react.js developer. It will be pleasure working
with you.
GitHub : https://github.com/Ernest-Macharia
On Mar 29, 2020 21:26, "Motaz Hejaze"  wrote:

Hi Lax ..
Ready yo join your team as soon as we reach an agreement ..

Please checkout my LinkedIn account :
https://www.linkedin.com/in/al-motaz-hejazy/


On Sun, Mar 29, 2020 at 8:00 PM Shakil Ahmmed 
wrote:

> Hello  Lax Nayak,
> I am a intermediate developer . I want to work with some team ,
> My Github : https://github.com/ShakilAhmmed
>
>
> On Sun, Mar 29, 2020 at 11:57 PM Lax Nayak  wrote:
>
>> I am looking for a django developer who has expertise in building
>> enterprise grade solutions.
>>
>>
>> --
>> 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 discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%
>> 40googlegroups.com
>> 
>> .
>>
>
>
> --
>
> 
> Shakil Ahmmed
> about.me/shakilahmmed
> 
>
> --
> 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 discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2BEpJfzqeLfB_4ez_cPrU_qQNgy_
> Jz0Dym6aHUQa23nahsQb_A%40mail.gmail.com
> 
> .
>
-- 
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 discussion on the web visit https://groups.google.com/d/
msgid/django-users/CAHV4E-dkzvOz22DgF%3Da2Q2%3DX1y-htP6Q_jtJZU_fHRBGP2fN1Q%
40mail.gmail.com

.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPsfuofkfW1dPmCPFJyOoOHxUt2DqN7WDYNsRZXAkErojCLuhQ%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Motaz Hejaze
Hi Lax ..
Ready yo join your team as soon as we reach an agreement ..

Please checkout my LinkedIn account :
https://www.linkedin.com/in/al-motaz-hejazy/


On Sun, Mar 29, 2020 at 8:00 PM Shakil Ahmmed 
wrote:

> Hello  Lax Nayak,
> I am a intermediate developer . I want to work with some team ,
> My Github : https://github.com/ShakilAhmmed
>
>
> On Sun, Mar 29, 2020 at 11:57 PM Lax Nayak  wrote:
>
>> I am looking for a django developer who has expertise in building
>> enterprise grade solutions.
>>
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>> 
>> .
>>
>
>
> --
>
> 
> Shakil Ahmmed
> about.me/shakilahmmed
> 
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BEpJfzqeLfB_4ez_cPrU_qQNgy_Jz0Dym6aHUQa23nahsQb_A%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-dkzvOz22DgF%3Da2Q2%3DX1y-htP6Q_jtJZU_fHRBGP2fN1Q%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Shakil Ahmmed
Hello  Lax Nayak,
I am a intermediate developer . I want to work with some team ,
My Github : https://github.com/ShakilAhmmed


On Sun, Mar 29, 2020 at 11:57 PM Lax Nayak  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>


-- 

Shakil Ahmmed
about.me/shakilahmmed


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BEpJfzqeLfB_4ez_cPrU_qQNgy_Jz0Dym6aHUQa23nahsQb_A%40mail.gmail.com.


Looking for Django developers to work on a new and an existing project with our team

2020-03-29 Thread Lax Nayak
I am looking for a django developer who has expertise in building 
enterprise grade solutions. 


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com.


Re: Suggestions for django restframework project

2020-03-29 Thread Metehan Gülaç
you can create a Chuck Norris API for yourself. A different joke will come 
in response to every GET request you send to the URL I gave at the bottom ;)

https://api.chucknorris.io/jokes/random


29 Mart 2020 Pazar 19:11:00 UTC+3 tarihinde sanka nanaji yazdı:
>
> Hi everyone, 
>
> Could someone suggest me a good project on django restframework. I read 
> document and 2 YouTube channels on Django restframework.
>
> Regards,
> Nanaji.
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92caa57a-7d81-4d36-bd2d-718f4a841742%40googlegroups.com.


Re: Is there any possibility integrate django and tkinter?

2020-03-29 Thread Motaz Hejaze
What exactly you want to do , without expose the core idea


On Sun, Mar 29, 2020 at 7:29 PM Walter santos  wrote:

> Hi
>
> Is there any possibility integrate django and tkinter?
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/663a0d70-e508-421a-b12d-9197b55a1e29%40googlegroups.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-cdDJYbO4KrZScPG%2BYXx0xW9v-wcK5s%3D1XtHfvZW30NJw%40mail.gmail.com.


Is there any possibility integrate django and tkinter?

2020-03-29 Thread Walter santos
Hi

Is there any possibility integrate django and tkinter?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/663a0d70-e508-421a-b12d-9197b55a1e29%40googlegroups.com.


Rendering objects from two different queries in single For loop

2020-03-29 Thread Bojan Drango


Hello. 

I am trying to fetch objects from two different queries by using 
select_related() in order to get all of the related objects.

In template, I am using For loop in order to render all objects of first 
model separately, as separate containers of the data.

Inside each of these rendered objects of the first model, I need to show 
the corresponding data from both queries for the related second model.

The issue is that, when I am using For loop in template, I can only get the 
objects for the first related query, but not for the second query which is 
also related to the first model (basically, what second query is doing is 
geting all of the objects based on date less then today.)

Please check out the hastebin link below for the code - models, view and 
template with detailed description of the issue and the intended result and 
let me know if you have any hint that I may apply.

https://hastebin.com/yayoketume.makefile

Thank you very much.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4336ef2a-9ed6-4e91-a294-5ed1f633a2fe%40googlegroups.com.


channels_redis & async_to_sync performance problem

2020-03-29 Thread Chris
Hello,

I have a worker process that uses async_to_sync(group_send) to send 
messages to my Channels consumers. The worker process is a simple 
long-running synchronous loop (not based on Django Channels) that is 
started via a Django management command.

When I use runserver and the in-memory channel layer, performance is great. 
But when I use channels_redis in production, each call to group_send takes 
2 seconds, because each time it needs to create a new redis connection. 
Here is the call stack:

  File "c:\my_project\core\my_project\channels\utils.py", line 14, in 
sync_group_send_wrapper
return _sync_group_send(group, {'type': type, **event})
  File "c:\my_project\ve-dj2\lib\site-packages\asgiref\sync.py", line 79, in 
__call__
return call_result.result()
  File 
"C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py"
, line 428, in result
return self.__get_result()
  File 
"C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py"
, line 384, in __get_result
raise self._exception
  File "c:\my_project\ve-dj2\lib\site-packages\asgiref\sync.py", line 98, in 
main_wrap
result = await self.awaitable(*args, **kwargs)
  File "c:\my_project\ve-dj2\lib\site-packages\channels_redis\core.py", 
line 625, in group_send
async with self.connection(self.consistent_hash(group)) as connection:
  File "c:\my_project\ve-dj2\lib\site-packages\channels_redis\core.py", 
line 839, in __aenter__
self.conn = await self.pool.pop()
  File "c:\my_project\ve-dj2\lib\site-packages\channels_redis\core.py", 
line , in pop
conns.append(await aioredis.create_redis(**self.host, loop=loop))

This is happening because the connection is deleted after each call to 
async_to_sync:

  File "c:\my_project\core\my_project\channels\utils.py", line 14, in 
sync_group_send_wrapper
return _sync_group_send(group, {'type': type, **event})
  File "c:\my_project\ve-dj2\lib\site-packages\asgiref\sync.py", line 71, in 
__call__
loop.close()
  File "c:\my_project\ve-dj2\lib\site-packages\channels_redis\core.py", 
line 32, in _wrapper
self.run_until_complete(pool.close_loop(self))
  File 
"C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py"
, line 579, in run_until_complete
return future.result()
  File "c:\my_project\ve-dj2\lib\site-packages\channels_redis\core.py", 
line , in close_loop
del self.conn_map[loop]

When async_to_sync is called from a synchronous Django view, the connection 
is NOT deleted. That's because in my worker process, 
self.main_event_loop.is_running() is False, but in my Django views, it's 
True. That affects this if-statement in async_to_sync.__call__:

if not (self.main_event_loop and self.main_event_loop.is_running()):
# Redis connection gets deleted inside here...

So, how could I solve this? This may be an obvious question but I don't 
know asyncio well; I just want to get some guidance before I spend too much 
time looking in the wrong direction.

Thank 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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afa1c36a-bdb5-40b7-a602-ee20d7949ac2%40googlegroups.com.


Suggestions for django restframework project

2020-03-29 Thread sanka nanaji
Hi everyone,

Could someone suggest me a good project on django restframework. I read
document and 2 YouTube channels on Django restframework.

Regards,
Nanaji.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHKe4p4CYUSrNvtwKYdEfvOSfecmU29YsU8DoZ9Z_G-mGx%2B8Nw%40mail.gmail.com.


Re: travis sync issue to git with django project

2020-03-29 Thread Kasper Laudrup

Hi John,

On 28/03/2020 23.24, John McClain wrote:

My build keeps failing at this juncture

0.00s$ SECRET_KEY="whatever" ./manage.py test
273/home/travis/.travis/functions: line 109: ./manage.py: Permission denied
274The command "SECRET_KEY="whatever" ./manage.py test" exited with 126.

any ideas?



Does manage.py have the execute bit set?

Alternatively, try to run manage.py through the interpreter.

No idea how to integrate that with travis though, but I'm sure there's 
some documentation available.


Kind regards,

Kasper Laudrup

--
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/acefc4ca-1857-7049-5d56-39c3eaeaf466%40stacktrace.dk.


Re: travis sync issue to git with django project

2020-03-29 Thread Jorge Gimeno
On Sat, Mar 28, 2020 at 3:25 PM John McClain  wrote:

> My build keeps failing at this juncture
>
> 0.00s$ SECRET_KEY="whatever" ./manage.py test
> 273/home/travis/.travis/functions: line 109: ./manage.py: Permission denied
> 274The command "SECRET_KEY="whatever" ./manage.py test" exited with 126.
> 275
> 276
> 277
>
>
>
>
>
> any ideas?
>
>
> --
>
>
> John McClain
>
> Cell: 085-1977-823
> Skype: jmcclain0129
> Email: jmcclain0...@gmail.com
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN-hv_ozmpT5qVuDJpkZcmcSyR4UCm8khgt5xr3eEkEDzsPKww%40mail.gmail.com
> 
> .
>

Are you setting the secret key as an enviroment variable?  If so, then I'd
try:

export SECRET_KEY="whatever"
./manage.py test

-Jorge

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK8bzgq4N4pzkMm%3DQz4ga1vqT%3DHU9CRXh4goZV4ubxL2Ng%40mail.gmail.com.


Re: error en ejercicio de principiante, no se que hacer

2020-03-29 Thread Jorge Gimeno
On Sat, Mar 28, 2020, 2:22 PM cosmos multi  wrote:

> Um pues la verdad te estas complicando demasiado solo configura los
> archivos template en settings.py es lo que te recomiendo.
>
> El sáb., 28 mar. 2020, 4:18 p. m., Federico Gomez <
> federicogome...@gmail.com> escribió:
>
>> saludos, tengo un error haciendo una practica en Django con el video
>> Curso Django. Plantillas I. Vídeo 5,
>> https://www.youtube.com/watch?v=iQN0z6MDrEY
>> .
>> Te envio el pantallazo por si puedes identificar el problema. La
>> libreria template no la habia descargado el Django 3.8 y lo que hice fue
>> que la copie de la web de Django y la coloque en la carpeta, no se si
>> eso tenga que ver con el error
>>
>>
>>
>> esta es el archivo Wievs
>>
>> from django.shortcuts import render
>> from django.http import HttpResponse
>> from django.template import Template, context
>>
>> # Create your views here.
>> def hello(request):
>> return HttpResponse("Hola Mi Hermano Para Que Sepas Estoy Mostrando Un 
>> Aviso Por La Web ")
>> def saludo(request):
>> doc_exto=open("D:/django/mytestsite/generar/plantilla.html")
>> plt=Template(doc_exto.read())
>> doc_exto.close()
>> ctx=context()
>> docto=plt.render(ctx)
>> return HttpResponse(docto)
>>
>>
>> este es el urls
>>
>>
>> from django.contrib import admin
>> from django.urls import path
>> from generar.views import hello, saludo
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path("",hello),
>> path("saludo/",saludo),
>>
>>
>>
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/3e903965-bdbb-41fc-b9c4-5d4ce335fdad%40googlegroups.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Bt%2BYr0EXwWkoArUk2_HDa-zTwbDUNY3buvxom5YBTAcjV-C4Q%40mail.gmail.com
> 
> .
>

Concuerdo con lo que indica Cosmos.  Con eso dicho, el problema, aun que
aparece en la linea 12, es en importar la clase de contexto.  En Django se
llama Context, que es una definicion de clase, y no context, que es un
modulo.  La linea 3 deberia ser:

from django.template import Template, Context

La linea 12 enconces seria ctx = Context()

Suerte!

-Jorge

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK_GQU54EY76i%3DDHbvREmySvrTQ3a9xktdN6jXq6k4NzTQ%40mail.gmail.com.


Re: Retaining text in search input boxes

2020-03-29 Thread Dick Arnold
Your solution was to set the 'value' attribute to the value that was 
entered in the input box.  That worked for the text input with the 
exception of the ones that got their value from a drop down list.  Please 
see my html code elsewhere in this post.  If you have any ideas, I would 
really appreciate it.  Thanks for your previous ideas.

On Saturday, February 15, 2020 at 1:16:18 PM UTC-6, OnlineJudge95 wrote:
>
> On Sun, Feb 16, 2020 at 12:22 AM Dick Arnold  > wrote:
>
>> I have a personnel database which has to be edited to keep it current.
>> I have created search parameters to find the person to edit.
>> The exact name of the person is not always known, therefore the name 
>> field for searching can contain only a few of the characters.  This can 
>> create a list of several people.
>> After the search parameters are entered a "Search" button is clicked and 
>> the output, if any, is displayed in a table.
>> If the search parameters need to be improved, I want the original 
>> (current) search argument to be retained in the argument field so I do not 
>> need to re-type ALL the search parameters, just the ones I want to change.
>>
>> I have not been able to find a way to retain the value in the search 
>> input box,
>>
>> Does anyone know how to accomplish this?
>>
>> Here's the input for one of the input boxes.
>>
>> 
>>
>
> Set an attribute of value in your input tags, and use the form object in 
> your view to populate it. For reference 
> https://stackoverflow.com/questions/4880306/django-multiple-forms-and-keep-field-data-input-after-submission?rq=1
>  
>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/92cfccd1-5916-4817-ae46-c612aa462610%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e49c313a-185c-4764-90c7-bbf748fef11a%40googlegroups.com.


Re: Django Login Problem

2020-03-29 Thread ramadhan ngallen
Why your templates shows some of the codes like {% csrf_token %}, for loops  
and so on? Check your templates first are not okay.
After signup log in to the admin panel as an admin and check if the user has 
been created on the database. You can also log in to your database to inspect 
this.

Does your app name called "app"? If so kindly on project ulrs change to
url(r'^',include(app.urls)), instead of
url(r'^',include(appurls))

And on app.urls add this
app_name ="app"
This is how name spacing on django work
On 29 Mar 2020, 16:55 +0300, Antje Kazimiers , wrote:
> Hi,
>
> It sounds like you don't get an error message, so maybe your authenticate 
> method in
>
> def sign_in(request)
>
> just returns a None user and you get redirected. I would find this method in 
> your django installation, for me it's in the env folder but that depends on 
> your setup:
>
> ./env/lib/python3.7/site-packages/django/contrib/auth/__init__.py
>
> and debug into it or add some print statements to see why this is failing.
>
> Antje
>
> > On 29. Mar 2020, at 10:33, pratiksha jain  
> > wrote:
> >
> > I have problem in loging in after signing up. I have tried all the methods 
> > that I can try, I want to know my errors.
> > Thank 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 discussion on the web visit 
> > https://groups.google.com/d/msgid/django-users/f542af27-682f-4528-b1e8-70acfc6c8e1e%40googlegroups.com.
> > 
>
> --
> 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 discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/820B2E17-AB07-4F17-9117-88D1AD3B7ED4%40gmail.com.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/77ead107-a8dd-4462-b043-a52db4b4912c%40Spark.


Re: Django Login Problem

2020-03-29 Thread Antje Kazimiers
Hi,

It sounds like you don't get an error message, so maybe your authenticate 
method in

def sign_in(request)

just returns a None user and you get redirected. I would find this method in 
your django installation, for me it's in the env folder but that depends on 
your setup:

./env/lib/python3.7/site-packages/django/contrib/auth/__init__.py

and debug into it or add some print statements to see why this is failing.

Antje

> On 29. Mar 2020, at 10:33, pratiksha jain  wrote:
> 
> I have problem in loging in after signing up. I have tried all the methods 
> that I can try, I want to know my errors.
> Thank 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 discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/f542af27-682f-4528-b1e8-70acfc6c8e1e%40googlegroups.com
>  
> .
> 

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/820B2E17-AB07-4F17-9117-88D1AD3B7ED4%40gmail.com.


Django Login Problem

2020-03-29 Thread pratiksha jain
I have problem in loging in after signing up. I have tried all the methods 
that I can try, I want to know my errors.
Thank 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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f542af27-682f-4528-b1e8-70acfc6c8e1e%40googlegroups.com.







Message board


Sign Up
{% if user_login == False %}
Log In
{% else %}
Log Out
Logged in as {{user.username}}
{% endif %}








Sign Up!



{% csrf_token %}
 Enter a username: 


Enter a Password: 














Message board


Sign Up
{% if user_login == False %}
Log In
{% else %}
Log Out
Logged in as {{user.username}}
{% endif %}










Signup Complete!
Return to message board 












Message board


Sign Up
{% if user_login == False %}
Log In
{% else %}
Log Out
Logged in as {{user.username}}
{% endif %}









{{topic.title}}

{% for post in posts %}

{{post.content}}

Post By:
{{post.author.username}}

{% if post in user.post_set.all %}

{% csrf_token %}



{% endif %}


{% endfor %}

{% if user_login == True %}
Add New Post
{% endif %}






Add a Post


{% csrf_token %}
Post:






















Message Board


Sign Up
   {% if user_login == False %}
Log In
{% else %}-->

Log Out
Logged in as {{user.username}}
{% endif %}


  




Board Topics

{% for topic in topics %}

{{topic.title}}
View Posts

{% endfor %}
{% if user_login == True %}
Create New Topic
{% endif %}
 

  

  Login a User


{% csrf_token %}

Username:



  


  

  






New Topic


{% csrf_token %}
 Topic Name:








  
from django.conf.urls import url
from . import views


urlpatterns = [
	
	
   	url(r'^signin/$', views.sign_in, name = "signin"),
   	url(r'^$', views.index, name = "main"),
url(r'^logout/$', views.logout_view, name = "logout"),
url(r'^new_topic/$', views.new_topic, name = "new-topic"),
url(r'topic/(?P\d+)/$', views.topic_detail, name = "topic-detail"),
url(r'^add_post/$', views.add_post, name ="add-post"),
url(r'^delete_post/$', views.delete_post, na