Bulk SMS website using django

2020-02-20 Thread Isaac Imafidon
I have a project to develop a bulk sms website using django, but i have not 
develop this kind of website before. Also the client want to be able to 
have users that log in and buy credit that they will use to send sms to any 
part of the world. Also i don't know any recommended company to buy the 
reseller at an affordable price that will make my client be able to make 
profit from he's business. I really need you guys support on this, also if 
anyone have develop this kind of website before and just brief me on how to 
go about it.

-- 
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/1707833a-44c2-43f9-8f66-c7fca1a2540d%40googlegroups.com.


Users location tracking

2020-02-20 Thread shedd tutt
Anyone with an idea on how to use the django-user-tracking library

-- 
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/ab94afe7-7657-421f-8f24-87bcb95a86d8%40googlegroups.com.


Re: Python Django Training

2020-02-20 Thread Umar Kambala
Plz add me to the WhatsApp group if there's any +233(0)203502038 thanks
On Feb 1, 2020 1:42 PM, "Srikanth K"  wrote:

> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager take
> up any Python , Django Training (online Preferrable or Weekends). Members
> who require can contact me or share me  there idea.
>
> Regards,
> Srikanth.K
>
> --
> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__
> Fq1xt4trjXUaN3ehQ%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/CAPkbFbYxXSXtQy2qJHmhSTSnLdmyuM0aMJJdF5c25PtamGXmTA%40mail.gmail.com.


Re: Python Django Training

2020-02-20 Thread mahmoud afzally

>
> hi 
>
> i am interested   
please add me 

tankyou

-- 
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/9097f6b4-eb88-4263-b737-bfdd01e003a4%40googlegroups.com.


Re: Python Django Training

2020-02-20 Thread patlet
I am also intereseted

-- 
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/c125b69e-c95e-4b1c-b39e-d13fb0f0b1cb%40googlegroups.com.


Re: Python Django Training

2020-02-20 Thread mahmoud afzally
hi 
please add me


On Sunday, February 16, 2020 at 10:38:09 PM UTC+3:30, Akorede Habeebullah 
wrote:
>
> I'm interested too. You can add me up on WhatsApp +2348179564316
>
> On Sat, Feb 8, 2020 at 5:48 AM Hector Gonzalez  > wrote:
>
>> Iam interest!!! Take my email
>> El 2 feb. 2020 12:33 PM, "V S V Narsimha Murthy" > > escribió:
>>
>>> Hi Everyone,
>>>
>>> I am interested to attend the python and Django training. Please add my 
>>> email as well for the training classes. 
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> Narasimha Murthy
>>>
>>> On Sun, Feb 2, 2020 at 9:25 PM Maqdum Adewale >> > wrote:
>>>
 I'm interested

 On Sun, Feb 2, 2020, 3:44 PM yerri swamy >>> > wrote:

> I am also intrested..
>
> On Sat, Feb 1, 2020, 7:12 PM Srikanth K  > wrote:
>
>> Hi,
>>
>> I am from Hyderabad. I am Python Developer by Profession. I am eager 
>> take up any Python , Django Training (online Preferrable or Weekends). 
>> Members who require can contact me or share me  there idea.
>>
>> Regards,
>> Srikanth.K
>>
>> -- 
>> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAKMSwL9eDJMGh6Jc20fureSvx%3DeZrDPtbWFhcjTKEzU4rQbHXA%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...@googlegroups.com .
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/CA%2B48qrFGwBVGhdpPyCSqN_6GdjiDAj%3DSp-4CF74YWN7eZgOfwA%40mail.gmail.com
  
 
 .

>>>
>>>
>>> -- 
>>> Thanks
>>> Narasimha Murthy 
>>>
>>> -- 
>>> 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/CAE%3D5Kz4OwOG3kVy48NWtWDXQYrtgCy5jB%2BY9jfUu2%3DJ_6g8tzA%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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CA%2BT_vrB9b99-RfA%2BP0O3DQ_FNdZw0Z2Sv3xuW8YNPnxA6cr2Cw%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/931ebdb0-4d57-4a6e-b50c-18afcdc30020%40googlegroups.com.


Re: understanding urls, forms, and HTTP ERROR 405

2020-02-20 Thread Phil Kauffman
So something like this?
def site(request, site_id):
site = get_object_or_404(Site.name, pk=site_id)

def sitesubmit(request):
#site=get_object_or_404(Site, pk=site_id)
form = SelectSite()
if request.method == 'POST':
form = SelectSite(request.POST)
if form.is_valid():
instance = form.save(commit=False)
instance.name = site.site_id
instance.save()
else:
form = SelectSite()
return render(request, 'app/home.html', {'form': form})

I'm just learning this stuff. If you can think of any posts or examples 
please let me know.

On Thursday, February 20, 2020 at 1:16:07 PM UTC-5, OnlineJudge95 wrote:

>
>
> On Thu, Feb 20, 2020 at 11:38 PM Phil Kauffman  > wrote:
>
>> Hello,
>>
>> Newbie in need of a little shove. It seems I need to review the purpose 
>> of the urls.py file. At present I am getting an HTTP Error 405 with the 
>> following:
>>
> HTTP 405 error code states the the HTTP method is not allowed on the 
> endpoint (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405) 
>
>>
>> urls.py:
>> path('', views.show_site, name = 'home'),
>> path('site-view', views.List.as_view(), name='site-view')
>>
>> views.py
>> class List(ListView):
>> def get_queryset(self, *args, **kwargs):
>> return Profile.objects.filter(sitename_id=self.kwargs['pk'])
>>
> You need to define the post() method yourself, 
>
>>
>> def show_site(request):
>> form = SelectSite()
>> if request.method == 'POST':
>> form = SelectSite(request.POST)
>> if form.is_valid():
>> pass
>> else:
>> form = SelectSite()
>> return render(request, 'app/home.html', {'form': form})
>>
>> home.html
>> {% extends 'app\base.html' %}
>>
>> {% block title %}Site Home{% endblock %}
>> {% block content %}
>> This Form is Terrible
>> {% csrf_token %}
>>  {{form}} 
>> 
>> 
>> {% endblock %}
>>
>> Any guidance would be greatly appreciated.
>>
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/10be0e68-da3f-42cd-a095-96d6d2a5617f%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/ba1394b9-1fde-442e-9d4d-e67e32b2f694%40googlegroups.com.


