Re: Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread Vedarth Sharma
I am interested in taking this opportunity.

On Thu, Mar 28, 2019, 5:04 PM  wrote:

> Hi Everyone,
>
> I am looking for a candidate who has architectural experience in building
> a Platform in Python Django.
>
> *Software Architect – Part Remote - (Python Django) – Start **Up *
>
>
>
> £65,000 - £75,000 depending on experience
>
> Cambridge
>
> Permanent
>
>
>
>
>
> We have established a firm partnership with a really exciting start up
> that’s going to revolutionise their market.  The company are looking for a
> candidate to come in and help build a ground-breaking platform that is
> going to modernise the agricultural sector. This technology is going to
> bring a once slow-moving market into the 21st century. It’s a very
> exciting opportunity for anyone who is a team lead or has thought about
> being a team lead. The perfect candidate will be from an architectural
> background with lead experience or ambitions to lead a team.
>
>
>
> They are looking for some with a strong development background in Python
> Django. The ideal candidate is someone with previous experience in
> developing backend creating web applications but also has an interest in
> Machine Learning. The role will entail a very hand son approach to start
> and as the team grows it will move more into a line management role. If you
> have some front-end experience it would also be a bonus.
>
>
>
> A successful candidate must be skilled in:
>
> ·Strong experience of creating web applications in Python Django
>
> ·Understanding of REST API and GraphQL development
>
> ·Experience with Amazon Web Services Or Google Cloud
>
> ·Experience in Machine Learning or want to gain the experience
>
> ·Understanding of container technology such as Docker
>
> ·Architectural Background
>
>
> Desirables:
>
> ·Experience with full stack development – React or React Native
>
> ·Understanding of blockchain technologies
>
> ·Had Open source experience
>
> ·Team Lead Experience
>
>
>
> The Company has really got hold of something really exciting with this
> platform. This role is perfect for anyone who is looking for a new
> challenge or is thinking about developing themselves further. They have a
> beautiful new office in Cambridge with the potential to grow further. After
> meeting with them you get a real feeling that they are a fantastic company
> to work for and their benefits package is also very attractive.
>
>
>
> If you are interested in applying for this role, please email
> sc...@socode.co.uk.
>
>
> If you email I am more than happy to get the full spec over to you and
> more information about the company.
>
>
> Best wishes
>
> Scott
>
> --
> 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/f4c094df-1781-45e4-8087-14566ba12f61%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/CAK1F8%2BfrRbpt7%2BXgTQ65%3DdZpuqkWDY-A9W0YrYYH-KOM8TOzQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread Rakesh Singh
Hi,
I am interested in this position but only remote work from home location.
If agreed please let me know.

On Thu, Mar 28, 2019 at 5:04 PM  wrote:

> Hi Everyone,
>
> I am looking for a candidate who has architectural experience in building
> a Platform in Python Django.
>
> *Software Architect – Part Remote - (Python Django) – Start **Up *
>
>
>
> £65,000 - £75,000 depending on experience
>
> Cambridge
>
> Permanent
>
>
>
>
>
> We have established a firm partnership with a really exciting start up
> that’s going to revolutionise their market.  The company are looking for a
> candidate to come in and help build a ground-breaking platform that is
> going to modernise the agricultural sector. This technology is going to
> bring a once slow-moving market into the 21st century. It’s a very
> exciting opportunity for anyone who is a team lead or has thought about
> being a team lead. The perfect candidate will be from an architectural
> background with lead experience or ambitions to lead a team.
>
>
>
> They are looking for some with a strong development background in Python
> Django. The ideal candidate is someone with previous experience in
> developing backend creating web applications but also has an interest in
> Machine Learning. The role will entail a very hand son approach to start
> and as the team grows it will move more into a line management role. If you
> have some front-end experience it would also be a bonus.
>
>
>
> A successful candidate must be skilled in:
>
> ·Strong experience of creating web applications in Python Django
>
> ·Understanding of REST API and GraphQL development
>
> ·Experience with Amazon Web Services Or Google Cloud
>
> ·Experience in Machine Learning or want to gain the experience
>
> ·Understanding of container technology such as Docker
>
> ·Architectural Background
>
>
> Desirables:
>
> ·Experience with full stack development – React or React Native
>
> ·Understanding of blockchain technologies
>
> ·Had Open source experience
>
> ·Team Lead Experience
>
>
>
> The Company has really got hold of something really exciting with this
> platform. This role is perfect for anyone who is looking for a new
> challenge or is thinking about developing themselves further. They have a
> beautiful new office in Cambridge with the potential to grow further. After
> meeting with them you get a real feeling that they are a fantastic company
> to work for and their benefits package is also very attractive.
>
>
>
> If you are interested in applying for this role, please email
> sc...@socode.co.uk.
>
>
> If you email I am more than happy to get the full spec over to you and
> more information about the company.
>
>
> Best wishes
>
> Scott
>
> --
> 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/f4c094df-1781-45e4-8087-14566ba12f61%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

*Thanks & Regards*

*Rakesh Singh*
*786 9230 528*
*rakesh...@gmail.com* 

P* Please consider your environmental responsibility - think before you
print!*

-- 
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/CADJJcgYB09%2BBKgH5iCJjats2S%2B29jJMEeq1kcJzEizAMNxybjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unit-Testing Django Views

2019-03-28 Thread Chetan Ganji
There is one more way you could do it


class TestIndexPageLoad(TestCase):

def setUp(self):
self.client = Client()
self.response = self.client.get('/')

def test_check_response(self):
self.assertTemplateUsed(self.response, 'index.html')



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


On Fri, Mar 29, 2019 at 1:56 AM Chetan Ganji  wrote:

> I would prefer to just check the status code of the response object.
> This is what I have done. You have to check if it works for forms with
> csrf_token or not.
>
>
> class TestReverseUrls(TestCase):
>
> def setUp(self):
> self.client = Client()
> self.reverseUrls = ['index', 'login', 'register']
> self.response = {url:self.client.get(reverse(url)) for url in self
> .reverseUrls}
>
> def test_reverse_urls(self):
> for url in self.reverseUrls:
> self.assertEqual(self.response[url].status_code, 200)
>
>
>
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji.che...@gmail.com
> http://ryucoder.in
>
>
> On Fri, Mar 29, 2019 at 12:57 AM Aldian Fazrihady 
> wrote:
>
>> There are several things you can try:
>> 1. Mocking csrf token functions
>> 2. Passing the csrf token context from first HTML generation to the
>> second HTML generation
>> 3. Wiping out the csrf token parts from both HTML before comparing them.
>>
>> On Thu, 28 Mar 2019, 23:54 Simon Charette,  wrote:
>>
>>> This is effectively failing because of a mechanism added in 1.10 to
>>> protect
>>> against BREACH attacks[0] by salting the CSRF token.
>>>
>>> I'm not aware of any way to disable this mechanism but testing against
>>> the
>>> exact HTML returned from a view seems fragile.
>>>
>>> I suggest you use assertContains[1] (with or without html=True) and
>>> assertTemplateUsed[2] instead.
>>>
>>> Cheers,
>>> Simon
>>>
>>> [0] https://docs.djangoproject.com/en/2.1/ref/csrf/#how-it-works
>>> [1]
>>> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertContains
>>> [2]
>>> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed
>>>
>>> Le jeudi 28 mars 2019 12:16:43 UTC-4, OnlineJudge95 a écrit :

 Hi people,

 I am following the book Test-Driven Development with Python
 
  by
 *Harry J.W. Perceval.* The book is using Django version 1.7 which is
 outdated as of now so I started with version 2.1.

 I am trying to unit test my index view. One unit-test that I have
 written is testing whether the index view returns correct HTML or not by
 comparing the input received through
 django.template.loader.render_to_string
 the unit-test fail with the following traceback
 python manage.py test
 Creating test database for alias 'default'...
 .System check identified no issues (0 silenced).
 F.
 ==
 FAIL: test_index_view_returns_correct_html (lists.tests.IndexViewTest)
 --
 Traceback (most recent call last):
   File "tests.py", line 24, in test_index_view_returns_correct_html
 self.assertEqual(expected_html, actual_html)
 AssertionError: '>>> chars]lue="BJMT1b9fxuXOGugp00SDypeTYZxvlmc6KtBSYMDon[198 chars]l>\n' !=
 '>>> chars]l>\n'

 --
 Ran 3 tests in 0.006s

 FAILED (failures=1)
 Destroying test database for alias 'default'...

 Process finished with exit code 1


 It was clear that the csrf token is causing the test to fail. Is there
 any way to test it, or should it be tested? I ask this as when I changed my
 Django version to 1.7, the tests were passing, even after giving the csrf
 token field in the form. I tried going through the changelogs but 1.7 is
 far behind (beginner here). Please find the code snippets, directory
 structure provided below.


 *lists/views.py*










 *from django.http import HttpResponsefrom django.shortcuts import render# 
 Create your views here.def index(request):if request.method == 'POST': 
