Re: Django how get Post details using slug

2020-07-04 Thread arman hossain
please try On Sat, Jul 4, 2020 at 9:38 AM Tanni Seriki wrote: > Thanks sir, I will make changes. > I really appreciate your time and effort in helping me out with this > Thanks > > On Fri, Jul 3, 2020, 11:14 PM coolguy > wrote: > >> One more thing. if your view code is indented exactly the way

Django how to get post details of a post using slug

2020-07-03 Thread Tanni Seriki
Please family, help me out in solving my project. How to use slug to get post details. Here is all my files -- 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

Re: Django how get Post details using slug

2020-07-03 Thread Tanni Seriki
Thanks sir, I will make changes. I really appreciate your time and effort in helping me out with this Thanks On Fri, Jul 3, 2020, 11:14 PM coolguy wrote: > One more thing. if your view code is indented exactly the way it is in the > provided then you need to fix the indentation of > > def post_d

Re: Django how get Post details using slug

2020-07-03 Thread coolguy
One more thing. if your view code is indented exactly the way it is in the provided then you need to fix the indentation of def post_details_view(request, post): This should be under class SearchResultsViews() like this... class SearchResultsViews(ListView): model = Post template_name

Re: Django how get Post details using slug

2020-07-03 Thread coolguy
if the new urls is the main url then its not correctly setup. you have to mention the app name Let assume you are app name 'student' in your project. So the main urls.py will have it as follow: path('students/', include(students.urls), This way you are telling Django to handover all the requ

Re: Django how get Post details using slug

2020-07-03 Thread Tanni Seriki
Please let me know if you have seen the file. Am sorry am sending it to you as file, my phone is malfunctioning On Fri, Jul 3, 2020, 9:49 PM Tanni Seriki wrote: > Sir here it's all the project, currently my phone camera has fault please > help me out. > > On Fri, Jul 3, 2020, 9:23 PM coolguy >

Re: Django how get Post details using slug

2020-07-03 Thread Tanni Seriki
Sir here it's all the project, currently my phone camera has fault please help me out. On Fri, Jul 3, 2020, 9:23 PM coolguy wrote: > I am away at this time but can you send the project urls.py screen shot as > well. > > On Friday, July 3, 2020 at 4:09:01 PM UTC-4, Tanni Seriki wrote: >> >> Here

Re: Django how get Post details using slug

2020-07-03 Thread coolguy
I am away at this time but can you send the project urls.py screen shot as well. On Friday, July 3, 2020 at 4:09:01 PM UTC-4, Tanni Seriki wrote: > > Here is my WhatsApp number > +2348095594236 > Please I really need to solve this out > > On Fri, Jul 3, 2020, 9:07 PM Tanni Seriki > wrote: > >> C

Re: Django how get Post details using slug

2020-07-03 Thread Tanni Seriki
Coolguy Please can we chat on WhatsApp... The post details is really giving me headache, please help out On Fri, Jul 3, 2020, 9:04 PM coolguy wrote: > Seems pretty simple unless you have specific question about something. > > You have a model which has some fields including Slug field which shou

Re: Django how get Post details using slug

2020-07-03 Thread Tanni Seriki
Here is my WhatsApp number +2348095594236 Please I really need to solve this out On Fri, Jul 3, 2020, 9:07 PM Tanni Seriki wrote: > Coolguy > Please can we chat on WhatsApp... > The post details is really giving me headache, please help out > > On Fri, Jul 3, 2020, 9:04 PM coolguy > wrote: > >>

Re: Django how get Post details using slug

2020-07-03 Thread coolguy
Seems pretty simple unless you have specific question about something. You have a model which has some fields including Slug field which should be unique i.e. unique=True but your screen shot is not clear.. In views you are overriding the get_queryset() method of base class and assigning it to

Re: Django restapi get post

2018-09-12 Thread PASCUAL Eric
l send for a POST. Eric From: django-users@googlegroups.com on behalf of TimT Vogt Sent: Wednesday, September 12, 2018 11:04:39 AM To: django-users@googlegroups.com Subject: Django restapi get post Hi Group I am making an Django backend to out data with a r

Django restapi get post

2018-09-12 Thread TimT Vogt
Hi Group I am making an Django backend to out data with a rest API to angular frontend. The rest-API/ GET works😀. The POST: do I ajust the current serializer? Or do I need to create another serializer in ABN New app with a recieving model? Verstuurd vanaf mijn iPhone -- You received this messa

Re: How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-19 Thread SHINTO PETER
Thank you James Schneider & Andrew Farrell On Wednesday, 18 March 2015 21:46:33 UTC+5:30, SHINTO PETER wrote: > > How to make request ie GET/POST to soap (windows web service ) in Django? > -- You received this message because you are subscribed to the Google Groups "Djang

Re: How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-18 Thread James Schneider
2015 at 11:16 AM, SHINTO PETER > wrote: > >> How to make request ie GET/POST to soap (windows web service ) in Django? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe

Re: How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-18 Thread Andrew Farrell
Based on a brief search but no personal experience, SUDS <https://fedorahosted.org/suds/wiki/Documentation> looks like the best python library for making requests to an existing SOAP server. On Wed, Mar 18, 2015 at 11:16 AM, SHINTO PETER wrote: > How to make request ie GET/POST

How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-18 Thread SHINTO PETER
How to make request ie GET/POST to soap (windows web service ) in Django? -- 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-user

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-13 Thread sbrandt
Sorry, answered directly to author by accident. Isn't this achieved by using class based views? from django.views.generic import View class MyView(View): def get(request, *args, **kwargs) ... def post(request, *args, **kwargs) ... In addition, you can use the built-in

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-11 Thread John Yeukhon Wong
, > such as Rails. > > Personally I would prefer a more "native" way in Django to separate > GET/POST views. I guess this could be done via a decorator or something. > > Another reason you may want to separate GET/POST is for security. For > example, only lett

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-10 Thread Kevin
Separating GET and POST is normally used for RESTful web programming. Which is becoming a very common practice is popular competing frameworks, such as Rails. Personally I would prefer a more "native" way in Django to separate GET/POST views. I guess this could be done via a de

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-10 Thread andrea mucci
hi this is something personal choice i prefer to check GET and POST directly from the view method, but in some case is useful to part the GET and the POST view for readable and clean coding El 11/04/2012, a las 01:21, John Yeukhon Wong escribió: > 3/4 down the page > http://www.djangobook.com

Is it a good practice to delegate views based on GET / POST?

2012-04-10 Thread John Yeukhon Wong
3/4 down the page http://www.djangobook.com/en/2.0/chapter08/ urlpatterns = patterns('', # ... (r'^somepage/$', views.method_splitter, {'GET': views.some_page_get, 'POST': views.some_page_post}), # ... ) Is this a good practice at all? If I use the method splitter, my urls will look ugly. Or s

Re: This is nuts why dont I get POST?

2011-08-31 Thread MikeKJ
jango-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- View this message in context: http://old.nabble.com/This-is-nuts-why-dont-I-get-POST--tp32372381p32372666.html Sent from the django-u

Re: This is nuts why dont I get POST?

2011-08-31 Thread Tom Evans
On Wed, Aug 31, 2011 at 3:06 PM, MikeKJ wrote: > Incorrectly formatted tag, browser falls back to default method, which is GET. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@go

This is nuts why dont I get POST?

2011-08-31 Thread MikeKJ
) return HttpResponseRedirect('/cost-and-earnings-calculator/') else: form = CaptureForm(request.POST) else: form = CaptureForm() try: content = SmartPage.objects.get(slug="calculator") except SmartPage.DoesNotExist: content

