Re: Sometime it's happening this error on server on django application

2019-12-10 Thread Sencer Hamarat
This look like the peer (the client whom the connecting to server)
connection is abnormally interrupted.
The possibilities are very broad. This could be happening by client
software, driver or hardware.
Also, this could causing by client's physical internet connection from LAN
cable to ISP.

Saygılarımla,
Sencer HAMARAT



On Wed, Dec 11, 2019 at 8:52 AM Rupam Hazra  wrote:

>
> Exception happened during processing of request from ('47.11.53.147',
> 47572)
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.7/socketserver.py", line 647, in
> process_request_thread
> self.finish_request(request, client_address)
>   File "/usr/local/lib/python3.7/socketserver.py", line 357, in
> finish_request
> self.RequestHandlerClass(request, client_address, self)
>   File "/usr/local/lib/python3.7/socketserver.py", line 717, in __init__
> self.handle()
>   File
> "/var/www/html/ssil_env/lib/python3.7/site-packages/django/core/servers/basehttp.py",
> line 153, in handle
> self.handle_one_request()
>   File
> "/var/www/html/ssil_env/lib/python3.7/site-packages/django/core/servers/basehttp.py",
> line 161, in handle_one_request
> self.raw_requestline = self.rfile.readline(65537)
>   File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
> return self._sock.recv_into(b)
>   File "/usr/local/lib/python3.7/ssl.py", line 1049, in recv_into
> return self.read(nbytes, buffer)
>   File "/usr/local/lib/python3.7/ssl.py", line 908, in read
> return self._sslobj.read(len, buffer)
> ConnectionResetError: [Errno 104] Connection reset by peer
>
> --
> 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/4bc88110-6843-4f26-aa08-6f156fd162f0%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/CACp8TZisYvWpn7HW7arC5_Bze4ppyUBFdSKyB-YavObwD71%3D1w%40mail.gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Thank you Daniel.

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Daniel Hepper 

Reply to: 
Date: Tuesday, 10 December 2019 at 13:54
To: 
Subject: Re: Removing Hardcoded urls in Templates

 

It should be {% url 'polls:detail' question.id %}

 

I think you mixed up the steps "Removing hardcoded URLs in templates" and 
"Namespacing URL names"

 

Hope that helps,

Daniel

 

On Tue, Dec 10, 2019 at 11:58 AM Bruckner de Villiers 
 wrote:

Running Django 3.0 & Python 3.7.3.

 

Issue with Tutorial Part 3:
I replaced “{{ question.question_text 
}}” with
“{{ question.question_text 
}}” and get the following error:
Reverse for 'detail' not found. 'detail' is not a valid view function or 
pattern name.
{{ question.question_text 
}}
index.html:
{% if latest_question_list %}



{% for question in latest_question_list %}

{% comment %} {{ question.id }} 
{{ question.question_text }} {{ question.pub_date }} {% endcomment %}

{{ question.question_text 
}} {% comment %} - Why doesn't this work?-->  {% endcomment %}

{% endfor %}



{% else %}

No polls are available.

{% endif %}
urls.py:
from os import \

path

 

from django.urls import \

path

from . import \

views

 

app_name = 'polls'

urlpatterns = [

path('', views.index, name='index'),

path('/', views.detail, name='detail'),

path('/results/', views.results, name='results'),

path('/vote/', views.vote, name='vote'),

]
views.py:
from django.shortcuts import get_object_or_404, render

from django.http import \

HttpResponse

from django.shortcuts import \

render

#from django.template import loader

from .models import Question

 

# Create your views here.

def index(request):

latest_question_list = Question.objects.order_by('-pub_date')[:10]

context = {'latest_question_list': latest_question_list}

return render(request, 'polls/index.html', context)

 

def detail(request, question_id):

question = get_object_or_404(Question, pk=question_id)

return render(request, 'polls/detail.html', {'question': question})

 

def results(request, question_id):

response = "You're looking at the results of question %s."

return HttpResponse(response % question_id)

 

def vote(request, question_id):

return HttpResponse("You're voting on question %s." % question_id)

 
Much obliged,
 
 

 

