[novice question] Render a list of objects

2019-06-21 Thread Sudeep Gopal
Hello, I am new to django. I am using django forms in my project and I am not using django models. >From the user, my django form asks for 4 inputs :- signal_to_noise_1 , signal_to_noise_2, bandwidth1 and bandwidth2. Based on these values I use my look up table and I create a results whi

Update using columns from subquery

2019-06-21 Thread Dean Rabinowitz
I'm new to the community (this is my first topic here) so I apologize if I'm breaking any rules with this post. My goal is to update a table in my Postgres db using the values from a queryset only where some of the values are equal to the columns in my table. Essentially, I'd like to do the fol

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Héctor Alonso Lozada Echezuría
Of course, Share your source code and stack trace through pastebin El vie., 21 jun. 2019 a las 13:34, Lutalo Bbosa joseph () escribió: > am trying to figure it out but when i > print(product_id) > print(type(product_id)) i get this output > 1 > , so probably its because i cant iterate over a s

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Lutalo Bbosa joseph
am trying to figure it out but when i print(product_id) print(type(product_id)) i get this output 1 , so probably its because i cant iterate over a string but am still failing to figure it out On Fri, Jun 21, 2019 at 10:16 PM Lutalo Bbosa joseph wrote: > hi hector, can u help me fix it, coz am

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Lutalo Bbosa joseph
hi hector, can u help me fix it, coz am kinda puzzled On Fri, Jun 21, 2019 at 9:56 PM Héctor Alonso Lozada Echezuría < ima...@gmail.com> wrote: > Apparently product_id has no value > > product_id = request.POST.get("product_id") > print(product_id) > print(type(product_id)) > > > El vie., 21 j

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Héctor Alonso Lozada Echezuría
Apparently product_id has no value product_id = request.POST.get("product_id") print(product_id) print(type(product_id)) El vie., 21 jun. 2019 a las 6:33, Lutalo Bbosa joseph () escribió: > hi guys, am working on an ecommerce system, which has cart as an app, but > i keep on getting this error

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Lutalo Bbosa joseph
ValueError at /carts/update/ invalid literal for int() with base 10: '' thats the error On Fri, Jun 21, 2019 at 7:46 PM Jorge Gimeno wrote: > Would you be able to copy and paste the stack trace here? Without that, > it's really hard to see where this exception is coming from. > > -Jorge > > On

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Jorge Gimeno
Would you be able to copy and paste the stack trace here? Without that, it's really hard to see where this exception is coming from. -Jorge On Fri, Jun 21, 2019 at 9:13 AM Lutalo Bbosa joseph wrote: > here is my template that handles that bit, and i have as well attached > atemplate in which it

same error

2019-06-21 Thread Lutalo Bbosa joseph
thiValueError: invalid literal for int() with base 10: '' s is the error that is returned -- 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..

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Aldian Fazrihady
Does the stack trace mention a template variable name? It looks like a template variable that is expected to have integer value is not properly initialized. Regards, Aldian Fazrihady On Fri, 21 Jun 2019, 22:42 Lutalo Bbosa joseph, wrote: > i as well have a models.py file for carts, and produc

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Lutalo Bbosa joseph
on pressing remove the product is supposed to be removed from the cart, but it instead displays an error On Fri, Jun 21, 2019 at 6:34 PM Lutalo Bbosa joseph wrote: > well here is apic of what am doing, > > On Fri, Jun 21, 2019 at 6:20 PM Ahmed Ishtiaque > wrote: > >> Hi Lutalo, >> >> Could you

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Ahmed Ishtiaque
Hi Lutalo, Could you also share the stacktrace of the error and when it happens? It would help us decipher what's really going on in relation to what you're trying to do. Best, Ahmed On Fri, Jun 21, 2019 at 8:33 AM Lutalo Bbosa joseph wrote: > hi guys, am working on an ecommerce system, which

Re: [Model, ORM] Disabling a field before actually removing it

2019-06-21 Thread George Silva
The answer is indeed to split this into steps. First step is to allow the field to be nullable if it's not already. Deploy. Then you create a new deploy (not PR) that stops using the field altogether from all the codebase. You can remove the reference to the field or comment it out. Do not `makem

Re: invalid literal for int() with base 10: ''

2019-06-21 Thread anchal agarwal
Hello lutalo I am also facing the same issue. If you find any solution please let me know . It would be very helpful. Thank you hi guys, am working on an ecommerce system, which has cart as an app, but i keep on getting this error and cant move on any help, here is my views.py , from the commandlin

Re: Job board app based in django