Object of type date is not JSON serializable

2020-02-20 Thread mick
TypeError at /addForm4

Object of type date is not JSON serializable

Request Method: POST
Request URL: http://127.0.0.1:8000/addForm4
Django Version: 3.0.1
Exception Type: TypeError
Exception Value: 

Object of type date is not JSON serializable

Exception Location: 
C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\Lib\json\encoder.py
 
in default, line 179
Python Executable: C:\Users\Administrator\Scripts\python.exe

-- 
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/c6bda6c6-f2ba-407a-9b10-8a6fa1d203a8%40googlegroups.com.


Re: Python Django Training

2020-02-20 Thread MTS BOUR
Add me.
Let start from the bottom

Le jeu. 20 févr. 2020 18:56, Mahaboob Khan  a
écrit :

> Add me to the group..
>
> On Thu, 6 Feb, 2020, 10:56 PM Aakash Verma, <4k45hr0ck5...@gmail.com>
> wrote:
>
>> I am interested in attending the training for python /django .
>>
>> On Sat, Feb 1, 2020, 7:12 PM Srikanth K >
>>> Hi,
>>>
>>> I am from Hyderabad. I am Python Developer by Profession. I am eager
>>> take up any Python , Django Training (online Preferrable or Weekends).
>>> Members who require can contact me or share me  there idea.
>>>
>>> Regards,
>>> Srikanth.K
>>>
>>> --
>>> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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/CAKMzTK9xHBXByRTUBFNrHuKPrUq%2BEuzaBhTXf8kW38F59NB5kA%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/CAGqU0qq4GRv6_w8fFXcpP7F%2BgusEVm7WDioroUqLo33%3DeqMWyQ%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/CAAq3G-GguPwt1gaqu5vMKn2-dSZEUMJHGjQKQWwyc3xk3ELweg%40mail.gmail.com.


Re: Django rest framework error

2020-02-20 Thread MTS BOUR
Try
 from django.http import JsonResponse
And use jsonresponse instead


Le jeu. 20 févr. 2020 17:59, Soumen Khatua  a
écrit :