Bruckner de Villiers

083 625 1086

-- 
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/0072F811-155B-41C2-BDCD-3C529150941B%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/CAHEnUVW5AxWDmgRdvHEUYrd%3D%3D%2BFA6y4htqJjv9sJc-OkiCHQpA%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/641E4430-80FE-4BF0-9EEF-1CD0B1B2449B%40gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Thank you Sencer.

 

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Sencer Hamarat 

Reply to: 
Date: Tuesday, 10 December 2019 at 13:51
To: 
Subject: Re: Removing Hardcoded urls in Templates

 

Would you please replace url name with 'polls:detail', as described at 
https://docs.djangoproject.com/en/3.0/topics/http/urls/#id5

 


Saygılarımla,

Sencer HAMARAT

 

 

On Tue, Dec 10, 2019 at 1:58 PM Bruckner de Villiers 
 wrote:

Running Django 3.0 & Python 3.7.3.

 

Issue with Tutorial Part 3:
I replaced “{{ question.question_text 
}}” with
“{{ question.question_text 
}}” and get the following error:
Reverse for 'detail' not found. 'detail' is not a valid view function or 
pattern name.
{{ question.question_text 
}}
index.html:
{% if latest_question_list %}



{% for question in latest_question_list %}

{% comment %} {{ question.id }} 
{{ question.question_text }} {{ question.pub_date }} {% endcomment %}

{{ question.question_text 
}} {% comment %} - Why doesn't this work?-->  {% endcomment %}

{% endfor %}



{% else %}

No polls are available.

{% endif %}
urls.py:
from os import \

path

 

from django.urls import \

path

from . import \

views

 

app_name = 'polls'

urlpatterns = [

path('', views.index, name='index'),

path('/', views.detail, name='detail'),

path('/results/', views.results, name='results'),

path('/vote/', views.vote, name='vote'),

]
views.py:
from django.shortcuts import get_object_or_404, render

from django.http import \

HttpResponse

from django.shortcuts import \

render

#from django.template import loader

from .models import Question

 

# Create your views here.

def index(request):

latest_question_list = Question.objects.order_by('-pub_date')[:10]

context = {'latest_question_list': latest_question_list}

return render(request, 'polls/index.html', context)

 

def detail(request, question_id):

question = get_object_or_404(Question, pk=question_id)

return render(request, 'polls/detail.html', {'question': question})

 

def results(request, question_id):

response = "You're looking at the results of question %s."

return HttpResponse(response % question_id)

 

def vote(request, question_id):

return HttpResponse("You're voting on question %s." % question_id)

 
Much obliged,
 
 

 

Bruckner de Villiers

083 625 1086

-- 
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/0072F811-155B-41C2-BDCD-3C529150941B%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/CACp8TZhfYfRH32oHh8Q4vFFWos9QoCXH2%3DrrjQCuxoOETjLc2A%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/56E2FE35-0C16-487C-ACE7-5D5ECDF13583%40gmail.com.


Need to Query complex django model

2019-12-10 Thread Nitin Kalmaste
Hello community,
I need to make django views for the models described below.
How do i create query to write in view

https://stackoverflow.com/questions/59280345/how-to-query-django-models-for-complex-models-like-this

Please Need Help seriously

-- 
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/CAKroR%2B04RMHrRnF%2Bo_Wwm1GXb2YA_p1iSfOY_zAVNC07MYwRbg%40mail.gmail.com.


Python Email Parsing and Email Signature Extraction

2019-12-10 Thread Ajeet Kumar Gupt
Hi Team,

I need one help from python how to extract contact and email address from
Gmail signature in an excel sheet.

-- 






*Thanks & Regards*
Ajeet Kumar Gupt
+91-9311232332

-- 
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%2BTqRsuq-V5osO1UhY38%2BwLWVB4GFX_g4m%3D8kSe5t%3DvL8O3c%2BA%40mail.gmail.com.


Sometime it's happening this error on server on django application

2019-12-10 Thread Rupam Hazra

Exception happened during processing of request from ('47.11.53.147', 47572)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/socketserver.py", line 647, in 
process_request_thread
self.finish_request(request, client_address)
  File "/usr/local/lib/python3.7/socketserver.py", line 357, in 