2019-06-21 Thread Simon A
Oh really? Yeah I guess it wont be too bad if I create one. On Fri, Jun 21, 2019 at 6:56 PM Omar Abou Mrad wrote: > There are problem N clones of job boards built with django, this shouldn't > affect your decision to create one. > > On Fri, Jun 21, 2019 at 10:59 AM Simon A wrote: > >> hey guys,

Re: Can we create a Rest Api in Django which can able to communicate with multiple databases(Relational, Non relational) dynamically. If yes please recommend me a way to do that

2019-06-21 Thread Chetan Ganji
If it is one time selection like storing in a user level settings, you can store the database to use in user model i.e. you have to customize default Usermodel in django and add one extra field to store the db type of the current user. Then access the right db Author.objects.using(request.user.da

Re: Question about makemigrations

2019-06-21 Thread Rob W
"Migrate is basically the old syncdb but it takes into account all the migrations made by makemigrations. You should run the command -migrate- after adding a new app under the INSTALLED APPS section in the settings.py file in order to synchronize the database state with your current set of model

Re: Question about makemigrations

2019-06-21 Thread Martin Kong
Hello I make python manage.py migrate instead,but that should be the next step tho Regards Martin On Fri, 21 Jun 2019 at 7:45 PM, Sebastian Jung wrote: > Hello, > > Do you make python3 manage.py migrate after makemigrations? > > Regards > > Martin Kong schrieb am Fr., 21. Juni 2019, 13:25: >

Re: Question about makemigrations

2019-06-21 Thread Sebastian Jung
Hello, Do you make python3 manage.py migrate after makemigrations? Regards Martin Kong schrieb am Fr., 21. Juni 2019, 13:25: > Hello > I am new to django, and i am following the tutorial provide in github, > from the tutorial. > The tutorial I am following is > https://github.com/django/django

Re: REST API social authentication

2019-06-21 Thread Aldian Fazrihady
If I want to use Facebook, Twitter, or Google login, I will use social-auth-app-django Regards, Aldian Fazrihady On Fri, 21 Jun 2019, 15:51 pastrufazio, wrote: > > Hi all, > > I need to implement social authentication in my set of REST API. > > I did some googling and found sever modules, e.g

Can we create a Rest Api in Django which can able to communicate with multiple databases(Relational, Non relational) dynamically. If yes please recommend me a way to do that

2019-06-21 Thread anilkumar sangu
Hello, I am working on Django I have a scenario like I want to connect multiple databases. based on user selection. if user selects MySql from front end my Api could able to connect MySql. if user select postgreSql my api could able to connect to postgreSql based on user selection dynamicall

Question about makemigrations

2019-06-21 Thread Martin Kong
Hello I am new to django, and i am following the tutorial provide in github, from the tutorial. The tutorial I am following is https://github.com/django/django/blob/master/docs/intro/tutorial02.txt and start from 227, it shows the following instructions: .. console:: $ python manage.py makemigra

Re: Job board app based in django

2019-06-21 Thread Omar Abou Mrad
There are problem N clones of job boards built with django, this shouldn't affect your decision to create one. On Fri, Jun 21, 2019 at 10:59 AM Simon A wrote: > hey guys, > > I would like to develop a job board app based in django. I was wondering > if there is already an available job board app

REST API social authentication

2019-06-21 Thread pastrufazio
Hi all, I need to implement social authentication in my set of REST API. I did some googling and found sever modules, e.g. django-rest-framework-social-oauth2 social-auth-app-django django-rest-social-auth rest-social-auth Can you please recommend me a proper way to deal this? I'm quite a ne

Re: Wrong Redirect

2019-06-21 Thread ramadhan ngallen
hello still it redirect to the wrong path http://127.0.0.1:8000/users/register/register On Thu, Jun 20, 2019 at 12:24 PM Sipum Mishra wrote: > Hi Ramadhan, > > Instead of rendering to any page please use HttpResponseRedirect('put home > page url where u want to redirect' ). > > And also import d

Re: How to store a bank account number generated into a model field

2019-06-21 Thread Simon A
I think the except block won't trigger since if the code Profile.objects.get(user=request.user) does not get any results, it will return a null result, not throw exception. instead of exception handling, just check if the return value is null or not -- You received this message because you are

Re: [Urgent] 500 when requesting a file from browser.

2019-06-21 Thread Simon A
On the last part of your stacktrace, there is a section File "/usr/lib/python3.6/wsgiref/simple_server.py", line 35, in close self.status.split(' ',1)[0], self.bytes_sent could you please check this line out? you can try to print what is *self.status *to check what it is trying to split

Job board app based in django

2019-06-21 Thread Simon A
hey guys, I would like to develop a job board app based in django. I was wondering if there is already an available job board app based in django like jobberbase. There is a jobberbase clone made from django but its version too old already. thank you, Simon -- You received this message becau