Re: GET/POST

2011-05-24 Thread egilchri
Thanks for those pointers. I think I'll have to try using something like csrf_exempt(). The reason is, I'm working with an API (It's for a voice application), and the API works as follows. You create an app, that among other things, is able to take apart the "session" data that is initially posted

Re: GET/POST

2011-05-24 Thread Amit Sethi
I think this is csrfmiddleware issue . Just add {% csrf_token %} like this {% csrf_token %} -- A-M-I-T S|S -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe fro

Re: GET/POST

2011-05-23 Thread AJ
Just FYI: 403: http://en.wikipedia.org/wiki/HTTP_403 404: http://en.wikipedia.org/wiki/HTTP_404 On Mon, May 23, 2011 at 10:49 PM, Gabriel Gunderson wrote: > On Mon, May 23, 2011 at 8:04 PM, egilchri wrote: > > I am really new to Django. I've set up an Apache server with > > mod_wsgi,and Django

Re: GET/POST

2011-05-23 Thread Gabriel Gunderson
On Mon, May 23, 2011 at 8:04 PM, egilchri wrote: > I am really new to Django. I've set up an Apache server with > mod_wsgi,and Django, and I've hit what is probably a common > roadblock. Welcome. Hope you enjoy your time spent with Django! > When I use "curl" to invoke a url using GET, it work

GET/POST

2011-05-23 Thread egilchri
I am really new to Django. I've set up an Apache server with mod_wsgi,and Django, and I've hit what is probably a common roadblock. When I use "curl" to invoke a url using GET, it works just fine. But when I invoke it using POST, I get a 403 error: curl http://web1.tunnlr.com:x/wsgi-scripts/

Form fields intial from http GET/POST.

2011-01-27 Thread hollando
I want to make things simple and following django style. So here's my question In the view, I have one form for search input and one pagination table list results. The form has quite some fields mostly CharField. When submit http POST/GET, I want to update table list, but don't want to clean up my

Re: Django Get/POST problem

2009-02-05 Thread Aldo
Thomas, Thanks for that. I figured it out on my own. Just thought maybe there was a standard way of doing it without usng a Redirect like that. Suppose not Thanks On Feb 3, 11:14 am, Thomas Guettler wrote: > Hi, > > I would use the forms library, even if the form has only one input element. >

Re: Django Get/POST problem

2009-02-03 Thread Thomas Guettler
Hi, I would use the forms library, even if the form has only one input element. I would use django.http.HttpResponseRedirect() to the list view, after successful deletion. Aldo schrieb: > Hi folks, > > MY URL is x.y.z/list > It shows a list of objects. They have link buttons to delete/update >

Django Get/POST problem

2009-02-03 Thread Aldo
Hi folks, MY URL is x.y.z/list It shows a list of objects. They have link buttons to delete/update for each object. When I click delete for an object I go to a URL via POST with the object id in the url This brings me to a "Are you sure you want to delete this object page". MY URL is x.y.z/list/

Re: How do I get POST variables in my template

2006-01-27 Thread tonemcd
Thanks for the pointer Jeremy, but that was one of the first places I looked ;) - I made *real* sure that my action had a '/' at the end of it... Cheers, Tone