finish_request
self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.7/socketserver.py", line 717, in __init__
self.handle()
  File 
"/var/www/html/ssil_env/lib/python3.7/site-packages/django/core/servers/basehttp.py",
 
line 153, in handle
self.handle_one_request()
  File 
"/var/www/html/ssil_env/lib/python3.7/site-packages/django/core/servers/basehttp.py",
 
line 161, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
  File "/usr/local/lib/python3.7/ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
  File "/usr/local/lib/python3.7/ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

-- 
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/4bc88110-6843-4f26-aa08-6f156fd162f0%40googlegroups.com.


Looking for internship

2019-12-10 Thread Anirudh choudhary
Hello all
I am looking for internship in Delhi or pune. I am currently in 6 sem of
engineering mechatronics in ADYPU.
I am ready to work as part time , full time, home based.
Thankyou

-- 
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/CAL8_rkFJ7G2m5h-uO_TerHm%2B_Apb%3DMPp%2BsevvgWx4t0Xr8wZuA%40mail.gmail.com.


Re: passing an argument to ListView class and accessing using kwargs

2019-12-10 Thread Dominick Del Ponte
I think you need to add ** to kwargs.
like: qs = Utilizationtable.objects.filter(pathname=**kwargs)

alternatively, this may also work,
def get_queryset(self):
return self.model.objects.filter(pathname=self.kwargs['pathname'])



Dominick
delponte.d...@gmail.com



On Wed, Dec 11, 2019 at 8:33 AM Patrick Carra  wrote:

> Hello I am attempting to pass an argument to a Class(ListView) and then
> perform a filter using a kwarg that contains the argument passed in the
> url.  I am having a problem because I cannot access the variable in the url
> using kwargs.  I am not sure what I'm doing wrong below is the link that
> I'm using to pass this value:
>  ="edit-item" title="ViewUtilization">Click to View Utilization
>
> my viewLit/urls.py is:
> urlpatterns= [
>  path('/', views.viewLit, name='viewLit'),
>  path('/edit', views.editLit.as_view(),
> name='editLit'),
>  path('/editXC', views.editXC.as_view(),
> name='editXC'),
>  path('/viewutilization',
> views.viewUtilization.as_view(), name='viewUtilization'),
> ]
>
> my views.py is:
> class viewUtilization(ListView):
> pk_url_kwarg = 'pathname'
> model=Utilizationtable
>
> def get_queryset(self, **kwargs):
> qs = Utilizationtable.objects.filter(pathname=kwargs)
> return qs
>
>
> and my template is:
> 
> 
> 
> 
> You have made it to the utilization page
> {% block content %}
>   Utilization
> {% for object in object_list %}
>   {{ object.reportdate }} {{ object.utilization }}
> {% endfor %}
> {% endblock %}
> 
> 
>
> My query comes back as this:
> *SELECT* ••• *FROM* "utilizationtable" *WHERE* "utilizationtable"."pathname"
> = '{}'
>
> I know I'm missing something simple but I'm not sure what?!?!?!?!??!!
>
> --
> 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/663edf79-246c-47d5-abb5-d9cb0e6ae718%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/CALLhV5SogU8SkJ27FEz9C2VO%2BL9-dau_eTCfnFJeAvOZrYDQPw%40mail.gmail.com.


Re: passing an argument to ListView class and accessing using kwargs

2019-12-10 Thread Patrick Carra
One more additional note this is the url that gets access when the link is 
clicked

http://98.8.61.133:8080/viewLit/St.%20Louis%20to%20Mt.%20Vernon/viewutilization

-- 
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/5bf13205-e8e7-41c9-9c65-dc513e2dc50f%40googlegroups.com.


passing an argument to ListView class and accessing using kwargs

2019-12-10 Thread Patrick Carra
Hello I am attempting to pass an argument to a Class(ListView) and then 
perform a filter using a kwarg that contains the argument passed in the 
url.  I am having a problem because I cannot access the variable in the url 
using kwargs.  I am not sure what I'm doing wrong below is the link that 
I'm using to pass this value:
Click to View Utilization