return HttpResponse(request.POST['item_text'])return 
 render(request, 'index.html')*


 *lists/test.py*


























 *from django.http import HttpRequestfrom django.template.loader import
 render_to_stringfrom django.test import TestCasefrom django.urls import
 resolvefrom lists.views import index# Create your tests here.class
 IndexViewTest(TestCase):def
 test_root_url_resolves_to_home_page_view(self):   [...]def
 test_index_view_returns_correct_html(self):request = 

Re: Unit-Testing Django Views

2019-03-28 Thread Chetan Ganji
I would prefer to just check the status code of the response object.
This is what I have done. You have to check if it works for forms with
csrf_token or not.


class TestReverseUrls(TestCase):

def setUp(self):
self.client = Client()
self.reverseUrls = ['index', 'login', 'register']
self.response = {url:self.client.get(reverse(url)) for url in self
.reverseUrls}

def test_reverse_urls(self):
for url in self.reverseUrls:
self.assertEqual(self.response[url].status_code, 200)



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


On Fri, Mar 29, 2019 at 12:57 AM Aldian Fazrihady  wrote:

> There are several things you can try:
> 1. Mocking csrf token functions
> 2. Passing the csrf token context from first HTML generation to the second
> HTML generation
> 3. Wiping out the csrf token parts from both HTML before comparing them.
>
> On Thu, 28 Mar 2019, 23:54 Simon Charette,  wrote:
>
>> This is effectively failing because of a mechanism added in 1.10 to
>> protect
>> against BREACH attacks[0] by salting the CSRF token.
>>
>> I'm not aware of any way to disable this mechanism but testing against the
>> exact HTML returned from a view seems fragile.
>>
>> I suggest you use assertContains[1] (with or without html=True) and
>> assertTemplateUsed[2] instead.
>>
>> Cheers,
>> Simon
>>
>> [0] https://docs.djangoproject.com/en/2.1/ref/csrf/#how-it-works
>> [1]
>> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertContains
>> [2]
>> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed
>>
>> Le jeudi 28 mars 2019 12:16:43 UTC-4, OnlineJudge95 a écrit :
>>>
>>> Hi people,
>>>
>>> I am following the book Test-Driven Development with Python
>>> 
>>>  by
>>> *Harry J.W. Perceval.* The book is using Django version 1.7 which is
>>> outdated as of now so I started with version 2.1.
>>>
>>> I am trying to unit test my index view. One unit-test that I have
>>> written is testing whether the index view returns correct HTML or not by
>>> comparing the input received through
>>> django.template.loader.render_to_string
>>> the unit-test fail with the following traceback
>>> python manage.py test
>>> Creating test database for alias 'default'...
>>> .System check identified no issues (0 silenced).
>>> F.
>>> ==
>>> FAIL: test_index_view_returns_correct_html (lists.tests.IndexViewTest)
>>> --
>>> Traceback (most recent call last):
>>>   File "tests.py", line 24, in test_index_view_returns_correct_html
>>> self.assertEqual(expected_html, actual_html)
>>> AssertionError: '>> chars]lue="BJMT1b9fxuXOGugp00SDypeTYZxvlmc6KtBSYMDon[198 chars]l>\n' !=
>>> '>> chars]l>\n'
>>>
>>> --
>>> Ran 3 tests in 0.006s
>>>
>>> FAILED (failures=1)
>>> Destroying test database for alias 'default'...
>>>
>>> Process finished with exit code 1
>>>
>>>
>>> It was clear that the csrf token is causing the test to fail. Is there
>>> any way to test it, or should it be tested? I ask this as when I changed my
>>> Django version to 1.7, the tests were passing, even after giving the csrf
>>> token field in the form. I tried going through the changelogs but 1.7 is
>>> far behind (beginner here). Please find the code snippets, directory
>>> structure provided below.
>>>
>>>
>>> *lists/views.py*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *from django.http import HttpResponsefrom django.shortcuts import render# 
>>> Create your views here.def index(request):if request.method == 'POST':  
>>>   return HttpResponse(request.POST['item_text'])return 
>>> render(request, 'index.html')*
>>>
>>>
>>> *lists/test.py*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *from django.http import HttpRequestfrom django.template.loader import
>>> render_to_stringfrom django.test import TestCasefrom django.urls import
>>> resolvefrom lists.views import index# Create your tests here.class
>>> IndexViewTest(TestCase):def
>>> test_root_url_resolves_to_home_page_view(self):   [...]def
>>> test_index_view_returns_correct_html(self):request = HttpRequest()
>>>   response = index(request)actual_html =
>>> response.content.decode()expected_html =
>>> render_to_string('index.html', request=request)
>>> self.assertEqual(expected_html, actual_html)def
>>> test_index_view_can_save_a_post_request(self):   [...]requirements.txt*
>>>
>>>
>>>
>>>
>>>
>>> *Django==2.1.7pytz==2018.9selenium==3.141.0urllib3==1.24.*
>>> *settings.py*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *[...]# Application definitionINSTALLED_APPS = [ 'django.contrib.admin',
>>> 

Re: Unit-Testing Django Views

2019-03-28 Thread Aldian Fazrihady
There are several things you can try:
1. Mocking csrf token functions
2. Passing the csrf token context from first HTML generation to the second
HTML generation
3. Wiping out the csrf token parts from both HTML before comparing them.

On Thu, 28 Mar 2019, 23:54 Simon Charette,  wrote:

> This is effectively failing because of a mechanism added in 1.10 to protect
> against BREACH attacks[0] by salting the CSRF token.
>
> I'm not aware of any way to disable this mechanism but testing against the
> exact HTML returned from a view seems fragile.
>
> I suggest you use assertContains[1] (with or without html=True) and
> assertTemplateUsed[2] instead.
>
> Cheers,
> Simon
>
> [0] https://docs.djangoproject.com/en/2.1/ref/csrf/#how-it-works
> [1]
> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertContains
> [2]
> https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed
>
> Le jeudi 28 mars 2019 12:16:43 UTC-4, OnlineJudge95 a écrit :
>>
>> Hi people,
>>
>> I am following the book Test-Driven Development with Python
>> 
>>  by
>> *Harry J.W. Perceval.* The book is using Django version 1.7 which is
>> outdated as of now so I started with version 2.1.
>>
>> I am trying to unit test my index view. One unit-test that I have written
>> is testing whether the index view returns correct HTML or not by comparing
>> the input received through
>> django.template.loader.render_to_string
>> the unit-test fail with the following traceback
>> python manage.py test
>> Creating test database for alias 'default'...
>> .System check identified no issues (0 silenced).
>> F.
>> ==
>> FAIL: test_index_view_returns_correct_html (lists.tests.IndexViewTest)
>> --
>> Traceback (most recent call last):
>>   File "tests.py", line 24, in test_index_view_returns_correct_html
>> self.assertEqual(expected_html, actual_html)
>> AssertionError: '> chars]lue="BJMT1b9fxuXOGugp00SDypeTYZxvlmc6KtBSYMDon[198 chars]l>\n' !=
>> '> chars]l>\n'
>>
>> --
>> Ran 3 tests in 0.006s
>>
>> FAILED (failures=1)
>> Destroying test database for alias 'default'...
>>
>> Process finished with exit code 1
>>
>>
>> It was clear that the csrf token is causing the test to fail. Is there
>> any way to test it, or should it be tested? I ask this as when I changed my
>> Django version to 1.7, the tests were passing, even after giving the csrf
>> token field in the form. I tried going through the changelogs but 1.7 is
>> far behind (beginner here). Please find the code snippets, directory
>> structure provided below.
>>
>>
>> *lists/views.py*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *from django.http import HttpResponsefrom django.shortcuts import render# 
>> Create your views here.def index(request):if request.method == 'POST':   
>>  return HttpResponse(request.POST['item_text'])return 
>> render(request, 'index.html')*
>>
>>
>> *lists/test.py*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *from django.http import HttpRequestfrom django.template.loader import
>> render_to_stringfrom django.test import TestCasefrom django.urls import
>> resolvefrom lists.views import index# Create your tests here.class
>> IndexViewTest(TestCase):def
>> test_root_url_resolves_to_home_page_view(self):   [...]def
>> test_index_view_returns_correct_html(self):request = HttpRequest()
>>   response = index(request)actual_html =
>> response.content.decode()expected_html =
>> render_to_string('index.html', request=request)
>> self.assertEqual(expected_html, actual_html)def
>> test_index_view_can_save_a_post_request(self):   [...]requirements.txt*
>>
>>
>>
>>
>>
>> *Django==2.1.7pytz==2018.9selenium==3.141.0urllib3==1.24.*
>> *settings.py*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *[...]# Application definitionINSTALLED_APPS = [ 'django.contrib.admin',
>> 'django.contrib.auth', 'django.contrib.contenttypes',
>> 'django.contrib.sessions', 'django.contrib.messages',
>> 'django.contrib.staticfiles', 'lists',][...]*
>> *Directory Structure*
>>
>> [image: Screen Shot 2019-03-28 at 9.36.56 PM.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/7f0f12be-fc3e-43c3-ba07-e48158def051%40googlegroups.com
> 

Re: Regarding internship opportunity in Bangalore

2019-03-28 Thread Akash Purandare
Hey Sachin

If you might be interested in Full Stack Development of a Website, please 
do send me your CV. 

We work in a startup called Oversight.

Regards
Akash Purandare
akash.p1...@gmail.com

On Thursday, March 28, 2019 at 11:24:18 PM UTC+5:30, sachin thakur wrote:
>
> Hi Folks 
> This email is regarding internship opportunity if there are any internship 
> opportunity please do let me know I am already working on django also I 
> developed web based applications using jsp servlet and hibernate. Please do 
> let me know if any opportunity is available
>

-- 
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/28a17b1a-d92b-47c7-acd0-ab79fe9c22b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Looking for a Django Intern in India

2019-03-28 Thread Akash Purandare
Hello Django Developers

We would like to provide you with opportunities to work in a live project 
on Django. This is an internship which requires you to collaborate 
effectively with other members of the team based in India.

Requirements:
Good Knowledge of Django
Basic Knowledge of React
Proficiency in Git and Heroku

Interested developers can send their CV to the E-mail Akash Purandare 
.
Vacancies: 2

Regards
Akash Purandare
Oversight
akash.p1...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/a3a73d40-c532-46f7-8da9-35178362cd63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to read and parse the csv files using pandas in django

2019-03-28 Thread Jayram Rawat
can you send the data sheet which you are using in this program.

On Thursday, 28 March 2019 17:04:54 UTC+5:30, naga lokesh wrote:
>
> I have normal python code to plot the graphs for csv data(data 
> visualisation).But I need code in django and graphs should display on 
> dashboard...
>

-- 
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/783fbd7e-da09-4db9-b0d9-fecf85b9f947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread KONE GOMPOU LOUA ALASSANE
You must install  virtualenv first,

Le jeu. 28 mars 2019 16:55, Sandip Nath  a écrit :

> Definitely will help you with your installation. But first reply to the
> questions. Because the remedy will depend on your reply.
>
> On Thursday, 28 March 2019 22:02:08 UTC+5:30, michael wrote:
>>
>> I've installed Python 3.7 which comes with pip installed. When I try to
>> create a virtualenv I get a SyntaxError: invalid syntax
>>
>> What am I doing wrong?
>>
>>
>> Regards,
>>
>> Michael Achterberg
>> E-mail: mic...@achterberg.org.za
>>
> --
> 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/2e63c3dc-283b-4498-9e49-d44f75f871ee%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/CANoHCssQpRLwV6GorXjzrzLFxHDGTUWr%3DAnyEcmAAX%3DLCPVibQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread Michael Achterberg
I am running Windows 10

No other versions of of Python, only 3.7.3


Regards,

Michael Achterberg
Achterberg Consulting (Pty) Ltd
Tel: +27 (0)78 128 3948
E-mail: mich...@achterberg.org.za

 Original message 
From: Sandip Nath  
Date: 28/03/2019  18:52  (GMT+02:00) 
To: Django users  
Subject: Re: Installation Question 

Please try to be more informative when posting a question. Please answer 
this:1. what os are you using? Windows/Mac/linux.2. Do you have any other 
version(s) of Python installed in your system?On Thursday, 28 March 2019 
22:02:08 UTC+5:30, michael wrote:I've installed Python 3.7 which comes with pip 
installed. When I try to create a virtualenv I get a SyntaxError: invalid 
syntaxWhat am I doing wrong?Regards,Michael AchterbergE-mail: 
mic...@achterberg.org.za - 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/039cd43c-cf7a-4c5d-bca2-abb506a170b2%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/4fhy7h8f5jflvk7r9pynq50v.1553798147375%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread Michael Achterberg
I am trying to run 

Pip install virtualenv

As well as

virtualenv my_env


Regards,

Michael Achterberg
Achterberg Consulting (Pty) Ltd
Tel: +27 (0)78 128 3948
E-mail: mich...@achterberg.org.za

 Original message 
From: "Sithembewena L. Dube"  
Date: 28/03/2019  18:36  (GMT+02:00) 
To: django-users@googlegroups.com 
Subject: Re: Installation Question 

Can you paste the command you are running?Kind regards,SithembewenaSent with 
ShiftOn Thu, Mar 28, 2019 at 6:31 PM Michael Achterberg 
 wrote:I've installed Python 3.7 which comes with 
pip installed. When I try to create a virtualenv I get a SyntaxError: invalid 
syntaxWhat am I doing wrong?Regards,Michael AchterbergE-mail: 
mich...@achterberg.org.za - 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/gbimmpfv2sa1f3o8032dbxih.1553790005386%40email.android.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/CAH-SnCCQb7Sy94LbMrPqQOquAjUa4cAEGTyB%3DB1pKf6C051pZA%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/7p173iqt9ss4og1n75klrory.1553798040191%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


Re: There's any django app for calendar?

2019-03-28 Thread Kasper Laudrup

Hi Fellipe,

On 28/03/2019 14.45, Fellipe Henrique wrote:

Hello guys,  tried to search on google, but no lucky..

Anyone knows any django app for calendar, to set appointments, 
hour/day... with frontend?





I had sort of the same issue a while ago. I wanted a simple booking 
system for a website for my familys summer house.


None of the existing apps that others have kindly linked to really 
filled my requirements. To be honest, I can't remember exactly why, but 
I think they were either too complex for my needs or where simply 
designed for something else.


In the end I started hacking around with the python calendar module from 
the standard library:


https://docs.python.org/3/library/calendar.html

Which has a nice HTMLCalendar class which can be used for generating a 
calendar. It can be "sort of" customized with CSS classes, but in the 
end I ended up copy-pasting the HTMLCalendar code and customizing it for 
my needs, primarily because I needed bit more than just custom CSS.


Feel free to have a look here:

https://github.com/laudrup/ebbamaala

Specifically, there's a custom tag for rendering the calendar here:

https://github.com/laudrup/ebbamaala/blob/master/website/templatetags/calendar.py

Of course, you also need the booking model etc. to show and handle new 
bookings etc.


Not sure if this is the right way to do it and I'm far from being and 
expert in Django (or Python for that matter), but hope it might be useful.


If someone else can tell me some better way to do it, I'd be very 
interested as well :-)


Kind regards,

Kasper Laudrup

--
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/273e1f23-b8e4-31d8-d519-2d10e3898e6d%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie question : running the makemigrations command in the terminal

2019-03-28 Thread jgibson
>From your settings file:
 

> munichliving_app.apps.MunichLivingConfig
>
>
That makes me think that the structure of your project looks something like 
this:

\munichliving_app\manage.py
\munichliving_app\apps\MunichLivingConfig\
\munichliving_app\apps\MunichLivingConfig\models.py
\munichliving_app\apps\MunichLivingConfig\views.py
\munichliving_app\apps\MunichLivingConfig\admin.py





And `OffererProfile` is defined inside models. Is that correct?

