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 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d607f1a0-9774-4442-82b8-a0431e078c76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/32301b79-8595-4f02-8464-ac855499c13b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a5b3fa33-767b-49fe-b0be-41b94947ac89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 django.http import HttpResponseRedirect
>
> Do the above & let me know. I hope it will work.
>
> On Thu, 20 Jun, 2019, 2:41 PM ramadhan ngallen, 
> wrote:
>
>> Hello Team
>> I created an app(called users) for user registration
>> If user enter two mismatched password an app should redirect to the same
>> page. otherwise it should redirect to the homepage
>> Unfortunately when user enter two mismatched password it redirect to the
>> wrong url http://127.0.0.1:8000/users/register/register
>> and also if user enter matched password it also redirect to the wrong url
>> http://127.0.0.1:8000/users/register/register
>>
>>  its view.py
>> from django.shortcuts import render, redirect
>> from django.contrib.auth.models import User, auth
>>
>>
>> # Create your views here.
>>
>>
>> def register(request):
>>
>> if request.method == 'POST':
>> first_name = request.POST['first_name']
>> first_name = first_name.title
>> last_name = request.POST['last_name']
>> last_name = last_name.title
>> username = request.POST['username']
>> password1 = request.POST['password1']
>> password2 = request.POST['password2']
>> email = request.POST['email']
>> if password1 == password2:
>> user = User.objects.create_user(
>> username=username, first_name=first_name, last_name=last_name, email=email,
>> password=password1)
>>
>> user.save()
>> print('user created')
>> return redirect('/travello/')
>>
>> else:
>> return render(request, 'users/register.html')
>>
>> else:
>> return render(request, 'users/register.html')
>> I have also created its urls.py as follows
>> from . import views
>> from django.urls import path
>>
>>
>> app_name = 'users'
>>
>> *urlpatterns = [*
>> * path('register/', views.register, name='register'),*
>> ]
>>
>> Settings.py
>> INSTALLED_APPS = [
>> * 'users.apps.UsersConfig',*
>> 'travello.apps.TravelloConfig',
>> 'calc.apps.CalcConfig',
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> user app directory
>>
>> [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
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAAhXuBF07Q72_mi1AfPJ5LHHmaEdd5PhvQ79ToqSvpEt0gCivg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGHZBzx-XO4S58msQB%3DJmV9UAgDJmfk7dDOco2JZr4uXQer%3DYQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAhXuBGWZWtvpvXPg8U_Zj6VKFa2sqSJXNKUcx9N9K%3DoM-wbLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 newbie in Django, so any advice and suggestions will be greatly 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e4f933b6-04e2-4f5a-bf7b-5fb1eaaa719b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d607f1a0-9774-4442-82b8-a0431e078c76%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFwtXp3puf1iUHge8BTHYVJSB2RUzJefBY36%2Bc4dBL0rDOqB3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 makemigrations polls
You should see something similar to the following:
.. code-block:: text
Migrations for 'polls':
polls/migrations/0001_initial.py:
- Create model Choice
- Create model Question
- Add field question to choice
However, after following the steps
I'm missing the last sentence (Add field question to choice) .

The below is what i had written in model.py, did i make something wrong?

Thanks

from django.db import models

class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text =  models.CharField(max_length=200)
votes = models.IntegerField(default=0)Thanks

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADEd1fars051JXymX0sbktNqKYak%2Bejv9uc2fGxxxbJe2Cnp1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 dynamically. how to achieve this in Django Rest Api

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/50a8fe84-0966-4b2c-bcf4-725f75a78609%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.
>
> 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 newbie in Django, so any advice and suggestions will be
> greatly 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e4f933b6-04e2-4f5a-bf7b-5fb1eaaa719b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAZdAGSHFNox2_1YZpKErNQH%3Dfz%3D%3Dgi08UxZ4VR66iP00w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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/blob/master/docs/intro/tutorial02.txt
>
> and  start from 227, it shows the following instructions:
>
> .. console::
> $ python manage.py makemigrations polls
> You should see something similar to the following:
> .. code-block:: text
> Migrations for 'polls':
> polls/migrations/0001_initial.py:
> - Create model Choice
> - Create model Question
> - Add field question to choice
> However, after following the steps
> I'm missing the last sentence (Add field question to choice) .
>
> The below is what i had written in model.py, did i make something wrong?
>
> Thanks
>
> from django.db import models
>
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> class Choice(models.Model):
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text =  models.CharField(max_length=200)
> votes = models.IntegerField(default=0)Thanks
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADEd1fars051JXymX0sbktNqKYak%2Bejv9uc2fGxxxbJe2Cnp1w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKGT9mw6VfP_Ftrsz8iAGtXQ3mDXfeOgOxz7MfuYvejTNko8Gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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:
>
>> 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 makemigrations polls
>> You should see something similar to the following:
>> .. code-block:: text
>> Migrations for 'polls':
>> polls/migrations/0001_initial.py:
>> - Create model Choice
>> - Create model Question
>> - Add field question to choice
>> However, after following the steps
>> I'm missing the last sentence (Add field question to choice) .
>>
>> The below is what i had written in model.py, did i make something wrong?
>>
>> Thanks
>>
>> from django.db import models
>>
>> class Question(models.Model):
>> question_text = models.CharField(max_length=200)
>> pub_date = models.DateTimeField('date published')
>>
>> class Choice(models.Model):
>> question = models.ForeignKey(Question, on_delete=models.CASCADE)
>> choice_text =  models.CharField(max_length=200)
>> votes = models.IntegerField(default=0)Thanks
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CADEd1fars051JXymX0sbktNqKYak%2Bejv9uc2fGxxxbJe2Cnp1w%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKGT9mw6VfP_Ftrsz8iAGtXQ3mDXfeOgOxz7MfuYvejTNko8Gw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADEd1fZCnF4B%3DqNB14jqzW16pZ8BqFfMqr4PJBuy_BiwxTpxgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 models.”



> On Jun 21, 2019, at 7:49 AM, Martin Kong  wrote:
> 
> 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 mailto:cok...@gmail.com>> 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/blob/master/docs/intro/tutorial02.txt 
> 
> 
> and  start from 227, it shows the following instructions:
> 
> 
> .. console::
> 
> $ python manage.py makemigrations polls
> 
> You should see something similar to the following:
> 
> .. code-block:: text
> 
> Migrations for 'polls':
>   polls/migrations/0001_initial.py:
> - Create model Choice
> - Create model Question
> - Add field question to choice
> 
> However, after following the steps 
> I'm missing the last sentence (Add field question to choice) .
> 
> The below is what i had written in model.py, did i make something wrong?
> 
> Thanks
> from django.db import models
> 
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
> 
> class Choice(models.Model):
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text =  models.CharField(max_length=200)
> votes = models.IntegerField(default=0)Thanks
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CADEd1fars051JXymX0sbktNqKYak%2Bejv9uc2fGxxxbJe2Cnp1w%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAKGT9mw6VfP_Ftrsz8iAGtXQ3mDXfeOgOxz7MfuYvejTNko8Gw%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CADEd1fZCnF4B%3DqNB14jqzW16pZ8BqFfMqr4PJBuy_BiwxTpxgA%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and 

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.database).all()

OR

Author.objects.using('mysql').all()

Author.objects.using('postgresql').all()

You might have to use the database routers also. It depends on your
detailed requirements.


Official docs -
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/

Cheers!


Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Fri, Jun 21, 2019 at 4:55 PM anilkumar sangu 
wrote:

> 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 dynamically. how to achieve this in Django Rest Api
>
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/50a8fe84-0966-4b2c-bcf4-725f75a78609%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKMUjuH_j_OGDpLQfQQZ8EqChRTXXvutNb%3DK%2BJEv76QJeQmFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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,
>>
>> 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 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d607f1a0-9774-4442-82b8-a0431e078c76%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/q8HFtDGwq-A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFwtXp3puf1iUHge8BTHYVJSB2RUzJefBY36%2Bc4dBL0rDOqB3A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Kind Regards,
Simon Arriola

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABXH83rpCgOrSoSScQvqZvTMS%3DeeOFWRvKDGVWjwYuWDf3cbvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 commandline the error is on line 42

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%
40mail.gmail.com

.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMT%3DisUkQszjKE0GjvQsi5czm77wbfjd906w8kepKd4nXFv--Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 `makemigrations`. Deploy.

Create the last step, which is the migration to drop the field from the
database.

On Thu, Jun 20, 2019 at 6:20 PM Matthieu Rudelle 
wrote:

> Thank you for the quick answer, although I am not sure what the second
> step mean and how it actually solves the problem?
>
> The missing column error appears even when no backward migration is
> called. Both version of the app run side by side, both connected to a
> single DB migrated with the new code. So when the 3 step is called, the
> older release will fail.
>
> Best,
> Matthieu
>
> On Thursday, June 20, 2019 at 3:07:54 PM UTC+2, Aldian Fazrihady wrote:
>>
>> My solution to this problem was by adding more migrations steps:
>> 1. Step to make the field nullable.
>> 2. Backward step to fill value to the removed field.
>> 3. Step to remove the field.
>>
>> Regards,
>>
>> Aldian Fazrihady
>>
>>
>> On Thu, 20 Jun 2019, 19:37 Matthieu Rudelle,  wrote:
>>
>>> Hi there!
>>>
>>> I am about to file a feature request but I figured this might have been
>>> discussed (although I can't find where).
>>>
>>> The use case is when removing fields in a production environment. We run
>>> our django migrations without downtimes, such that basically, from time to
>>> time we have an old release working on an DB migrated by the new release.
>>>
>>> And when we remove a field it breaks. So we're thinking there should be
>>> a way to flag a field as "disabled", its value will not be requested on the
>>> DB and default to a hardcoded value. No migration should remove the column
>>> yet. Once the field is actually removed the column can be safely removed
>>> without breaking the old version.
>>>
>>> What do you guys think? Is there a better way to solve this?
>>>
>>> *Note: a slightly different usecase that it could solve, the third item
>>> on this wishlist: *
>>> https://pankrat.github.io/2015/django-migrations-without-downtimes/#django-wishlist
>>>
>>> Best,
>>> Matthieu
>>>
>>> --
>>> 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 post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CANP1NSx%3DRu63c2vR4R%3DfbtBEHV3WRqf1XxWtN%3Dd23j3VoA-ZZw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/420f1671-2c31-428b-b96b-02f840df2df5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
George R. C. Silva

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGyPVTt9BUXWd%3Df-myfD7OVQbwUy8s8ziUa22wM_07P1GK7PZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 commandline the error is on line 42
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 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 commandline the error is on line 42
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DT-Gp4AYzdaL_otXru--naTAoQErJbzQxCSiS4a0Tn2iw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 products which is attached,
> when i try to search for a solution on stack overflow,all solutions insist
> on problem with integers and strings in my code. though these were passed
> solutions and not too similar to this one
>
> On Fri, Jun 21, 2019 at 6:35 PM Lutalo Bbosa joseph 
> wrote:
>
>> 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 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 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 commandline the error is on line 42
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR7b_mpnBw_xLKW%2BX5jyVk4CKXm7jwVG37R8BsSPQQegg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAbag_or9TPOb-KiYCmaD%2B4DDyG%2ByUfU%3DPzVRfacU09GNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DQVv_1EBOCkUBV%2BSMKULoda6BEzG691CyzFUuLrQo_GEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 its used
>
> On Fri, Jun 21, 2019 at 6:59 PM Aldian Fazrihady 
> wrote:
>
>> 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 products which is
>>> attached, when i try to search for a solution on stack overflow,all
>>> solutions insist on problem with integers and strings in my code. though
>>> these were passed solutions and not too similar to this one
>>>
>>> On Fri, Jun 21, 2019 at 6:35 PM Lutalo Bbosa joseph 
>>> wrote:
>>>
 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 <
> ahmedisht...@gmail.com> wrote:
>
>> 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 <
>> bbos...@gmail.com> wrote:
>>
>>> 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 commandline the error is on line 42
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR7b_mpnBw_xLKW%2BX5jyVk4CKXm7jwVG37R8BsSPQQegg%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN7EoAbag_or9TPOb-KiYCmaD%2B4DDyG%2ByUfU%3DPzVRfacU09GNg%40mail.gmail.com
>> 

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 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 its used
>>
>> On Fri, Jun 21, 2019 at 6:59 PM Aldian Fazrihady 
>> wrote:
>>
>>> 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 products which is
 attached, when i try to search for a solution on stack overflow,all
 solutions insist on problem with integers and strings in my code. though
 these were passed solutions and not too similar to this one

 On Fri, Jun 21, 2019 at 6:35 PM Lutalo Bbosa joseph 
 wrote:

> 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 <
>> ahmedisht...@gmail.com> wrote:
>>
>>> 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 <
>>> bbos...@gmail.com> wrote:
>>>
 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 commandline the error is on line 42

 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR7b_mpnBw_xLKW%2BX5jyVk4CKXm7jwVG37R8BsSPQQegg%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at 

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 and cant move on any help, here is my views.py
> ,
> from the commandline the error is on line 42
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 and cant move on any help, here is my views.py
>> ,
>> from the commandline the error is on line 42
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Héctor Alonso Lozada Echezuría
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTYjC9WSGBsTyzfW7%2BBbq6a2cD0H%3DsdXgrnM6gyPhf30Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 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 and cant move on any help, here is my
>>> views.py ,
>>> from the commandline the error is on line 42
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Héctor Alonso Lozada Echezuría
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR2YMJitLizXQg2_a8tyTUF2%2B46im%2B4MvoGyzyHQayrCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 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 jun. 2019 a las 6:33, Lutalo Bbosa joseph (<
>>> bbos...@gmail.com>) escribió:
>>>
 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 commandline the error is on line 42

 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> --
>>> Héctor Alonso Lozada Echezuría
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR2YMJitLizXQg2_a8tyTUF2%2B46im%2B4MvoGyzyHQayrCw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTS2YwVg4%3D3brJr%2BZFxxbM-fBn_vkWHGQno%3DDyyfHij6atpaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 following:

UPDATE schema.table t1 SET t1.value = t2.value FROM ( SELECT id1, id2, value 
FROM 
does_not_matter ) t2 WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 In this 
example, t2 represents my queryset. It can contain potentially hundreds of 
thousands of rows (distinct on (id1, id2)).

Is there any way to accomplish this using the django ORM? I'm using version 
1.11

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a2ca8f74-cc05-41c7-bee9-4f981ead3538%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 which 
are 2 lists of records.
 Each list has approximately 40 to 50 records. Each record has 8 fields. 
(field1,...field8) ...

*Each list *looks like this (if my description is not clear) field1 is 
unique. 

field1  field2  field3 



field8











Both the lists (with each list having about 50 records) are in my django 
view. 

>From what I read online, I can use the render() method which has a *dictionary 
*called context. (
https://docs.djangoproject.com/en/2.2/ref/templates/api/#rendering-a-context
)

I am not sure how to convert these list of record objects to this 
dictionary format which has {"name":value} pair. 

Even the django tables requires it in the dictionary format.

The nearest thing which I found was 
https://stackoverflow.com/questions/9388064/django-template-turn-array-into-html-table
 

But I did not understand what exactly the below syntax does and how I can 
customize it to my usecase any input would be greatly appreciated ...


  {% for r in results %}
{% cycle '' '' '' '' %}
  {{r.content}}
{% cycle '' '' '' '' %}
  {% endfor %}





-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/38b9aeb8-2a03-4c54-b100-583d952bd02e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.