my viewLit/urls.py is:
urlpatterns= [
 path('/', views.viewLit, name='viewLit'),
 path('/edit', views.editLit.as_view(), name='editLit'),
 path('/editXC', views.editXC.as_view(), name='editXC'),
 path('/viewutilization', 
views.viewUtilization.as_view(), name='viewUtilization'),
]

my views.py is:
class viewUtilization(ListView):
pk_url_kwarg = 'pathname'
model=Utilizationtable

def get_queryset(self, **kwargs):
qs = Utilizationtable.objects.filter(pathname=kwargs)
return qs


and my template is:




You have made it to the utilization page
{% block content %}
  Utilization
{% for object in object_list %}
  {{ object.reportdate }} {{ object.utilization }}
{% endfor %}
{% endblock %}



My query comes back as this:
*SELECT* ••• *FROM* "utilizationtable" *WHERE* "utilizationtable"."pathname" 
= '{}'

I know I'm missing something simple but I'm not sure what?!?!?!?!??!!

-- 
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/663edf79-246c-47d5-abb5-d9cb0e6ae718%40googlegroups.com.


Re: Django Error - 'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls

2019-12-10 Thread Dvs Khamele
https://stackoverflow.com/questions/18321684/staticfiles-is-not-a-valid-tag-library-template-library-staticfiles-not-found
See this,

Add these lines,

django.contrib.staticfiles

to INSTALLED_APPS in settings.py

On Tue, 10 Dec 2019 at 21:29, Balaji Shetty  wrote:

> Hi
>
> I am getting error for every Project.
>
> I  created new environment and reinstalled python and Django.
>
> emplateSyntaxError at /
>
> 'staticfiles' is not a registered tag library. Must be one of:
> admin_list
> admin_modify
> admin_urls
> cache
> i18n
> l10n
> log
> propeller
> static
> tz
>
>
>
>
> --
>
>
> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
> *Official: bsshe...@sggs.ac.in  *
> *  Mobile: +91-9270696267*
>
> --
> 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/CAECSbOu6bW6G3Wqmz7w3AkezhuGGax9Z4dH7LzEVLAAV5ZtaKQ%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/CAH9mneVY_omR3o2NLrOnuhQ7nziY916DJkkADhY8d0A0zvVZSw%40mail.gmail.com.


Re: Sending XML data from Django to another server (SAP)

2019-12-10 Thread Integr@te System
Hi,
https://pypi.org/project/django-import-export-xml/

On Tue, Dec 10, 2019, 19:20 Pema Galey  wrote:

> Thank you for your interest..
> But I have developed my Django application and now I am looking for best
> method to send data from Django server to SAP using XML Format.
> Just I want the recommendation.
>
> Thank you
>
> On Dec 7, 2019, at 6:46 PM, Dvs Khamele  wrote:
>
> Hi do you hire contract based python/django freelancer?
>  I can help you in this and related tasks
> Best Regards,
> Divyesh Khamele
>
> On Sat, 7 Dec 2019 at 19:51, Pema Galey  wrote:
>
>> Hi All,
>> Someone recommend in sending the *data from Django server to SAP server
>> which interprets in XML format.*
>>
>>
>> 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/8e4e2355-bb3b-4695-9770-a18c20249fd0%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/CAH9mneVb0Hve4q9QoxxuvA8fmOZcy%2B35JrL7fg6fSOmx-WnzxA%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/5D0984F4-A70C-4D57-8AE4-5F15649C053D%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/CAP5HUWpo5tVfqwszmxfgDS895njVej%2BicHZrnJJWy1J-Wi%2BRvA%40mail.gmail.com.


Re: Hiring an engineer in San Francisco

2019-12-10 Thread Integr@te System
Hi PollyEx team,
Thank for your sharing.


On Tue, Dec 10, 2019, 06:03 Erik Gunderson  wrote:

> PollyEx is hiring a full stack software engineer with an emphasis in
> django. Our team is looking for a full-time employee able to work in our
> San Francisco office.  The stack is python/django/pandas/vue/heroku
>
> To apply visit -
> https://jobs.lever.co/pollyex/23e8fee3-8a9f-4bf1-9943-8584ab9b6c0a or
> www.pollyex.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/154a4188-be29-40f5-82dc-1cec3906ffbf%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/CAP5HUWrJi%3DmCSWMp2ZOtgtAKKvytxhWSCQqFt-UES%2BypVyrmEA%40mail.gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread GGFU GAME
Your code:

“<*li*><*a* href="{% *url* 'detail' question.id %}">{{
question.question_text }}”


Try addinga polls:detail like this:

“<*li*><*a* href="{% *url* 'polls:detail' question.id %}">{{
question.question_text }}”


uto, 10. dec 2019. 11:58 Bruckner de Villiers 
је написао/ла:

> Running Django 3.0 & Python 3.7.3.
>
>
>
> Issue with Tutorial Part 3:
>
> I replaced “<*li*><*a* href="/polls/{{ question.id }}/">{{ 
> question.question_text }}” with
>
> “<*li*><*a* href="{% *url* 'detail' question.id %}">{{ question.question_text 
> }}” and get the following error:
>
> Reverse for 'detail' not found. 'detail' is not a valid view function or 
> pattern name.
>
> http://question.id> %}*">{{
> question.question_text }}
>
> index.html:
>
> {% if latest_question_list %}
>
> 
>
> {% for question in latest_question_list %}
>
> *{% comment %} http://question.id> }}/">{{ question.id  }} {{
> question.question_text }} {{ question.pub_date }} {% endcomment %}*
>
> {{ question.
> question_text }} *{% comment %} - Why doesn't this work?-->  {%
> endcomment %}*
>
> {% endfor %}
>
> 
>
> {% else %}
>
> No polls are available.
>
> {% endif %}
>
> urls.py:
>
> from os import \
>
> path
>
>
>
> from django.urls import \
>
> path
>
> from . import \
>
> views
>
>
>
> app_name = 'polls'
>
> urlpatterns = [
>
> path('', views.index, name='index'),
>
> path('/', views.detail, name='detail'),
>
> path('/results/', views.results, name='results'),
>
> path('/vote/', views.vote, name='vote'),
>
> ]
>
> views.py:
>
> from django.shortcuts import get_object_or_404, render
>
> from django.http import \
>
> HttpResponse
>
> from django.shortcuts import \
>
> render
>
> *#from django.template import loader*
>
> from .models import Question
>
>
>
> *# Create your views here.*
>
> *def* index(request):
>
> latest_question_list = Question.objects.order_by('-pub_date')[:10]
>
> context = {'latest_question_list': latest_question_list}
>
> return render(request, 'polls/index.html', context)
>
>
>
> *def* detail(request, question_id):
>
> question = get_object_or_404(Question, pk=question_id)
>
> return render(request, 'polls/detail.html', {'question': question})
>
>
>
> *def* results(request, question_id):
>
> response = "You're looking at the results of question %s."
>
> return HttpResponse(response % question_id)
>
>
>
> *def* vote(request, question_id):
>
> return HttpResponse("You're voting on question %s." % question_id)
>
>
>
> Much obliged,
>
>
>
>
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> 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/0072F811-155B-41C2-BDCD-3C529150941B%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/CAFoRdwRCkV-rsr13BiK7j3z5HoX7DCPw%3Dzif%2Bj2q2-fw4W3mkw%40mail.gmail.com.


Re: Sending XML data from Django to another server (SAP)

2019-12-10 Thread Pema Galey
Thank you for your interest..
But I have developed my Django application and now I am looking for best method 
to send data from Django server to SAP using XML Format.
Just I want the recommendation.

Thank you

> On Dec 7, 2019, at 6:46 PM, Dvs Khamele  wrote:
> 
> Hi do you hire contract based python/django freelancer?
>  I can help you in this and related tasks  
> Best Regards, 
> Divyesh Khamele
> 
> On Sat, 7 Dec 2019 at 19:51, Pema Galey  > wrote:
> Hi All,
> Someone recommend in sending the data from Django server to SAP server which 
> interprets in XML format.
> 
> 
> 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/8e4e2355-bb3b-4695-9770-a18c20249fd0%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/CAH9mneVb0Hve4q9QoxxuvA8fmOZcy%2B35JrL7fg6fSOmx-WnzxA%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/5D0984F4-A70C-4D57-8AE4-5F15649C053D%40gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Daniel Hepper
It should be {% url 'polls:detail' question.id %}