On Thursday, March 28, 2019 at 11:35:46 AM UTC-4, kamiba...@gmail.com wrote:
>
> Hello,
>
> (Newbie here): I am trying to run the makemigrations icommand in my 
> terminal. You will find here below the three relevant files, the third one 
> showing the errors displayed in 
> the terminal. 
>
> My settings.py file:
>
>
> https://pastebin.com/raw/xLpX0Zfg
>
>
> My models.py file: 
>
> https://pastebin.com/raw/wYfSy8ET
>
>
> The terminal entry (with the errors)
>
>
> https://pastebin.com/raw/Pmpnepf1
>
>
> Thank you for your time and your help.
>
>
> K.
>

-- 
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/9d5f73c3-0335-4003-8162-5c72aa07f723%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Regarding internship opportunity in Bangalore

2019-03-28 Thread sachin thakur
Hi Folks
This email is regarding internship opportunity if there are any internship
opportunity please do let me know I am already working on django also I
developed web based applications using jsp servlet and hibernate. Please do
let me know if any opportunity is available

-- 
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/CA%2BLmcYsJt40LvxmZQ1idCUH%3D1_MmUszMgLm4H8yp5yggWoPW_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: There's any django app for calendar?

2019-03-28 Thread carlos
https://github.com/llazzaro/django-scheduler

On Thu, Mar 28, 2019 at 9:21 AM Suresh Kannan  wrote:

> Hi,
>
> Explore the link https://djangopackages.org/grids/g/calendar/
>
> On Thu, 28 Mar 2019 at 09:45, Fellipe Henrique  wrote:
>
>> Hello guys,  tried to search on google, but no lucky..
>>
>> Anyone knows any django app for calendar, to set appointments,
>> hour/day... with frontend?
>>
>> Thanks!
>>
>> T.·.F.·.A.·. S+F
>> *Fellipe Henrique P. Soares*
>>
>> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \
>> 's/(.)/chr(ord($1)-2*3)/ge'
>> *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
>> *
>> *Blog: *http:www.fellipeh.eti.br
>> *GitHub: https://github.com/fellipeh *
>> *Twitter: @fh_bash*
>>
>> --
>> 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/CAF1jwZF9cRAYbjPr04MyC%3DAWx_xhAdZd%2B%3Dem_WiOSkSpJgA9jQ%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/CANfVfcCgKnG7Tu2H53yS8vhH0b0ns7vKM4x5epG1CKz-%3DJr5WQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
att.
Carlos Rocha

-- 
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/CAM-7rO35jL8mvtc2oLCUo1w9sT3BpF-s%3D2N%2BvvZ22jPRrU8QrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie question : running the makemigrations command in the terminal

2019-03-28 Thread kamibarut609


On Thursday, 28 March 2019 16:35:46 UTC+1, kamiba...@gmail.com wrote:
>
> Hello,
>
> (Newbie here): I am trying to run the makemigrations icommand in my 
> terminal. You will find here below the three relevant files, the third one 
> showing the errors displayed in 
> the terminal. 
>
> My settings.py file:
>
>
> https://pastebin.com/raw/xLpX0Zfg
>
>
> My models.py file: 
>
> https://pastebin.com/raw/wYfSy8ET
>
>
> The terminal entry (with the errors)
>
>
> https://pastebin.com/raw/Pmpnepf1
>
>
>
No matter the changes I make in the apps.py, settings.py and models.py 
files, I always read in the terminal :

 "  No changes detected in app 'munichliving_app'

 ( I am using Python 3.6 and Django 2.7.1)
 

>  Thank you for your time and your help.
>
>
> K.
>

-- 
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/a62b4366-e47b-468a-a562-3ceb8fe69e27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread Sandip Nath
Definitely will help you with your installation. But first reply to the 
questions. Because the remedy will depend on your reply.

On Thursday, 28 March 2019 22:02:08 UTC+5:30, michael wrote:
>
> I've installed Python 3.7 which comes with pip installed. When I try to 
> create a virtualenv I get a SyntaxError: invalid syntax
>
> What am I doing wrong?
>
>
> Regards,
>
> Michael Achterberg
> E-mail: mic...@achterberg.org.za 
>

-- 
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/2e63c3dc-283b-4498-9e49-d44f75f871ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unit-Testing Django Views

2019-03-28 Thread Simon Charette
This is effectively failing because of a mechanism added in 1.10 to protect
against BREACH attacks[0] by salting the CSRF token.

I'm not aware of any way to disable this mechanism but testing against the
exact HTML returned from a view seems fragile.

I suggest you use assertContains[1] (with or without html=True) and
assertTemplateUsed[2] instead.

Cheers,
Simon

[0] https://docs.djangoproject.com/en/2.1/ref/csrf/#how-it-works
[1] 
https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertContains
[2] 
https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed

Le jeudi 28 mars 2019 12:16:43 UTC-4, OnlineJudge95 a écrit :
>
> Hi people,
>
> I am following the book Test-Driven Development with Python 
> 
>  by 
> *Harry J.W. Perceval.* The book is using Django version 1.7 which is 
> outdated as of now so I started with version 2.1.
>
> I am trying to unit test my index view. One unit-test that I have written 
> is testing whether the index view returns correct HTML or not by comparing 
> the input received through
> django.template.loader.render_to_string
> the unit-test fail with the following traceback
> python manage.py test
> Creating test database for alias 'default'...
> .System check identified no issues (0 silenced).
> F.
> ==
> FAIL: test_index_view_returns_correct_html (lists.tests.IndexViewTest)
> --
> Traceback (most recent call last):
>   File "tests.py", line 24, in test_index_view_returns_correct_html
> self.assertEqual(expected_html, actual_html)
> AssertionError: ' chars]lue="BJMT1b9fxuXOGugp00SDypeTYZxvlmc6KtBSYMDon[198 chars]l>\n' != 
> ' chars]l>\n'
>
> --
> Ran 3 tests in 0.006s
>
> FAILED (failures=1)
> Destroying test database for alias 'default'...
>
> Process finished with exit code 1
>
>
> It was clear that the csrf token is causing the test to fail. Is there any 
> way to test it, or should it be tested? I ask this as when I changed my 
> Django version to 1.7, the tests were passing, even after giving the csrf 
> token field in the form. I tried going through the changelogs but 1.7 is 
> far behind (beginner here). Please find the code snippets, directory 
> structure provided below.
>
>
> *lists/views.py*
>
>
>
>
>
>
>
>
>
>
> *from django.http import HttpResponsefrom django.shortcuts import render# 
> Create your views here.def index(request):if request.method == 'POST':
> return HttpResponse(request.POST['item_text'])return render(request, 
> 'index.html')*
>
>
> *lists/test.py*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *from django.http import HttpRequestfrom django.template.loader import 
> render_to_stringfrom django.test import TestCasefrom django.urls import 
> resolvefrom lists.views import index# Create your tests here.class 
> IndexViewTest(TestCase):def 
> test_root_url_resolves_to_home_page_view(self):   [...]def 
> test_index_view_returns_correct_html(self):request = HttpRequest()  
>   response = index(request)actual_html = 
> response.content.decode()expected_html = 
> render_to_string('index.html', request=request)
> self.assertEqual(expected_html, actual_html)def 
> test_index_view_can_save_a_post_request(self):   [...]requirements.txt*
>
>
>
>
>
> *Django==2.1.7pytz==2018.9selenium==3.141.0urllib3==1.24.*
> *settings.py*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *[...]# Application definitionINSTALLED_APPS = [ 'django.contrib.admin', 
> 'django.contrib.auth', 'django.contrib.contenttypes', 
> 'django.contrib.sessions', 'django.contrib.messages', 
> 'django.contrib.staticfiles', 'lists',][...]*
> *Directory Structure*
>
> [image: Screen Shot 2019-03-28 at 9.36.56 PM.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/7f0f12be-fc3e-43c3-ba07-e48158def051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread Sandip Nath
Please try to be more informative when posting a question. Please answer 
this:
1. what os are you using? Windows/Mac/linux.
2. Do you have any other version(s) of Python installed in your system?

On Thursday, 28 March 2019 22:02:08 UTC+5:30, michael wrote:
>
> I've installed Python 3.7 which comes with pip installed. When I try to 
> create a virtualenv I get a SyntaxError: invalid syntax
>
> What am I doing wrong?
>
>
> Regards,
>
> Michael Achterberg
> E-mail: mic...@achterberg.org.za 
>

-- 
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/039cd43c-cf7a-4c5d-bca2-abb506a170b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Question

2019-03-28 Thread Sithembewena L. Dube
Can you paste the command you are running?

Kind regards,
Sithembewena


*Sent with Shift
*

On Thu, Mar 28, 2019 at 6:31 PM Michael Achterberg <
mich...@achterberg.org.za> wrote:

> I've installed Python 3.7 which comes with pip installed. When I try to
> create a virtualenv I get a SyntaxError: invalid syntax
>
> What am I doing wrong?
>
>
> Regards,
>
> Michael Achterberg
> E-mail: mich...@achterberg.org.za
>
> --
> 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/gbimmpfv2sa1f3o8032dbxih.1553790005386%40email.android.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/CAH-SnCCQb7Sy94LbMrPqQOquAjUa4cAEGTyB%3DB1pKf6C051pZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Installation Question

2019-03-28 Thread Michael Achterberg
I've installed Python 3.7 which comes with pip installed. When I try to create 
a virtualenv I get a SyntaxError: invalid syntax

What am I doing wrong?


Regards,

Michael Achterberg
E-mail: mich...@achterberg.org.za

-- 
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/gbimmpfv2sa1f3o8032dbxih.1553790005386%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


Unit-Testing Django Views

2019-03-28 Thread OnlineJudge95
Hi people,

I am following the book Test-Driven Development with Python 

 by 
*Harry J.W. Perceval.* The book is using Django version 1.7 which is 
outdated as of now so I started with version 2.1.

I am trying to unit test my index view. One unit-test that I have written 
is testing whether the index view returns correct HTML or not by comparing 
the input received through
django.template.loader.render_to_string
the unit-test fail with the following traceback
python manage.py test
Creating test database for alias 'default'...
.System check identified no issues (0 silenced).
F.
==
FAIL: test_index_view_returns_correct_html (lists.tests.IndexViewTest)
--
Traceback (most recent call last):
  File "tests.py", line 24, in test_index_view_returns_correct_html
self.assertEqual(expected_html, actual_html)
AssertionError: '\n' != 
'\n'

--
Ran 3 tests in 0.006s

FAILED (failures=1)
Destroying test database for alias 'default'...

Process finished with exit code 1


It was clear that the csrf token is causing the test to fail. Is there any 
way to test it, or should it be tested? I ask this as when I changed my 
Django version to 1.7, the tests were passing, even after giving the csrf 
token field in the form. I tried going through the changelogs but 1.7 is 
far behind (beginner here). Please find the code snippets, directory 
structure provided below.


*lists/views.py*










*from django.http import HttpResponsefrom django.shortcuts import render# 
Create your views here.def index(request):if request.method == 'POST':  
  return HttpResponse(request.POST['item_text'])return render(request, 
'index.html')*


*lists/test.py*


























*from django.http import HttpRequestfrom django.template.loader import 
render_to_stringfrom django.test import TestCasefrom django.urls import 
resolvefrom lists.views import index# Create your tests here.class 
IndexViewTest(TestCase):def 
test_root_url_resolves_to_home_page_view(self):   [...]def 
test_index_view_returns_correct_html(self):request = HttpRequest()  
  response = index(request)actual_html = 
response.content.decode()expected_html = 
render_to_string('index.html', request=request)
self.assertEqual(expected_html, actual_html)def 
test_index_view_can_save_a_post_request(self):   [...]requirements.txt*





*Django==2.1.7pytz==2018.9selenium==3.141.0urllib3==1.24.*
*settings.py*















*[...]# Application definitionINSTALLED_APPS = [ 'django.contrib.admin', 
'django.contrib.auth', 'django.contrib.contenttypes', 
'django.contrib.sessions', 'django.contrib.messages', 
'django.contrib.staticfiles', 'lists',][...]*
*Directory Structure*