Re: How do I get POST variables in my template

2006-01-26 Thread Jeremy Dunck
On 1/26/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > If your request.POST is displayed as , that means > request.POST is empty. If request.POST had something in it, it'd look > like this: > > And it might me you've run into a newbie hole http://code.djangoproject.com/wiki/NewbieMistake

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
* thud! * - the sound of a rather large penny dropping. Many many thanks Adrian, it's making a *lot* more sense now (how on earth did I miss that page in the docs!) I *think* that the reason why my request.POST was coming though as empty (even when I clicked submit) is that I had no name for my

Re: How do I get POST variables in my template

2006-01-26 Thread Adrian Holovaty
On 1/26/06, tonemcd <[EMAIL PROTECTED]> wrote: > Essentially, I used to have statements like this some_variable_from_my_form> sprinkled around my pages to check that > form-based variables where being passed through correctly. Zope put > into a namespace called 'form', but also made them availabl

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Hello again Amit, I'm trying to get the Zen of Django, by using methods I used to use in Zope ;) Essentially, I used to have statements like this sprinkled around my pages to check that form-based variables where being passed through correctly. Zope put into a namespace called 'form', but also

Re: How do I get POST variables in my template

2006-01-26 Thread Amit Upadhyay
On 1/27/06, tonemcd <[EMAIL PROTECTED]> wrote: Cheers Eric, but 'debug' doesn't seem to work in an intuitive way - atleast to me ;)e.g.{% debug %}Hi tonemcd, What exactly are you trying to do? If you just want to inspect the variables passed to view code, why dont you use a  "assert False" somewher

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Cheers Eric, but 'debug' doesn't seem to work in an intuitive way - at least to me ;) e.g. {% debug %} dumps this into the page {'block': It is '>, ,

Re: How do I get POST variables in my template

2006-01-26 Thread Eric Walstad
On Thursday 26 January 2006 09:43, tonemcd wrote: > I guess what I was after was functionality like in > Zope, where the entire HTTP Request object is dumped, along with > environment and other variables. GET and POST are all expanded out too. > With the Zope PageTemplate code that Stefan contrib

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Thanks for the info 'the.ech0' - it seems that's what I have to do. I guess what I was after was functionality like in Zope, where the entire HTTP Request object is dumped, along with environment and other variables. GET and POST are all expanded out too. With the Zope PageTemplate code that Ste

Re: How do I get POST variables in my template

2006-01-26 Thread [EMAIL PROTECTED]
you have to loop over the variable to display elements from the dict or just pass in the value you want to from the post. return render_to_response('resources/index', { 'request': request, 'foo': request.POST["foo"], 'mes

Re: How do I get POST variables in my template

2006-01-26 Thread [EMAIL PROTECTED]
you have to loop over the variable to display elements from the dict or just pass in the value you want to from the post. return render_to_response('resources/index', { 'request': request, 'foo': request.POST["foo"], 'mes

How do I get POST variables in my template

2006-01-26 Thread tonemcd
Hi all, This is probably going to sound really silly, but when I'm debugging, I just can't easily output the contents of request.POST and request.GET into my templates. I have tried this; return render_to_response('resources/index', { 'request': request,