I think you mixed up the steps "Removing hardcoded URLs in templates" and
"Namespacing URL names"

Hope that helps,
Daniel

On Tue, Dec 10, 2019 at 11:58 AM Bruckner de Villiers <
bruckner.devilli...@gmail.com> wrote:

> Running Django 3.0 & Python 3.7.3.
>
>
>
> Issue with Tutorial Part 3:
>
> I replaced “<*li*><*a* href="/polls/{{ question.id }}/">{{ 
> question.question_text }}” with
>
> “<*li*><*a* href="{% *url* 'detail' question.id %}">{{ question.question_text 
> }}” and get the following error:
>
> Reverse for 'detail' not found. 'detail' is not a valid view function or 
> pattern name.
>
> http://question.id> %}*">{{
> question.question_text }}
>
> index.html:
>
> {% if latest_question_list %}
>
> 
>
> {% for question in latest_question_list %}
>
> *{% comment %} http://question.id> }}/">{{ question.id  }} {{
> question.question_text }} {{ question.pub_date }} {% endcomment %}*
>
> {{ question.
> question_text }} *{% comment %} - Why doesn't this work?-->  {%
> endcomment %}*
>
> {% endfor %}
>
> 
>
> {% else %}
>
> No polls are available.
>
> {% endif %}
>
> urls.py:
>
> from os import \
>
> path
>
>
>
> from django.urls import \
>
> path
>
> from . import \
>
> views
>
>
>
> app_name = 'polls'
>
> urlpatterns = [
>
> path('', views.index, name='index'),
>
> path('/', views.detail, name='detail'),
>
> path('/results/', views.results, name='results'),
>
> path('/vote/', views.vote, name='vote'),
>
> ]
>
> views.py:
>
> from django.shortcuts import get_object_or_404, render
>
> from django.http import \
>
> HttpResponse
>
> from django.shortcuts import \
>
> render
>
> *#from django.template import loader*
>
> from .models import Question
>
>
>
> *# Create your views here.*
>
> *def* index(request):
>
> latest_question_list = Question.objects.order_by('-pub_date')[:10]
>
> context = {'latest_question_list': latest_question_list}
>
> return render(request, 'polls/index.html', context)
>
>
>
> *def* detail(request, question_id):
>
> question = get_object_or_404(Question, pk=question_id)
>
> return render(request, 'polls/detail.html', {'question': question})
>
>
>
> *def* results(request, question_id):
>
> response = "You're looking at the results of question %s."
>
> return HttpResponse(response % question_id)
>
>
>
> *def* vote(request, question_id):
>
> return HttpResponse("You're voting on question %s." % question_id)
>
>
>
> Much obliged,
>
>
>
>
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> 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/0072F811-155B-41C2-BDCD-3C529150941B%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/CAHEnUVW5AxWDmgRdvHEUYrd%3D%3D%2BFA6y4htqJjv9sJc-OkiCHQpA%40mail.gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Sencer Hamarat
Would you please replace url name with 'polls:detail', as described at
https://docs.djangoproject.com/en/3.0/topics/http/urls/#id5


Saygılarımla,
Sencer HAMARAT



On Tue, Dec 10, 2019 at 1:58 PM Bruckner de Villiers <
bruckner.devilli...@gmail.com> wrote:

> Running Django 3.0 & Python 3.7.3.
>
>
>
> Issue with Tutorial Part 3:
>
> I replaced “<*li*><*a* href="/polls/{{ question.id }}/">{{ 
> question.question_text }}” with
>
> “<*li*><*a* href="{% *url* 'detail' question.id %}">{{ question.question_text 
> }}” and get the following error:
>
> Reverse for 'detail' not found. 'detail' is not a valid view function or 
> pattern name.
>
> http://question.id> %}*">{{
> question.question_text }}
>
> index.html:
>
> {% if latest_question_list %}
>
> 
>
> {% for question in latest_question_list %}
>
> *{% comment %} http://question.id> }}/">{{ question.id  }} {{
> question.question_text }} {{ question.pub_date }} {% endcomment %}*
>
> {{ question.
> question_text }} *{% comment %} - Why doesn't this work?-->  {%
> endcomment %}*
>
> {% endfor %}
>
> 
>
> {% else %}
>
> No polls are available.
>
> {% endif %}
>
> urls.py:
>
> from os import \
>
> path
>
>
>
> from django.urls import \
>
> path
>
> from . import \
>
> views
>
>
>
> app_name = 'polls'
>
> urlpatterns = [
>
> path('', views.index, name='index'),
>
> path('/', views.detail, name='detail'),
>
> path('/results/', views.results, name='results'),
>
> path('/vote/', views.vote, name='vote'),
>
> ]
>
> views.py:
>
> from django.shortcuts import get_object_or_404, render
>
> from django.http import \
>
> HttpResponse
>
> from django.shortcuts import \
>
> render
>
> *#from django.template import loader*
>
> from .models import Question
>
>
>
> *# Create your views here.*
>
> *def* index(request):
>
> latest_question_list = Question.objects.order_by('-pub_date')[:10]
>
> context = {'latest_question_list': latest_question_list}
>
> return render(request, 'polls/index.html', context)
>
>
>
> *def* detail(request, question_id):
>
> question = get_object_or_404(Question, pk=question_id)
>
> return render(request, 'polls/detail.html', {'question': question})
>
>
>
> *def* results(request, question_id):
>
> response = "You're looking at the results of question %s."
>
> return HttpResponse(response % question_id)
>
>
>
> *def* vote(request, question_id):
>
> return HttpResponse("You're voting on question %s." % question_id)
>
>
>
> Much obliged,
>
>
>
>
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> 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/0072F811-155B-41C2-BDCD-3C529150941B%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/CACp8TZhfYfRH32oHh8Q4vFFWos9QoCXH2%3DrrjQCuxoOETjLc2A%40mail.gmail.com.


Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Running Django 3.0 & Python 3.7.3.

 

Issue with Tutorial Part 3:
I replaced “{{ question.question_text 
}}” with
“{{ question.question_text 
}}” and get the following error:
Reverse for 'detail' not found. 'detail' is not a valid view function or 
pattern name.
{{ question.question_text 
}}
index.html:
{% if latest_question_list %}

    

    {% for question in latest_question_list %}

    {% comment %} {{ question.id }} 
{{ question.question_text }} {{ question.pub_date }} {% endcomment %}

    {{ question.question_text 
}} {% comment %} - Why doesn't this work?-->  {% endcomment %}

    {% endfor %}

    

{% else %}

    No polls are available.

{% endif %}
urls.py:
from os import \

    path

 

from django.urls import \

    path

from . import \

    views

 

app_name = 'polls'

urlpatterns = [

    path('', views.index, name='index'),

    path('/', views.detail, name='detail'),

    path('/results/', views.results, name='results'),

    path('/vote/', views.vote, name='vote'),

]
views.py:
from django.shortcuts import get_object_or_404, render

from django.http import \

    HttpResponse

from django.shortcuts import \

    render

#from django.template import loader

from .models import Question

 

# Create your views here.

def index(request):

    latest_question_list = Question.objects.order_by('-pub_date')[:10]

    context = {'latest_question_list': latest_question_list}

    return render(request, 'polls/index.html', context)

 

def detail(request, question_id):

    question = get_object_or_404(Question, pk=question_id)

    return render(request, 'polls/detail.html', {'question': question})

 

def results(request, question_id):

    response = "You're looking at the results of question %s."

    return HttpResponse(response % question_id)

 

def vote(request, question_id):

    return HttpResponse("You're voting on question %s." % question_id)

 
Much obliged,
 
 

 

Bruckner de Villiers

083 625 1086

-- 
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/0072F811-155B-41C2-BDCD-3C529150941B%40gmail.com.