pass a parameter into sql raw string and execute django

2020-12-19 Thread Ronald Kamulegeya
I want to pass parameter in view and i execute the insert query as shown below. I have searched and failed to get a solution. Any hints. Here is the code. My attempt is shown but not correct. def post_payroll(request,p_id): p_id=2 with connection.cursor() as cursor: query = "in

Re: hello guys, help me please, I could not associate username to a post

2020-12-15 Thread Ronald Kamulegeya
Hi, use Obj.save() Instead of Form.save() On Tue, Dec 15, 2020, 21:25 Chelsea Fan wrote: > [image: image.png] > > -- > 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 > e

Re: Additional data added to the HTTP Get Request.

2020-05-09 Thread Ronald Kamulegeya
It is true! I have spend whole morning trouble shooting it! Thanks so much! On Sat, May 9, 2020 at 12:10 PM Shaheed Haque wrote: > I think you are missing a closing double quote on your data-url. > > On Sat, 9 May 2020, 09:59 Ronald Kamulegeya, < > ronald.kamulegeya.2...@g

Re: Additional data added to the HTTP Get Request.

2020-05-09 Thread Ronald Kamulegeya
Found out the cause of my troubles New Tenant I was missing " ...OMG...now working! On Sat, May 9, 2020 at 11:58 AM Ronald Kamulegeya < ronald.kamulegeya.2...@gmail.com> wrote: > Hello Members. > > I am a django beginner and i am going trough online t

Additional data added to the HTTP Get Request.

2020-05-09 Thread Ronald Kamulegeya
Hello Members. I am a django beginner and i am going trough online tutorials. I have the following view functions: # Create your views here. def save_tenant_form(request, form, template_name): data = dict() if request.method == 'POST': if form.is_valid(): form.save()

Re: Django URL routing

2020-05-07 Thread Ronald Kamulegeya
Hi Roseman, Your comment pointed me to the right direction. I have finally cracked the mystery! Thanks so much! On Thursday, May 7, 2020 at 5:17:22 PM UTC+3, Ronald Kamulegeya wrote: > > Here is my attempt at creating unique path: > Still i get page not found error. The index pa

Re: Django URL routing

2020-05-07 Thread Ronald Kamulegeya
ns = [ path('', include('rentals.urls',namespace='rentals')), path('admin/', admin.site.urls), On Thursday, May 7, 2020 at 3:53:44 PM UTC+3, Ronald Kamulegeya wrote: > > Hello Roseman, > Please suggest how i can code the different Urls. &g

Re: Django URL routing

2020-05-07 Thread Ronald Kamulegeya
Hello Roseman, Please suggest how i can code the different Urls. On Thursday, May 7, 2020 at 3:24:28 PM UTC+3, Daniel Roseman wrote: > > You have multiple URLs that are the same path. That can't work. One URL > maps to one view. > -- > DR. > > On Thursday, 7 May 2