[image: Screen Shot 2019-03-28 at 9.36.56 PM.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/ed387060-93e5-4d0c-a4a6-a5204e6c097f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Newbie question : running the makemigrations command in the terminal

2019-03-28 Thread kamibarut609
Hello,

(Newbie here): I am trying to run the makemigrations icommand in my 
terminal. You will find here below the three relevant files, the third one 
showing the errors displayed in 
the terminal. 

My settings.py file:


https://pastebin.com/raw/xLpX0Zfg


My models.py file: 

https://pastebin.com/raw/wYfSy8ET


The terminal entry (with the errors)


https://pastebin.com/raw/Pmpnepf1


Thank you for your time and your help.


K.

-- 
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/b5c8fbee-2eff-4bcc-8474-5779f8e0fc11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: There's any django app for calendar?

2019-03-28 Thread Suresh Kannan
Hi,

Explore the link https://djangopackages.org/grids/g/calendar/

On Thu, 28 Mar 2019 at 09:45, Fellipe Henrique  wrote:

> Hello guys,  tried to search on google, but no lucky..
>
> Anyone knows any django app for calendar, to set appointments, hour/day...
> with frontend?
>
> Thanks!
>
> T.·.F.·.A.·. S+F
> *Fellipe Henrique P. Soares*
>
> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \
> 's/(.)/chr(ord($1)-2*3)/ge'
> *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
> *
> *Blog: *http:www.fellipeh.eti.br
> *GitHub: https://github.com/fellipeh *
> *Twitter: @fh_bash*
>
> --
> 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/CAF1jwZF9cRAYbjPr04MyC%3DAWx_xhAdZd%2B%3Dem_WiOSkSpJgA9jQ%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/CANfVfcCgKnG7Tu2H53yS8vhH0b0ns7vKM4x5epG1CKz-%3DJr5WQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Python Client generated from swagger

2019-03-28 Thread carl collins
Hello, I would love to know if any one here has ever generated python
client code using swagger codegenand used that client code  with
python/Django script or application  to  do get and post data to the  API .

I have generated a python client with swagger codegen but I don't know how
to use it to do request to my API.
Even tried googling but found nothing relevant online on how to use the
client generated to consume my API. Please someone help!


Kind Regards
Carl Collins

-- 
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/CAEPm0bxPMWF%3D-R5%2BNPeVRUQa8pPhWoSsV8Z%3DoRedi3f0OfBiXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need some sample project coding in Django t

2019-03-28 Thread Anbarasi Ayyannan
Yes please send me @anbarasiayyan...@gmail.com

On Thu, 28 Mar, 2019, 7:36 PM Bissane Belhadji, 
wrote:

> I will mail you a sample project I have, should I use
> anbarasiayyan...@gmail.com as the receiving address?
> /Bissane
>
> Le jeu. 28 mars 2019 à 14:58, Anbarasi Ayyannan <
> anbarasiayyan...@gmail.com> a écrit :
>
>> Hi,
>>  I am Django learner need some help for learning.Can you please help me
>> with providing me some sample project ? so that i can understand better.
>>
>> Regards,
>> Anbarasi
>>
>> --
>> 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/99da1d17-ff7a-4563-9aa0-2fdbf163e064%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/CADT%3DW7ZK9VBmxAYjOAqH6OJ02OEWeONKGtgHMhVVFAtL%3DBqEQw%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/CAD-r13jUR6p49x%3DqOZY3r%3D3tb5aEyB_tB%2B-UAodZpTPYGom%2BGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need some sample project coding in Django t

2019-03-28 Thread SuryaKumar K
Hi,
If you already familiar with python then it's better to start from django's
official document itself. There you can find a polls app.

Link :https://docs.djangoproject.com/en/2.1/intro/tutorial01/



It's good to start with this.

Thanks,
Suryakumar

On Thu 28 Mar, 2019, 7:28 PM Anbarasi Ayyannan, 
wrote:

> Hi,
>  I am Django learner need some help for learning.Can you please help me
> with providing me some sample project ? so that i can understand better.
>
> Regards,
> Anbarasi
>
> --
> 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/99da1d17-ff7a-4563-9aa0-2fdbf163e064%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/CABSvC_pRNO18T8a7r2%2B2Jxnf7HmJiC0v1gokQUMfUBDADh01MQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need some sample project coding in Django t

2019-03-28 Thread Bissane Belhadji
I will mail you a sample project I have, should I use
anbarasiayyan...@gmail.com as the receiving address?
/Bissane

Le jeu. 28 mars 2019 à 14:58, Anbarasi Ayyannan 
a écrit :

> Hi,
>  I am Django learner need some help for learning.Can you please help me
> with providing me some sample project ? so that i can understand better.
>
> Regards,
> Anbarasi
>
> --
> 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/99da1d17-ff7a-4563-9aa0-2fdbf163e064%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/CADT%3DW7ZK9VBmxAYjOAqH6OJ02OEWeONKGtgHMhVVFAtL%3DBqEQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need some sample project coding in Django t

2019-03-28 Thread Nelson Varela
The django documentation will help you build a project yourself which can 
help you a lot understanding django:


https://docs.djangoproject.com/en/2.1/intro/tutorial01/

On Thursday, March 28, 2019 at 2:59:12 PM UTC+1, Anbarasi Ayyannan wrote:
>
> Hi,
>  I am Django learner need some help for learning.Can you please help me 
> with providing me some sample project ? so that i can understand better.
>
> Regards,
> Anbarasi 
>

-- 
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/4a4ae89d-3238-457c-a025-68be04b9684e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Need some sample project coding in Django t

2019-03-28 Thread Anbarasi Ayyannan
Hi,
 I am Django learner need some help for learning.Can you please help me 
with providing me some sample project ? so that i can understand better.

Regards,
Anbarasi 

-- 
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/99da1d17-ff7a-4563-9aa0-2fdbf163e064%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


There's any django app for calendar?

2019-03-28 Thread Fellipe Henrique
Hello guys,  tried to search on google, but no lucky..

Anyone knows any django app for calendar, to set appointments, hour/day...
with frontend?

Thanks!

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
*
*Blog: *http:www.fellipeh.eti.br
*GitHub: https://github.com/fellipeh *
*Twitter: @fh_bash*

-- 
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/CAF1jwZF9cRAYbjPr04MyC%3DAWx_xhAdZd%2B%3Dem_WiOSkSpJgA9jQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to read and parse the csv files using pandas in django

2019-03-28 Thread Alison Mukoma
Hi,

It seems that to achieve that you need to put up a django project and maybe
a seperate app for best practices
where you can write that code in views and send your data to templates as
context variables then after put up your routing in URLs
and you can design your dashboard as you like it.

On Thu, Mar 28, 2019 at 1:34 PM naga lokesh 
wrote:

> I have normal python code to plot the graphs for csv data(data
> visualisation).But I need code in django and graphs should display on
> dashboard...
>
> --
> 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/1f9488c2-3cb1-4d24-8969-7b320f7ad907%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/CAKLADieBX-OZYV1u9x3Z%2BFdOzv_df-swV9Q6pQXokJSKCsDCqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread Aldian Fazrihady
Visa sponsorship?

On Thu, 28 Mar 2019, 18:34 ,  wrote:

> Hi Everyone,
>
> I am looking for a candidate who has architectural experience in building
> a Platform in Python Django.
>
> *Software Architect – Part Remote - (Python Django) – Start **Up *
>
>
>
> £65,000 - £75,000 depending on experience
>
> Cambridge
>
> Permanent
>
>
>
>
>
> We have established a firm partnership with a really exciting start up
> that’s going to revolutionise their market.  The company are looking for a
> candidate to come in and help build a ground-breaking platform that is
> going to modernise the agricultural sector. This technology is going to
> bring a once slow-moving market into the 21st century. It’s a very
> exciting opportunity for anyone who is a team lead or has thought about
> being a team lead. The perfect candidate will be from an architectural
> background with lead experience or ambitions to lead a team.
>
>
>
> They are looking for some with a strong development background in Python
> Django. The ideal candidate is someone with previous experience in
> developing backend creating web applications but also has an interest in
> Machine Learning. The role will entail a very hand son approach to start
> and as the team grows it will move more into a line management role. If you
> have some front-end experience it would also be a bonus.
>
>
>
> A successful candidate must be skilled in:
>
> ·Strong experience of creating web applications in Python Django
>
> ·Understanding of REST API and GraphQL development
>
> ·Experience with Amazon Web Services Or Google Cloud
>
> ·Experience in Machine Learning or want to gain the experience
>
> ·Understanding of container technology such as Docker
>
> ·Architectural Background
>
>
> Desirables:
>
> ·Experience with full stack development – React or React Native
>
> ·Understanding of blockchain technologies
>
> ·Had Open source experience
>
> ·Team Lead Experience
>
>
>
> The Company has really got hold of something really exciting with this
> platform. This role is perfect for anyone who is looking for a new
> challenge or is thinking about developing themselves further. They have a
> beautiful new office in Cambridge with the potential to grow further. After
> meeting with them you get a real feeling that they are a fantastic company
> to work for and their benefits package is also very attractive.
>
>
>
> If you are interested in applying for this role, please email
> sc...@socode.co.uk.
>
>
> If you email I am more than happy to get the full spec over to you and
> more information about the company.
>
>
> Best wishes
>
> Scott
>
> --
> 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/f4c094df-1781-45e4-8087-14566ba12f61%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/CAN7EoAYLYmEE4Dd6jBdztXdtEZ8_gq88kz4_Jv201K2xnxYZWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread Alison Mukoma
Hi

I would like to help regarding your need for a python engineer.

Kind regards,
Alison

On Thu, Mar 28, 2019 at 1:46 PM Serdar Emirci  wrote:

>
> Hello,
> I would like to help if someone can communicate in Turkish.
>
>
>
> Serdar EMIRCI
>
>
>  adresine sahip kullanıcı 28 Mar 2019 Per, 14:34
> tarihinde şunu yazdı:
>
>> Hi Everyone,
>>
>> I am looking for a candidate who has architectural experience in building
>> a Platform in Python Django.
>>
>> *Software Architect – Part Remote - (Python Django) – Start **Up *
>>
>>
>>
>> £65,000 - £75,000 depending on experience
>>
>> Cambridge
>>
>> Permanent
>>
>>
>>
>>
>>
>> We have established a firm partnership with a really exciting start up
>> that’s going to revolutionise their market.  The company are looking for a
>> candidate to come in and help build a ground-breaking platform that is
>> going to modernise the agricultural sector. This technology is going to
>> bring a once slow-moving market into the 21st century. It’s a very
>> exciting opportunity for anyone who is a team lead or has thought about
>> being a team lead. The perfect candidate will be from an architectural
>> background with lead experience or ambitions to lead a team.
>>
>>
>>
>> They are looking for some with a strong development background in Python
>> Django. The ideal candidate is someone with previous experience in
>> developing backend creating web applications but also has an interest in
>> Machine Learning. The role will entail a very hand son approach to start
>> and as the team grows it will move more into a line management role. If you
>> have some front-end experience it would also be a bonus.
>>
>>
>>
>> A successful candidate must be skilled in:
>>
>> ·Strong experience of creating web applications in Python Django
>>
>> ·Understanding of REST API and GraphQL development
>>
>> ·Experience with Amazon Web Services Or Google Cloud
>>
>> ·Experience in Machine Learning or want to gain the experience
>>
>> ·Understanding of container technology such as Docker
>>
>> ·Architectural Background
>>
>>
>> Desirables:
>>
>> ·Experience with full stack development – React or React Native
>>
>> ·Understanding of blockchain technologies
>>
>> ·Had Open source experience
>>
>> ·Team Lead Experience
>>
>>
>>
>> The Company has really got hold of something really exciting with this
>> platform. This role is perfect for anyone who is looking for a new
>> challenge or is thinking about developing themselves further. They have a
>> beautiful new office in Cambridge with the potential to grow further. After
>> meeting with them you get a real feeling that they are a fantastic company
>> to work for and their benefits package is also very attractive.
>>
>>
>>
>> If you are interested in applying for this role, please email
>> sc...@socode.co.uk.
>>
>>
>> If you email I am more than happy to get the full spec over to you and
>> more information about the company.
>>
>>
>> Best wishes
>>
>> Scott
>>
>> --
>> 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/f4c094df-1781-45e4-8087-14566ba12f61%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/CACUOqnYbLaF2Oy2m%3DistRP4umTTxAnh39w6K3SdOJPeR0w7bAQ%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 

Re: Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread Serdar Emirci
Hello,
I would like to help if someone can communicate in Turkish.



Serdar EMIRCI


 adresine sahip kullanıcı 28 Mar 2019 Per, 14:34
tarihinde şunu yazdı:

> Hi Everyone,
>
> I am looking for a candidate who has architectural experience in building
> a Platform in Python Django.
>
> *Software Architect – Part Remote - (Python Django) – Start **Up *
>
>
>
> £65,000 - £75,000 depending on experience
>
> Cambridge
>
> Permanent
>
>
>
>
>
> We have established a firm partnership with a really exciting start up
> that’s going to revolutionise their market.  The company are looking for a
> candidate to come in and help build a ground-breaking platform that is
> going to modernise the agricultural sector. This technology is going to
> bring a once slow-moving market into the 21st century. It’s a very
> exciting opportunity for anyone who is a team lead or has thought about
> being a team lead. The perfect candidate will be from an architectural
> background with lead experience or ambitions to lead a team.
>
>
>
> They are looking for some with a strong development background in Python
> Django. The ideal candidate is someone with previous experience in
> developing backend creating web applications but also has an interest in
> Machine Learning. The role will entail a very hand son approach to start
> and as the team grows it will move more into a line management role. If you
> have some front-end experience it would also be a bonus.
>
>
>
> A successful candidate must be skilled in:
>
> ·Strong experience of creating web applications in Python Django
>
> ·Understanding of REST API and GraphQL development
>
> ·Experience with Amazon Web Services Or Google Cloud
>
> ·Experience in Machine Learning or want to gain the experience
>
> ·Understanding of container technology such as Docker
>
> ·Architectural Background
>
>
> Desirables:
>
> ·Experience with full stack development – React or React Native
>
> ·Understanding of blockchain technologies
>
> ·Had Open source experience
>
> ·Team Lead Experience
>
>
>
> The Company has really got hold of something really exciting with this
> platform. This role is perfect for anyone who is looking for a new
> challenge or is thinking about developing themselves further. They have a
> beautiful new office in Cambridge with the potential to grow further. After
> meeting with them you get a real feeling that they are a fantastic company
> to work for and their benefits package is also very attractive.
>
>
>
> If you are interested in applying for this role, please email
> sc...@socode.co.uk.
>
>
> If you email I am more than happy to get the full spec over to you and
> more information about the company.
>
>
> Best wishes
>
> Scott
>
> --
> 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/f4c094df-1781-45e4-8087-14566ba12f61%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/CACUOqnYbLaF2Oy2m%3DistRP4umTTxAnh39w6K3SdOJPeR0w7bAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Lead Architect / CTO ( Hands on ) - Start Up - Cambridge - 3 Days remote working

2019-03-28 Thread smundie619
Hi Everyone,

I am looking for a candidate who has architectural experience in building a 
Platform in Python Django.

*Software Architect – Part Remote - (Python Django) – Start **Up *

 

£65,000 - £75,000 depending on experience

Cambridge

Permanent

 

 

We have established a firm partnership with a really exciting start up 
that’s going to revolutionise their market.  The company are looking for a 
candidate to come in and help build a ground-breaking platform that is 
going to modernise the agricultural sector. This technology is going to 
bring a once slow-moving market into the 21st century. It’s a very exciting 
opportunity for anyone who is a team lead or has thought about being a team 
lead. The perfect candidate will be from an architectural background with 
lead experience or ambitions to lead a team.

 

They are looking for some with a strong development background in Python 
Django. The ideal candidate is someone with previous experience in 
developing backend creating web applications but also has an interest in 
Machine Learning. The role will entail a very hand son approach to start 
and as the team grows it will move more into a line management role. If you 
have some front-end experience it would also be a bonus. 

 

A successful candidate must be skilled in:

·Strong experience of creating web applications in Python Django

·Understanding of REST API and GraphQL development

·Experience with Amazon Web Services Or Google Cloud

·Experience in Machine Learning or want to gain the experience

·Understanding of container technology such as Docker

·Architectural Background


Desirables:

·Experience with full stack development – React or React Native

·Understanding of blockchain technologies

·Had Open source experience

·Team Lead Experience

 

The Company has really got hold of something really exciting with this 
platform. This role is perfect for anyone who is looking for a new 
challenge or is thinking about developing themselves further. They have a 
beautiful new office in Cambridge with the potential to grow further. After 
meeting with them you get a real feeling that they are a fantastic company 
to work for and their benefits package is also very attractive.

 

If you are interested in applying for this role, please email 
sc...@socode.co.uk.


If you email I am more than happy to get the full spec over to you and more 
information about the company.


Best wishes

Scott

-- 
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/f4c094df-1781-45e4-8087-14566ba12f61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to read and parse the csv files using pandas in django

2019-03-28 Thread naga lokesh
I have normal python code to plot the graphs for csv data(data 
visualisation).But I need code in django and graphs should display on 
dashboard...

-- 
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/1f9488c2-3cb1-4d24-8969-7b320f7ad907%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import calendar
import numpy as np
import time
crimes=pd.read_csv(r"D:\python\Project\data.csv")
crimes.head(2)

crimes.describe()
crimes.drop(['Unnamed: 0', 'Case Number','Block','IUCR', 'X Coordinate', 'Y Coordinate','Updated On', 'FBI Code', 'Beat','Ward','Community Area', 'Location','Latitude','Longitude','District'], inplace=True, axis=1)
crimes.head(4)
crimes=crimes[(crimes['Year']==2016)|(crimes['Year']==2015)]
crimes.describe()
f=plt.figure(1)
sns.countplot(x='Year',data=crimes)
plt.ylabel('No of Crimes')
f.show()
f1=plt.figure(2)
crimes['Date'] = pd.to_datetime(crimes['Date'],format='%m/%d/%Y %I:%M:%S %p')
crimes['Month']=(crimes['Date'].dt.month).apply(lambda x: calendar.month_abbr[x])
crimes.head(4)
crimes['Month'] = pd.Categorical(crimes['Month'] , categories=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], ordered=True)
months=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
crimes.groupby('Month')['ID'].count().plot(marker='o')
plt.xticks(np.arange(12),months)
plt.ylabel('No of Crimes')
f1.show()