> If I'm using serializer then it's working fine but I want to return only
> database object. So for that Do I need to add serializer.
>
> Thank you for your response.
>
> On Thu 20 Feb, 2020, 11:17 PM MTS BOUR,  wrote:
>
>> Can you show us your serializer.py file?
>>
>>
>> Le jeu. 20 févr. 2020 17:40, Soumen Khatua  a
>> écrit :
>>
>>> Hi Folks,
>>>
>>> I'm getting this error, I don't know how to solve it:
>>>
>>>
>>>
>>>
>>> *File
>>> "C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
>>> line 179, in defaultraise TypeError(f'Object of type
>>> {o.__class__.__name__} 'TypeError: Object of type User is not JSON
>>> serializable*
>>>
>>>
>>> *This is my code:*
>>>
>>> *Views.py:*
>>> *--*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *class LocationApiView(APIView):permission_classes =
>>> (IsAuthenticated,)def get(self,request,format=None):user =
>>> request.useruser_location = Profile.objects.get(user = user)
>>> return Response({'user':user}, status = status.HTTP_200_OK)*
>>>
>>>
>>> *urls.py*
>>> **
>>>
>>>
>>>
>>>
>>> *urlpatterns = [
>>> path('api/location/',views.LocationApiView.as_view(),name =
>>> 'api_location')]*
>>>
>>>
>>> *btw when I'm sending a normal message it's working fine. But in this
>>> case I'm getting this error.*
>>>
>>> *Thank You*
>>>
>>> *Regards,*
>>>
>>> *Soumen*
>>>
>>> --
>>> 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/CAPUw6WZh%2BgVfi7URo8vPbpjYfT%3D5AdjGyhntBMLgiZ1msiZECg%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/CAAq3G-Ea6aEgo9ECrkbe2Y0bXWGG-GVb-utLf%2B7bn9RCGZ0fGw%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/CAPUw6WbZ%2BOYqcEpadaxCz_9z45dDpbLRduLuUsgGAg2DyPnhFQ%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/CAAq3G-FOCi7bGJ8ebBG3WnJcqOtiJCFSxmds4jm4hyxxaG9Svg%40mail.gmail.com.


Re: Python Django Training

2020-02-20 Thread Mahaboob Khan
Add me to the group..

On Thu, 6 Feb, 2020, 10:56 PM Aakash Verma, <4k45hr0ck5...@gmail.com> wrote:

> I am interested in attending the training for python /django .
>
> On Sat, Feb 1, 2020, 7:12 PM Srikanth K 
>> Hi,
>>
>> I am from Hyderabad. I am Python Developer by Profession. I am eager take
>> up any Python , Django Training (online Preferrable or Weekends). Members
>> who require can contact me or share me  there idea.
>>
>> Regards,
>> Srikanth.K
>>
>> --
>> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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/CAKMzTK9xHBXByRTUBFNrHuKPrUq%2BEuzaBhTXf8kW38F59NB5kA%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/CAGqU0qq4GRv6_w8fFXcpP7F%2BgusEVm7WDioroUqLo33%3DeqMWyQ%40mail.gmail.com.


New to Django. Trying to wrap my head around markdown to html conversion using regex

2020-02-20 Thread Joey Jo Jo Jr
Hello all,

I'm working on a class assignment, so I'm not seeking a specific 
answer/code, but I'm just trying to figure out a general process.

The task is this...

I have some markdown files located in a directory, however when running the 
website they need to be displayed as html.  Because this is a learning 
assignment, no markdown conversion libraries are allowed.

So I'm tasked with using regular expressions to convert.  I understand 
regular expressions and have already formulated a few to change things like 
**text** to text and so on, but being so new to Django and 
still figuring out how it works, I'm just completely flummoxed on the 
execution/implementation.

So any general advice would be appreciated.

-- 
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/4d3fe147-d502-40c2-a866-d72bb30f8352%40googlegroups.com.


Re: understanding urls, forms, and HTTP ERROR 405

2020-02-20 Thread onlinejudge95
On Thu, Feb 20, 2020 at 11:38 PM Phil Kauffman 
wrote:

> Hello,
>
> Newbie in need of a little shove. It seems I need to review the purpose of
> the urls.py file. At present I am getting an HTTP Error 405 with the
> following:
>
HTTP 405 error code states the the HTTP method is not allowed on the
endpoint (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405)

>
> urls.py:
> path('', views.show_site, name = 'home'),
> path('site-view', views.List.as_view(), name='site-view')
>
> views.py
> class List(ListView):
> def get_queryset(self, *args, **kwargs):
> return Profile.objects.filter(sitename_id=self.kwargs['pk'])
>
You need to define the post() method yourself,

>
> def show_site(request):
> form = SelectSite()
> if request.method == 'POST':
> form = SelectSite(request.POST)
> if form.is_valid():
> pass
> else:
> form = SelectSite()
> return render(request, 'app/home.html', {'form': form})
>
> home.html
> {% extends 'app\base.html' %}
>
> {% block title %}Site Home{% endblock %}
> {% block content %}
> This Form is Terrible
> {% csrf_token %}
>  {{form}} 
> 
> 
> {% endblock %}
>
> Any guidance would be greatly appreciated.
>
> 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/10be0e68-da3f-42cd-a095-96d6d2a5617f%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/CAD%3DM5eRtsXUhGdjNvmMCjtBeG6OyQmJcwG3tjDyzfQ_GmX_pvQ%40mail.gmail.com.


Re: Django rest framework error

2020-02-20 Thread onlinejudge95
On Thu, Feb 20, 2020 at 11:30 PM Soumen Khatua 
wrote:

> If I'm using serializer then it's working fine but I want to return only
> database object. So for that Do I need to add serializer.
>
You do have to serialize your responses, you just can't send Python objects
as an HTTP response, think about the content-type of your requests

> Thank you for your response.
>
> On Thu 20 Feb, 2020, 11:17 PM MTS BOUR,  wrote:
>
>> Can you show us your serializer.py file?
>>
>>
>> Le jeu. 20 févr. 2020 17:40, Soumen Khatua  a
>> écrit :
>>
>>> Hi Folks,
>>>
>>> I'm getting this error, I don't know how to solve it:
>>>
>>>
>>>
>>>
>>> *File
>>> "C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
>>> line 179, in defaultraise TypeError(f'Object of type
>>> {o.__class__.__name__} 'TypeError: Object of type User is not JSON
>>> serializable*
>>>
>>>
>>> *This is my code:*
>>>
>>> *Views.py:*
>>> *--*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *class LocationApiView(APIView):permission_classes =
>>> (IsAuthenticated,)def get(self,request,format=None):user =
>>> request.useruser_location = Profile.objects.get(user = user)
>>> return Response({'user':user}, status = status.HTTP_200_OK)*
>>>
>>>
>>> *urls.py*
>>> **
>>>
>>>
>>>
>>>
>>> *urlpatterns = [
>>> path('api/location/',views.LocationApiView.as_view(),name =
>>> 'api_location')]*
>>>
>>>
>>> *btw when I'm sending a normal message it's working fine. But in this
>>> case I'm getting this error.*
>>>
>>> *Thank You*
>>>
>>> *Regards,*
>>>
>>> *Soumen*
>>>
>>> --
>>> 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/CAPUw6WZh%2BgVfi7URo8vPbpjYfT%3D5AdjGyhntBMLgiZ1msiZECg%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/CAAq3G-Ea6aEgo9ECrkbe2Y0bXWGG-GVb-utLf%2B7bn9RCGZ0fGw%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/CAPUw6WbZ%2BOYqcEpadaxCz_9z45dDpbLRduLuUsgGAg2DyPnhFQ%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/CAD%3DM5eRXuVv2G-Ld17wydJzPybPo_ccQyoa%2BkQhB4k3nV%3Dz0KQ%40mail.gmail.com.


understanding urls, forms, and HTTP ERROR 405

2020-02-20 Thread Phil Kauffman
Hello,

Newbie in need of a little shove. It seems I need to review the purpose of 
the urls.py file. At present I am getting an HTTP Error 405 with the 
following:

urls.py:
path('', views.show_site, name = 'home'),
path('site-view', views.List.as_view(), name='site-view')

views.py
class List(ListView):
def get_queryset(self, *args, **kwargs):
return Profile.objects.filter(sitename_id=self.kwargs['pk'])
def show_site(request):
form = SelectSite()
if request.method == 'POST':
form = SelectSite(request.POST)
if form.is_valid():
pass
else:
form = SelectSite()
return render(request, 'app/home.html', {'form': form})

home.html
{% extends 'app\base.html' %}

{% block title %}Site Home{% endblock %}
{% block content %}
This Form is Terrible
{% csrf_token %}
 {{form}} 


{% endblock %}

Any guidance would be greatly appreciated.

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/10be0e68-da3f-42cd-a095-96d6d2a5617f%40googlegroups.com.


Re: Django rest framework error

2020-02-20 Thread Soumen Khatua
If I'm using serializer then it's working fine but I want to return only
database object. So for that Do I need to add serializer.

Thank you for your response.

On Thu 20 Feb, 2020, 11:17 PM MTS BOUR,  wrote:

> Can you show us your serializer.py file?
>
>
> Le jeu. 20 févr. 2020 17:40, Soumen Khatua  a
> écrit :
>
>> Hi Folks,
>>
>> I'm getting this error, I don't know how to solve it:
>>
>>
>>
>>
>> *File
>> "C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
>> line 179, in defaultraise TypeError(f'Object of type
>> {o.__class__.__name__} 'TypeError: Object of type User is not JSON
>> serializable*
>>
>>
>> *This is my code:*
>>
>> *Views.py:*
>> *--*
>>
>>
>>
>>
>>
>>
>>
>> *class LocationApiView(APIView):permission_classes =
>> (IsAuthenticated,)def get(self,request,format=None):user =
>> request.useruser_location = Profile.objects.get(user = user)
>> return Response({'user':user}, status = status.HTTP_200_OK)*
>>
>>
>> *urls.py*
>> **
>>
>>
>>
>>
>> *urlpatterns = [
>> path('api/location/',views.LocationApiView.as_view(),name =
>> 'api_location')]*
>>
>>
>> *btw when I'm sending a normal message it's working fine. But in this
>> case I'm getting this error.*
>>
>> *Thank You*
>>
>> *Regards,*
>>
>> *Soumen*
>>
>> --
>> 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/CAPUw6WZh%2BgVfi7URo8vPbpjYfT%3D5AdjGyhntBMLgiZ1msiZECg%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/CAAq3G-Ea6aEgo9ECrkbe2Y0bXWGG-GVb-utLf%2B7bn9RCGZ0fGw%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/CAPUw6WbZ%2BOYqcEpadaxCz_9z45dDpbLRduLuUsgGAg2DyPnhFQ%40mail.gmail.com.


Re: Django rest framework error

2020-02-20 Thread MTS BOUR
Can you show us your serializer.py file?


Le jeu. 20 févr. 2020 17:40, Soumen Khatua  a
écrit :

> Hi Folks,
>
> I'm getting this error, I don't know how to solve it:
>
>
>
>
> *File
> "C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
> line 179, in defaultraise TypeError(f'Object of type
> {o.__class__.__name__} 'TypeError: Object of type User is not JSON
> serializable*
>
>
> *This is my code:*
>
> *Views.py:*
> *--*
>
>
>
>
>
>
>
> *class LocationApiView(APIView):permission_classes =
> (IsAuthenticated,)def get(self,request,format=None):user =
> request.useruser_location = Profile.objects.get(user = user)
> return Response({'user':user}, status = status.HTTP_200_OK)*
>
>
> *urls.py*
> **
>
>
>
>
> *urlpatterns = [
> path('api/location/',views.LocationApiView.as_view(),name =
> 'api_location')]*
>
>
> *btw when I'm sending a normal message it's working fine. But in this case
> I'm getting this error.*
>
> *Thank You*
>
> *Regards,*
>
> *Soumen*
>
> --
> 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/CAPUw6WZh%2BgVfi7URo8vPbpjYfT%3D5AdjGyhntBMLgiZ1msiZECg%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/CAAq3G-Ea6aEgo9ECrkbe2Y0bXWGG-GVb-utLf%2B7bn9RCGZ0fGw%40mail.gmail.com.


Django rest framework error

2020-02-20 Thread Soumen Khatua
Hi Folks,

I'm getting this error, I don't know how to solve it:




*File
"C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
line 179, in defaultraise TypeError(f'Object of type
{o.__class__.__name__} 'TypeError: Object of type User is not JSON
serializable*


*This is my code:*

*Views.py:*
*--*







*class LocationApiView(APIView):permission_classes =
(IsAuthenticated,)def get(self,request,format=None):user =
request.useruser_location = Profile.objects.get(user = user)
return Response({'user':user}, status = status.HTTP_200_OK)*


*urls.py*
**




*urlpatterns = [
path('api/location/',views.LocationApiView.as_view(),name =
'api_location')]*


*btw when I'm sending a normal message it's working fine. But in this case
I'm getting this error.*

*Thank You*

*Regards,*

*Soumen*

-- 
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/CAPUw6WZh%2BgVfi7URo8vPbpjYfT%3D5AdjGyhntBMLgiZ1msiZECg%40mail.gmail.com.


Re: Request to disallow using django name in third party django packages name

2020-02-20 Thread אורי
It's very useful that packages that use Django also include "django" in
their names. I don't think there is any reason to disallow it.

בתאריך יום ה׳, 20 בפבר׳ 2020, 14:23, מאת Abhilash Nair ‏:

> Hi everyone,
>
> I am new to Django. Whenever I try to search for way to implement certain
> ideas using django, most of the results are of using the third party django
> apps. As of now I am not interested in using the third party django apps.
> For example I was try implement rest api using django alone. Most of the
> google search results where of using DRF(django rest framework). I tried to
> implement otp based authentication. Again most of the google search results
> are django-otp-official package. Similarly I was looking to implement token
> based authentication. Again most of the results are using DRF. I understand
> these third party apps are providing many of the thing I want. But problem
> is I don't want to use them and want to implement using just Django. And
> resources for that are available but they get hidden in the avalanche of
> these third party django packages dominating all the search results. My
> request  is to disallow third party packages to contain django in their
> package name. Guys let me know your thoughts.
>
> Thanks and Regards
> AB Nair
>
> --
> 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/b31e5d32-1a7d-4000-9bff-36b97410cabf%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/CABD5YeE0jFLqA%3D-wR0J6FkdYrwKAwo4j6QnmY%3DhEOoUe8fXBfQ%40mail.gmail.com.


Re: Why can't Nginx find Django's static files?

2020-02-20 Thread Stephen J. Butler
Django only serves up static files itself when run using runserver. This is
meant for development and not production use. When you run it through
gunicorn the Django framework won't serve up static files. That's why you
connections to :8000 (gunicorn directly, bypassing nginx) don't work right.

For running in production/gunicorn you need to run "collectstatic" after
changes, and connect to nginx (probably port 80/443) so that the
"location/alias" block works as intended and you get your static files.

On Thu, Feb 20, 2020 at 10:36 AM Robert F. 
wrote:

> I'm trying to understand how static files are served up by Django using a
> project I've created on my Mac using Django 3, Gunicorn, and Nginx.  The
> website serves up templates correctly except that the templates can't see
> my CSS stylesheet.  When I go to a page, for example ```
> 127.0.0.1:8000/app1/```  and view the
> source, I see this in my HTML template:
>
> 
>
> If I click on the href link, I get a page "Not Found" at the address ```
> http://127.0.0.1:8000/static/css/main.css```
> .  This seems like it should
> be the correct link but the template can't see the main.css stylesheet as I
> would expect.
>
> Here are the relevant files in my 'mysite' project located in
> /Users/me/projects/django/django-staticfiles:
>
> ├── app1
> │   ├── templates
> │   │   └── app1
> │   │   └── index.html
> ├── mysite
> │   ├── settings.py
> │   └── wsgi.py
> ├── static
> │   └── css
> │   └── main.css
> ├── static-final
> │   ├── admin
> │   │   ├── css
> │   │   ├── fonts
> │   │   ├── img
> │   │   └── js
> │   └── css
> │   └── main.css
>
> Here are the relevant settings:
>
> # mysite/settings.py
> ...
> DEBUG = False
> ALLOWED_HOSTS = ['127.0.0.1', ]
> ...
> INSTALLED_APPS = [
> 'django.contrib.staticfiles',
> 'app1',
> ]
> ...
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (
> os.path.join(BASE_DIR, 'static'),
> )
> STATIC_ROOT = os.path.join(BASE_DIR, 'static-final/')
> ...
>
> I installed Gunicorn into my virtual environment and run it with this
> command:
>
> gunicorn --bind 0.0.0.0:8000 mysite.wsgi
>
> I installed Nginx using Homebrew.  Here is the part of nginx.conf that
> includes my Nginx settings:
>
> # /usr/local/etc/nginx.conf
> ...
> http {
> ...
> server {
> listen  8080;
> server_name localhost;
> }
> ...
> include server/*;
> }
>
> Here is my Nginx configuration:
>
> # /usr/local/etc/nginx/servers/django-staticfiles
> server {
> listen 80;
> server_name 127.0.0.1;
>
> location / {
> proxy_pass http://127.0.0.1:8000;
> }
>
> location /static/ {
> alias /Users/me/projects/django/django-staticfiles/static-final/;
> }
> }
>
> I should add that when I stop Gunicorn and start Django's development
> server with DEBUG = True, the app1 template accesses the main.css file
> correctly.  It just can't see it when I'm running Gunicorn and Nginx.  I
> realize that I don't have a real need to run Gunicorn/Nginx on my Mac, but
> I've just set it up so I can compare and contrast how Django manages static
> files in development versus production.
>
> --
> 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/75f129a6-2dbf-47cc-b4ea-08008b30b047%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/CAD4ANxUeaiQEsgbk9KU93g0ONzJX1VLFWEbG5HK6kuO%2BUQd_pw%40mail.gmail.com.


Why can't Nginx find Django's static files?

2020-02-20 Thread Robert F.
I'm trying to understand how static files are served up by Django using a 
project I've created on my Mac using Django 3, Gunicorn, and Nginx.  The 
website serves up templates correctly except that the templates can't see 
my CSS stylesheet.  When I go to a page, for example 
```127.0.0.1:8000/app1/``` and view the source, I see this in my HTML 
template:



If I click on the href link, I get a page "Not Found" at the address 
```http://127.0.0.1:8000/static/css/main.css```.  This seems like it should 
be the correct link but the template can't see the main.css stylesheet as I 
would expect.

Here are the relevant files in my 'mysite' project located in 
/Users/me/projects/django/django-staticfiles:

├── app1
│   ├── templates
│   │   └── app1
│   │   └── index.html
├── mysite
│   ├── settings.py
│   └── wsgi.py
├── static
│   └── css
│   └── main.css
├── static-final
│   ├── admin
│   │   ├── css
│   │   ├── fonts
│   │   ├── img
│   │   └── js
│   └── css
│   └── main.css

Here are the relevant settings:

# mysite/settings.py
...
DEBUG = False
ALLOWED_HOSTS = ['127.0.0.1', ]
...
INSTALLED_APPS = [
'django.contrib.staticfiles',
'app1',
]
...
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static-final/')
...

I installed Gunicorn into my virtual environment and run it with this 
command:

gunicorn --bind 0.0.0.0:8000 mysite.wsgi

I installed Nginx using Homebrew.  Here is the part of nginx.conf that 
includes my Nginx settings:

# /usr/local/etc/nginx.conf
...
http {
...
server {
listen  8080;
server_name localhost;
}
...
include server/*;
}

Here is my Nginx configuration:

# /usr/local/etc/nginx/servers/django-staticfiles
server {
listen 80;
server_name 127.0.0.1;

location / {
proxy_pass http://127.0.0.1:8000;
}

location /static/ {
alias /Users/me/projects/django/django-staticfiles/static-final/;
}
}

I should add that when I stop Gunicorn and start Django's development 
server with DEBUG = True, the app1 template accesses the main.css file 
correctly.  It just can't see it when I'm running Gunicorn and Nginx.  I 
realize that I don't have a real need to run Gunicorn/Nginx on my Mac, but 
I've just set it up so I can compare and contrast how Django manages static 
files in development versus production.

-- 
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/75f129a6-2dbf-47cc-b4ea-08008b30b047%40googlegroups.com.


Re: Bootstrap Nav Bar

2020-02-20 Thread onlinejudge95
On Thu, Feb 20, 2020 at 8:24 PM Perceval Maturure 
wrote:

> Dear all
> I need help with making a bootstrap Nav bar which populates menus
> restricted to a certain width of the nav bar
>
> Any pointers?
>
Maybe ask on a bootstrap mailing list

> Regards
>
> --
> 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/8681CE86-0F43-4B7A-B032-05285635D68C%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/CAD%3DM5eT9YdzH_4ZgEJsLStYMpQY8r3B2Hf849rBh%3Dst99NCyOQ%40mail.gmail.com.


Re: Bootstrap Nav Bar

2020-02-20 Thread Kasper Laudrup

Hi Perceval,

On 20/02/2020 15.54, Perceval Maturure wrote:

Dear all
I need help with making a bootstrap Nav bar which populates menus restricted to 
a certain width of the nav bar

Any pointers?


The Twitter Bootstrap forum would probably be a good place to ask:

http://www.twitterbootstrap.net/forum/forum.php

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/41370529-69a8-895f-27c4-dd9d67ce443b%40stacktrace.dk.


Bootstrap Nav Bar

2020-02-20 Thread Perceval Maturure
Dear all
I need help with making a bootstrap Nav bar which populates menus restricted to 
a certain width of the nav bar

Any pointers?
Regards

-- 
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/8681CE86-0F43-4B7A-B032-05285635D68C%40gmail.com.


Re: Django User Roles and user relations

2020-02-20 Thread onlinejudge95
On Thu, Feb 20, 2020 at 5:53 PM Kirankumar 
wrote:

> Hii All..
>
>   I'm trying to give level roles like admin defaultly it is
> available and Manager group and normal user groups in my django
> aplication...
>
>   Generally admin can fetch all the records created by all
> users..Now my requirement is the user which is in manager group can fetch
> their own records and his subordinate (normal) user's records...I have no
> idea to develop this scenario how to relate normal users to particular
> associate (Manager) user...
>
Looks like a One(Manager)-To-Many(Subordinates) Relationship would make
sense here

>
>  Can anyone please help me out..Thanks in advance
>
> --
> 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/18e43f77-8a33-4c7a-80ec-5151d10a5e96%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/CAD%3DM5eTdaHwBxBd8BC_kyfB_JHjw%3D-u%2BZwXpQvrJ_ApRfvEZDg%40mail.gmail.com.


Re: Request to disallow using django name in third party django packages name

2020-02-20 Thread Omkar Parab
All the third party apps are open source. Codes are available on github.
You can create your own. Just like you, they've also created, and kept
public.

On Thu, Feb 20, 2020, 6:57 PM 'Artem Vasin' via Django users <
django-users@googlegroups.com> wrote:

> Hi!
>
> *Tl;dr no I don’t think so, actually it’s very useful.*
>
> IMHO, you are barking at the wrong tree. As I see it, and I think many
> would agree with me, using third-party libraries instead of implementing
> your own, are the way to go in Django and Python and open-source community
> in general. It gives you advantages of not wasting your time writing
> something that already exists from scratch and focus more of business-logic
> of your project instead of technical things like organising auth or
> request-response handling (something for which we using Django in first
> place).
>
> Why it may be fun and educational to write something like your own auth
> system or rest-api from scratch and probably you should really at least try
> something like that when you learning Django or any other framework, you
> probably should not do so, when developing application which is more then
> study project. Using third-party apps not only saves your time, but
> provides you with some advantages over something written from scratch. For
> example you talking about authentication. Are you sure that your
> self-written library is really secure? Is it tested better than result of
> work and debugging of several people (or in case of DRF baby people) over
> the course of multiple years? Will it work with different versions of
> python or Django, which you can be forced to use in other projects or you
> should write another version if you will need to use older python or
> Django? Will someone help you with problem in your library or they simple
> say 'You should have used  be to take what you write in one project and use in another? Etc.
>
> As I see it, modern day programming is not about writing from scratch and
> more about knowing which libraries you can use and when and how use them. I
> think that most of programmers, using Django for serious projects actually
> very happy every time when they can use third-party library to add some
> functionality in project.
>
> Now about third-party-app naming. Actually I think that in contrary to
> your position all third-party Django apps’ names *should* start with
> *django-. *
> *Firstly*, it really helps in finding third-party apps in google, and as
> I say earlier using third-party libraries instead of writing everything
> from scratch is python way as I see it.
> *Secondly* it helps differentiating Django apps from other libraries in
> PyPI, GitHub or others list of libraries. For example we have app^ which
> allows authorise Django user through ldap. If we call it simply auth-ldap
> it may be named the same is some more general ldap auth library in PyPI and
> we could not publish it here. Naming it Django-auth-ldap decreases chance
> of this collision.
> *Thirdly*, this naming implies that this library designed to work only in
> concert with django. Many of Django third-party app would not work without
> Django core packages, or such a small part of them will be useful, so
> including this app in your project will bring a lot of overhead.
> *And lastly*, this naming helps you understand what this package is when
> you see it somewhere in *requirements.txt *or in *pip freeze* output.
>
> Now to address your problem about trying to write something from scratch
> and finding only third-party libraries. If you writing something like auth
> system in production system may be it’s real better to use already existing
> and tested third-party library. But if you want to write something from
> scratch to deeper your understanding of Django or programming in general,
> that’s actually a wonderful idea, wish more of my colleagues do something
> like that in their free time. So how to do it, when google only wants to
> show you third-party libraries?
>
> Try to add words like *«from scratch» *or* «without third-party apps» *in
> your search query. There is plenty of posts in internet where someone
> writes about how to implement something without adding new dependencies.
>
> And why do you think, that third-party apps is useless when writing
> something from scratch? Actually no one forbids you to open GitHub of
> third-party app doing something that you trying to write and read it’s
> code. Most of big de-facto-standart libraries, like DRF is actually well
> written and you even can get something from their sources, of which you
> didn’t even think. You can even try to contact authors and ask them, why
> they did something the way it is. I think that you can learn something new
> that way.
>
> So no, I don’t think that *django- *prefix is as big problem as you
> trying to make it. Actually, I think that when you start write something
> meant to work in production and solve someone problems you will be very
> glad for that 

Re: Retaining text in search input boxes

2020-02-20 Thread onlinejudge95
+1

On Thu, Feb 20, 2020 at 4:25 PM Farai M  wrote:

> For drop downs use JavaScript script or JQuery to set the value of the
> value of the selected item.For input use an if on the value if it's
> populated then the input value is equal to the attribute us you put it
> .Another option is to use the default on attribute but make it an empty
> string so you don't have none when attribute is empty .
>
> On Thu, Feb 20, 2020, 12:14 PM Dick Arnold  wrote:
>
>> I used a value of {{attribute value}}.  so it is nor a fixed value, but
>> is the value submitted.  Doesn't work well for drop down input fields.
>> still researching.
>>
>> On Saturday, February 15, 2020 at 12:50:59 PM UTC-6, 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.
>>>
>>> 
>>>
>> --
>> 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/77088a26-742b-4bb4-8f2f-b74c5375119d%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/CAMeub5MC4smYxE%2BJjksURBP0aEWtCN%3DTf0-ZeDh8AgmdLy42eg%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/CAD%3DM5eS77KgQL8eB1sp%3DZKLMUCjkfXGE0_fe0d5b%2BDKHZhdJpQ%40mail.gmail.com.


Re: Request to disallow using django name in third party django packages name

2020-02-20 Thread 'Artem Vasin' via Django users
Hi!

Tl;dr no I don’t think so, actually it’s very useful.

IMHO, you are barking at the wrong tree. As I see it, and I think many would 
agree with me, using third-party libraries instead of implementing your own, 
are the way to go in Django and Python and open-source community in general. It 
gives you advantages of not wasting your time writing something that already 
exists from scratch and focus more of business-logic of your project instead of 
technical things like organising auth or request-response handling (something 
for which we using Django in first place).

Why it may be fun and educational to write something like your own auth system 
or rest-api from scratch and probably you should really at least try something 
like that when you learning Django or any other framework, you probably should 
not do so, when developing application which is more then study project. Using 
third-party apps not only saves your time, but provides you with some 
advantages over something written from scratch. For example you talking about 
authentication. Are you sure that your self-written library is really secure? 
Is it tested better than result of work and debugging of several people (or in 
case of DRF baby people) over the course of multiple years? Will it work with 
different versions of python or Django, which you can be forced to use in other 
projects or you should write another version if you will need to use older 
python or Django? Will someone help you with problem in your library or they 
simple say 'You should have used  20 февр. 2020 г., в 09:35, Abhilash Nair  написал(а):
> 
> Hi everyone,
> 
> I am new to Django. Whenever I try to search for way to implement certain 
> ideas using django, most of the results are of using the third party django 
> apps. As of now I am not interested in using the third party django apps. For 
> example I was try implement rest api using django alone. Most of the google 
> search results where of using DRF(django rest framework). I tried to 
> implement otp based authentication. Again most of the google search results 
> are django-otp-official package. Similarly I was looking to implement token 
> based authentication. Again most of the results are using DRF. I understand 
> these third party apps are providing many of the thing I want. But problem is 
> I don't want to use them and want to implement using just Django. And 
> resources for that are available but they get hidden in the avalanche of 
> these third party django packages dominating all the search results. My 
> request  is to disallow third party packages to contain django in their 
> package name. Guys let me know your thoughts.
> 
> Thanks and Regards
> AB Nair
> 
> 
> -- 
> 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/b31e5d32-1a7d-4000-9bff-36b97410cabf%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/5DA146E1-AABC-42E7-8341-9D03867BD7E3%40me.com.


I am not able to render my file fields in the Database so not able to upload image

2020-02-20 Thread mick



forms.py

class FormStep8(forms.Form):
portraitphoto=forms.ImageField(label='Portrait photos of yourself')
high_resolution=forms.ImageField(label='3 High Resolution pictures')
company_logo=forms.ImageField(label='Company Logo')
product_images=forms.ImageField(label='Product Images')
location_img=forms.ImageField(label='Office Location Image')
product_video=forms.FileField(label='Product Video')
customer_testimonial_video=forms.FileField(label='Customer Testimonial 
video')




models.py

class modelstep8(models.Model):
portraitphoto=models.ImageField()
high_resolution=models.ImageField()
company_logo=models.ImageField()
product_images=models.ImageField()
location_img=models.ImageField()
product_video=models.FileField()
customer_testimonial_video=models.FileField()




error

portraitphotoThis field is 
required.high_resolutionThis field 
is required.company_logoThis field is required.product_imagesThis field is required.location_imgThis field is required.product_videoThis field is 
required.customer_testimonial_videoThis field is required.


-- 
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/38fef6ae-2b89-4070-b46c-c1a905aa6258%40googlegroups.com.


RE: Python Django Training

2020-02-20 Thread Parvez Khan Pathan
intrested

Sent from Mail for Windows 10

From: Thiagu Palaniappan
Sent: Thursday, 20 February 2020 18:19
To: django-users@googlegroups.com
Subject: Re: Python Django Training

I'm also interested. Please add me in the group.


Thanks & Regards,
Thiagu

On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
mailto:akshayrau...@gmail.com>> wrote:
I am interested also. Please let me know the details.

On Sat 1 Feb, 2020, 2:42 PM Srikanth K, 
mailto:srikopan...@gmail.com>> wrote:
Hi,

I am from Hyderabad. I am Python Developer by Profession. I am eager take up 
any Python , Django Training (online Preferrable or Weekends). Members who 
require can contact me or share me  there idea.

Regards,
Srikanth.K
--
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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com.


--

Thanks & Regards,

Thiagu Palaniappan

M +91 (0) 9994318799

DXC Technology
8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam post, 
Ramapuram, Chennai - 600 089.

dxc.technology / 
Twitter / 
Facebook / 
LinkedIn
--
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/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%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/TY2PR06MB32635CC16D7DA8F7DC670384F8130%40TY2PR06MB3263.apcprd06.prod.outlook.com.


Re: Python Django Training

2020-02-20 Thread Thiagu Palaniappan
I'm also interested. Please add me in the group.


Thanks & Regards,
Thiagu

On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul  wrote:

> I am interested also. Please let me know the details.
>
> On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:
>
>> Hi,
>>
>> I am from Hyderabad. I am Python Developer by Profession. I am eager take
>> up any Python , Django Training (online Preferrable or Weekends). Members
>> who require can contact me or share me  there idea.
>>
>> Regards,
>> Srikanth.K
>>
>> --
>> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
> 
> .
>


-- 

Thanks & Regards,

*Thiagu Palaniappan*

M +91 (0) 9994318799

*DXC Technology*
8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
post, Ramapuram, Chennai - 600 089.

dxc.technology  / Twitter
 / Facebook
 / LinkedIn


-- 
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/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.gmail.com.


Re: How to do SEO for my django website

2020-02-20 Thread savaş özkarakaya
I don't know is there ?   *seo hizmeti *

3 Ocak 2020 Cuma 15:41:28 UTC+3 tarihinde Yash Garg yazdı:
>
> Is there any package or module available for SEO of django website ?
>
>

-- 
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/d0853ede-a709-409d-991e-2520b28891c0%40googlegroups.com.


Request to disallow using django name in third party django packages name

2020-02-20 Thread Abhilash Nair
Hi everyone,

I am new to Django. Whenever I try to search for way to implement certain 
ideas using django, most of the results are of using the third party django 
apps. As of now I am not interested in using the third party django apps. 
For example I was try implement rest api using django alone. Most of the 
google search results where of using DRF(django rest framework). I tried to 
implement otp based authentication. Again most of the google search results 
are django-otp-official package. Similarly I was looking to implement token 
based authentication. Again most of the results are using DRF. I understand 
these third party apps are providing many of the thing I want. But problem 
is I don't want to use them and want to implement using just Django. And 
resources for that are available but they get hidden in the avalanche of 
these third party django packages dominating all the search results. My 
request  is to disallow third party packages to contain django in their 
package name. Guys let me know your thoughts.

Thanks and Regards
AB Nair

-- 
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/b31e5d32-1a7d-4000-9bff-36b97410cabf%40googlegroups.com.


Django User Roles and user relations

2020-02-20 Thread Kirankumar
Hii All..

  I'm trying to give level roles like admin defaultly it is 
available and Manager group and normal user groups in my django 
aplication...

  Generally admin can fetch all the records created by all 
users..Now my requirement is the user which is in manager group can fetch 
their own records and his subordinate (normal) user's records...I have no 
idea to develop this scenario how to relate normal users to particular 
associate (Manager) user...

 Can anyone please help me out..Thanks in advance

-- 
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/18e43f77-8a33-4c7a-80ec-5151d10a5e96%40googlegroups.com.


Re: Retaining text in search input boxes

2020-02-20 Thread Farai M
For drop downs use JavaScript script or JQuery to set the value of the
value of the selected item.For input use an if on the value if it's
populated then the input value is equal to the attribute us you put it
.Another option is to use the default on attribute but make it an empty
string so you don't have none when attribute is empty .

On Thu, Feb 20, 2020, 12:14 PM Dick Arnold  wrote:

> I used a value of {{attribute value}}.  so it is nor a fixed value, but is
> the value submitted.  Doesn't work well for drop down input fields.  still
> researching.
>
> On Saturday, February 15, 2020 at 12:50:59 PM UTC-6, 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.
>>
>> 
>>
> --
> 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/77088a26-742b-4bb4-8f2f-b74c5375119d%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/CAMeub5MC4smYxE%2BJjksURBP0aEWtCN%3DTf0-ZeDh8AgmdLy42eg%40mail.gmail.com.


Re: Retaining text in search input boxes

2020-02-20 Thread Dick Arnold
I should have said {{attribute name}}, not value.

On Saturday, February 15, 2020 at 12:50:59 PM UTC-6, 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.
>
> 
>

-- 
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/265f0a2c-a231-4c98-a7a6-cac499f0bb9d%40googlegroups.com.


Re: Retaining text in search input boxes

2020-02-20 Thread Dick Arnold


On Thursday, February 20, 2020 at 4:14:18 AM UTC-6, Dick Arnold wrote:
>
> I used a value of {{attribute value}}.  so it is nor a fixed value, but is 
> the value submitted.  Doesn't work well for drop down input fields.  still 
> researching.
>
> On Saturday, February 15, 2020 at 12:50:59 PM UTC-6, 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.
>>
>> 
>>
>

-- 
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/5357664f-e6f7-46b8-85e2-28a81d5db59d%40googlegroups.com.


Re: Retaining text in search input boxes

2020-02-20 Thread Dick Arnold
I used a value of {{attribute value}}.  so it is nor a fixed value, but is 
the value submitted.  Doesn't work well for drop down input fields.  still 
researching.

On Saturday, February 15, 2020 at 12:50:59 PM UTC-6, 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.
>
> 
>

-- 
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/77088a26-742b-4bb4-8f2f-b74c5375119d%40googlegroups.com.