f3=plt.figure(3)
crimes["Weekday"] = crimes['Date'].dt.weekday_name
crimes['Weekday'] = pd.Categorical(crimes['Weekday'],categories=['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday', 'Sunday'], ordered=True)
crimes.head()
crimes.groupby('Weekday')['ID'].count().plot(marker='o',label='Crimes')
plt.ylabel('No of Crimes')
f3.show()
f4=plt.figure(4)
sns.countplot(x='Primary Type',data=crimes,order=crimes['Primary Type'].value_counts().index)
plt.xticks(rotation='vertical')
plt.ylabel('No of Crimes')
f4.show()
f5=plt.figure(5)
temp=crimes.groupby('Location Description')['ID'].count().sort_values(ascending=False)
temp=temp[:10]
temp
temp.plot(kind='bar',color='green')
plt.ylabel('No of Crimes')
f5.show()
f7=plt.figure(6)
sns.countplot(x='Arrest',data=crimes)
plt.ylabel('No of Crimes')
f7.show()

f9=plt.figure(7)
sns.set(rc={'figure.figsize':(12,6)})
sns.countplot(x='Primary Type',hue='Arrest',data=crimes,order=crimes['Primary Type'].value_counts().index)
plt.xticks(rotation='vertical')
plt.ylabel('No of Crimes')
f9.show()
f10=plt.figure(8)
arrest=crimes[crimes['Arrest']==True]
arrest.info()
arrest.groupby('Month')['ID'].count().plot(legend=True,label='Arrests',marker='o',figsize=(8,6))
crimes.groupby('Month')['ID'].count().plot(legend=True,label='Crimes',marker='o')
plt.ylabel('No of Crimes')
plt.xticks(np.arange(12),months)
f10.show()
f11=plt.figure(9)
arrest.groupby('Month')['ID'].count()
crimes.groupby('Month')['ID'].count()
top_crime=crimes[(crimes['Primary Type']=='THEFT')|(crimes['Primary Type']=='BATTERY')|(crimes['Primary Type']=='CRIMINAL DAMAGE')|(crimes['Primary Type']=='NARCOTICS')|(crimes['Primary Type']=='ASSAULT')]
temp=top_crime.pivot_table(values='ID', index='Month', columns='Year', aggfunc=np.size)
sns.heatmap(temp)
f11.show()

f13=plt.figure(10)
temp= top_crime.pivot_table(values='ID', index='Primary Type',columns=top_crime['Date'].dt.hour, aggfunc=np.size)
sns.heatmap(temp)
plt.xlabel('Hours of the day')
plt.ylabel('Type of Crime')
f13.show()






Re: Create models using raw SQL queries

2019-03-28 Thread John Crosby
Cs50 from Harvard do quite a nice YouTube course on this. They start with 
SQL.queries direct to database and move into flask and.Django. It might be 
worth a look: https://youtu.be/Eda-NmcE5mQ

> On 28 Mar 2019, at 03:46, cameron hochbrg  wrote:
> 
> Thank you for your response. I am aware that django has for purpose to hide 
> the SQL. the reason why I wanted to use django is that I had used it before 
> and I didn't want to have to learn a new framework if possible. 
> 
>> Le mer. 27 mars 2019 à 21:33, Simon A  a écrit :
>> hi Cameron, as Eric said, by doing this you might not fully take advantage 
>> of the features of django. But if you still want to proceed maybe you can 
>> use the managed option for models. 
>> https://docs.djangoproject.com/en/2.1/ref/models/options/#managed.
>> 
>> with this approach, you'll create the database tables manually first OUTSIDE 
>> of django, then connect django to it afterwards. I haven't tried it before 
>> but this might be what you need.
>> 
>> also if your teacher requires to perform raw sql queries rather than use the 
>> ORM, there is an option to use raw sql queries. 
>> https://docs.djangoproject.com/en/2.1/topics/db/sql/#executing-custom-sql-directly
>> 
>>> On Thursday, March 28, 2019 at 6:16:54 AM UTC+8, Eric Pascual wrote:
>>> Hi,
>>> 
>>> Not sure Django is the right choice in your case since one of its main 
>>> purposes is to hide the SQL stuff by putting the ORM in front. 
>>> 
>>> You'd better use Flask, Tornado or any other Web framework which does not 
>>> come with any special feature WRT data access.
>>> 
>>> Best
>>> 
>>> Eric
>>> 
>>> From: django...@googlegroups.com  on behalf of 
>>> cameron hochbrg 
>>> Sent: Tuesday, March 26, 2019 21:36
>>> To: Django users
>>> Subject: Create models using raw SQL queries
>>>  
>>> hello,
>>> 
>>> for a project for a database class, we wanted to create a web app using 
>>> django. However, our teacher wants us to use raw SQL queries for everything 
>>> involving the database. As such I was wondering if it was possible to 
>>> create mdoels using raw SQL queries.
>>> 
>>> thank you 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...@googlegroups.com.
>>> To post to this group, send email to djang...@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/8145efe7-c169-43d6-86e6-e0d64415a764%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/3a449e4d-12fe-48bb-bdf3-45a6d6a5203e%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/CAAZe9Jjg9BRo_h-5rZYMXMHAN5Ty%3DFCaaTiH8MTMrGBdT%2Bcd9g%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/275B18BE-E3C9-45D4-903E-D32DADD521B3%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fix docs for model.save() with update_fields specified and auto_now field in model

2019-03-28 Thread Sebastian Haase
Please advise if this is the right place to report such a doc enhancement
request - anyone?

BTW - in addition I also noticed that - using deserialization -
object.save() gives unexpected different results for auto_now field:
 - if the object-pk aleady existed , the field is saved as given
 - but if it did not exist, the given value is ignored, and the current
time is used instead
... very strange if you ask me...

Cheers,
Sebastian


On Mon, Mar 25, 2019 at 4:34 PM Sebastian Haase  wrote:

> There are of course stackoverflow postings -e.g.
> https://stackoverflow.com/questions/17474057/enforce-auto-now-when-using-saveupdate-fields
>  -
> is almost 6 years old.
>
> On Monday, March 25, 2019 at 4:30:57 PM UTC+1, Sebastian Haase wrote:
>>
>> Hi,
>> in section "Specifying which fields to save" (
>> https://docs.djangoproject.com/en/dev/ref/models/instances/#specifying-which-fields-to-save)
>> it reads that `update_fields` can be specified mostly for performance
>> benefits...
>> However, I found that regarding a field with "auto_now=True" there is a
>> different outcome.
>> IOW, specifying `update_fields` can be used to keep the old date in
>> respective  "auto_now=True"-field UNLESS that field is also explicitly
>> given un `update_fields`
>>
>> I hope I got this correct - at least that was the impression from my own
>> tests with Django 2.1. Than this should be more prominently stated in the
>> documentation.
>>
>> Thanks for Django.
>> Sebastian
>>
>> --
> 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/sqMrUlZP2-8/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/0eabc3b1-ac4b-491b-a44b-0db1e611e85e%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/CAN06oV-R7SJuW77OXdV5u9M8SrJEkVnYa6k46kk3Y%3DEnJ-2SpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Create models using raw SQL queries

2019-03-28 Thread PASCUAL Eric
Hi Cameron,
the reason why I wanted to use django is that I had used it before and I didn't 
want to have to learn a new framework if possible.
Makes sense.

However, light FWs such as Tornado (which I like a lot, and prefers over Flask 
BTW)  have a really small learning curve for a basic usage (i.e. serving 
dynamic pages with the help of templates). If you're already familiar with 
Django, you'll be productive with Tornado is less than one hour, if not shorter.

If you have the option to invest a bit of time, it deserves a look because 
you'll get the ROI of having one more weapon in your arsenal. You'll thus be 
able to select the best suited option instead of relying on the same one every 
time. Although Django is really great (I work a lot with it for years for my 
job as well as for private projects, and I really enjoy it), there are 
situations it's not the optimal choice. For instance, it can be a bit overkill 
when you don't have to play with a data model justifying an ORM and such.

One important word about Tornado, and why I like it so much : it is based on 
the asynchronous paradigm and despite being single thread and single process 
(although it supports a multi-process execution mode for taking advantage of 
multi-cores CPUs) it is able to serve a lot of requests thanks to this. This is 
especially true when these requests are IO bound (e.g. DB access, network 
requests...). Knowing such an architecture and knowing how to properly 
implement request handlers to leverage its power is IMHO a valuable experience. 
Tornado is amazing when your target is an embedded system with constrained 
resources, such as a Raspberry Pi or alike. I've developed several real world 
apps in this context and it plays amazingly well.

Even if Tornado has not as many batteries included as Django (it brings nothing 
for data access f.i.) it comes with a lot of valuable features inside in 
addition to templating and request serving (CSRF, CORS, sessions, user 
authentication, asynchronous network clients, Web sockets, I18N support, UI 
modules,...). In addition, you don't need to put a WSGI server in front, since 
it includes its own asynchronous production grade server (not a dev server such 
as Django's runserver but a real production one).

Maybe all this looks a bit like Tornado propaganda or Django bashing. It's 
neither of these of course, but only my own experience.

Best regards

Eric


From: django-users@googlegroups.com  on behalf 
of cameron hochbrg 
Sent: Thursday, March 28, 2019 04:46
To: django-users@googlegroups.com
Subject: Re: Create models using raw SQL queries

Thank you for your response. I am aware that django has for purpose to hide the 
SQL. the reason why I wanted to use django is that I had used it before and I 
didn't want to have to learn a new framework if possible.

Le mer. 27 mars 2019 à 21:33, Simon A 
mailto:arriolasi...@gmail.com>> a écrit :
hi Cameron, as Eric said, by doing this you might not fully take advantage of 
the features of django. But if you still want to proceed maybe you can use the 
managed option for models. 
https://docs.djangoproject.com/en/2.1/ref/models/options/#managed.

with this approach, you'll create the database tables manually first OUTSIDE of 
django, then connect django to it afterwards. I haven't tried it before but 
this might be what you need.

also if your teacher requires to perform raw sql queries rather than use the 
ORM, there is an option to use raw sql queries. 
https://docs.djangoproject.com/en/2.1/topics/db/sql/#executing-custom-sql-directly

On Thursday, March 28, 2019 at 6:16:54 AM UTC+8, Eric Pascual wrote:
Hi,

Not sure Django is the right choice in your case since one of its main purposes 
is to hide the SQL stuff by putting the ORM in front.

You'd better use Flask, Tornado or any other Web framework which does not come 
with any special feature WRT data access.

Best

Eric


From: django...@googlegroups.com  on behalf of 
cameron hochbrg 
Sent: Tuesday, March 26, 2019 21:36
To: Django users
Subject: Create models using raw SQL queries

hello,

for a project for a database class, we wanted to create a web app using django. 
However, our teacher wants us to use raw SQL queries for everything involving 
the database. As such I was wondering if it was possible to create mdoels using 
raw SQL queries.

thank you 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...@googlegroups.com.
To post to this group, send email to djang...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit