Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
>From the branches it looks like all Django versions above 2.1 are using
this commit and therefore are fixed.
אורי
u...@speedy.net


On Tue, Jul 9, 2019 at 12:04 AM Joe Reitman  wrote:

> Looks like a bug in pyparsing.py
>
> https://github.com/pyparsing/pyparsing/pull/16
>
> On Monday, July 8, 2019 at 1:09:16 PM UTC-5, Uri Even-Chen wrote:
>>
>> Hi,
>>
>> I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with
>> Python 3.7, and found out that when running tests with deprecation warnings
>> enabled, I receive the following error:
>>
>> DeprecationWarning: Using or importing the ABCs from 'collections'
>> instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
>> working
>>
>> Is this known that Django 1.11 doesn't work with Python 3.7
>> with deprecation warnings enabled? Does this problem exist with other
>> versions of Django too?
>>
>> By the way, running tests without deprecation warnings enabled works (the
>> tests pass).
>>
>> אורי
>> u...@speedy.net
>>
> --
> 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/b75d78e1-93a6-43f7-8326-6dc34fbc2ca6%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/CABD5YeEyonbgMY-uFNqqjgCEVW4M3MaJdeg9Nsc4K%2BNNq3iA8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
I think it's not a bug but a feature of Python which is being deprecated
and will be removed in Python 3.8.

I noticed it about 6 months ago and reported in to Django, but it was
closed with wontfix.
https://code.djangoproject.com/ticket/30078
https://code.djangoproject.com/ticket/30082

It has been fixed in
https://github.com/django/django/commit/aba9763b5117494ca1ef1e420397e3845ad5b262,
but I'm not sure which versions of Django are using this commit.
אורי
u...@speedy.net


On Tue, Jul 9, 2019 at 12:04 AM Joe Reitman  wrote:

> Looks like a bug in pyparsing.py
>
> https://github.com/pyparsing/pyparsing/pull/16
>
> On Monday, July 8, 2019 at 1:09:16 PM UTC-5, Uri Even-Chen wrote:
>>
>> Hi,
>>
>> I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with
>> Python 3.7, and found out that when running tests with deprecation warnings
>> enabled, I receive the following error:
>>
>> DeprecationWarning: Using or importing the ABCs from 'collections'
>> instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
>> working
>>
>> Is this known that Django 1.11 doesn't work with Python 3.7
>> with deprecation warnings enabled? Does this problem exist with other
>> versions of Django too?
>>
>> By the way, running tests without deprecation warnings enabled works (the
>> tests pass).
>>
>> אורי
>> u...@speedy.net
>>
> --
> 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/b75d78e1-93a6-43f7-8326-6dc34fbc2ca6%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/CABD5YeFCKJ0i2ZOzp2Zw%2BU0WAOUt8SOFd7nwPdnNsU_pp7mnqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-08 Thread Andrew Godwin
The bug was only on Python 3.5. It's possible the other system was 3.6 or
3.7?

Andrew

On Sun, Jul 7, 2019 at 9:48 AM Rohit Chopra  wrote:

> Hi Andrew,
>
> Just a small doubt, why same code is working on my local system.
> Both local and server have same  version of requirements mentioned in
> requirements.txt
>
> Rohit
>
> On Sun 7 Jul, 2019, 9:36 PM Andrew Godwin,  wrote:
>
>> Hi Rohit,
>>
>> This is my fault - we made a change in the "asgiref" library that
>> inadvertently removed Python 3.5 support. Channels still needs to support
>> it (even though Django doesn't).
>>
>> If you update to asgiref 3.1.4, which I've just released, that should fix
>> the issue.
>>
>> Andrew
>>
>> On Sun, Jul 7, 2019 at 8:52 AM Rohit Chopra 
>> wrote:
>>
>>> Hi All,
>>>
>>> I am using channels to implement WebSockets.
>>> I am trying to send data through WebSockets from *post_save *django
>>> signal.
>>> Below is my code.
>>>
>>> **signals.py**
>>>
>>>
>>> @receiver(post_save, sender=CheckIn)
>>> def send_data_on_save(sender, instance, **kwargs):
>>> channel_layer = get_channel_layer()
>>> stats = get_stats()
>>> async_to_sync(channel_layer.group_send)(
>>> 'dashboard',
>>> {
>>> 'type': 'send_data',
>>> 'message': stats
>>> }
>>> )
>>>
>>>
>>> analytics = get_analytics()
>>> async_to_sync(channel_layer.group_send)(
>>> 'analytic',
>>> {
>>> 'type': 'send_data',
>>> 'message': analytics
>>> }
>>> )
>>>
>>>
>>>
>>> **consumers.py**
>>>
>>>
>>> class DashboardConsumer(WebsocketConsumer):
>>> def connect(self):
>>> self.room_group_name = 'dashboard'
>>>
>>>
>>> # Join room group
>>> async_to_sync(self.channel_layer.group_add)(
>>> self.room_group_name,
>>> self.channel_name
>>> )
>>>
>>>
>>> self.accept()
>>>
>>>
>>> def disconnect(self, close_code):
>>> # Leave room group
>>> async_to_sync(self.channel_layer.group_discard)(
>>> self.room_group_name,
>>> self.channel_name
>>> )
>>>
>>>
>>> # Receive message from WebSocket
>>> def receive(self, text_data):
>>> text_data_json = json.loads(text_data)
>>> message = text_data_json['message']
>>>
>>>
>>> # Send message to room group
>>> async_to_sync(self.channel_layer.group_send)(
>>> self.room_group_name,
>>> {
>>> 'type': 'send_data',
>>> 'message': message
>>> }
>>> )
>>>
>>>
>>> # Receive message from room group
>>> def send_data(self, event):
>>> message = event['message']
>>>
>>>
>>> # Send message to WebSocket
>>> self.send(text_data=json.dumps({
>>> 'message': message
>>> }))
>>>
>>>
>>>
>>> this same piece of code is working on my local machine(windows) but when
>>> i am trying to run this code on server(ubuntu 16.04) i am getting bellow
>>> error:
>>>
>>> **Traceback**
>>>
>>>
>>>
>>> Exception inside application: module 'asyncio' has no attribute
>>> '_get_running_loop'
>>> File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
>>> result = coro.throw(exc)
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/channels/sessions.py"
>>> , line 183, in __call__
>>> return await self.inner(receive, self.send)
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/channels/middleware.py"
>>> , line 41, in coroutine_call
>>> await inner_instance(receive, send)
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/channels/consumer.py"
>>> , line 59, in __call__
>>> [receive, self.channel_receive], self.dispatch
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/channels/utils.py"
>>> , line 52, in await_many_dispatch
>>> await dispatch(result)
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/asgiref/sync.py"
>>> , line 145, in __call__
>>> return await asyncio.wait_for(future, timeout=None)
>>> File "/usr/lib/python3.5/asyncio/tasks.py", line 373, in wait_for
>>> return (yield from fut)
>>> File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
>>> yield self  # This tells Task to wait for completion.
>>> File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
>>> future.result()
>>> File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
>>> raise self._exception
>>> File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in
>>> run
>>> result = self.fn(*self.args, **self.kwargs)
>>> File
>>> "/home/user1/demowebapps/env/lib/python3.5/site-packages/channels/db.py"
>>> , line 14, in thread_handler
>>> return super().thread_handler(loop, *args, 

Re: CORS policy issue when using with JSON and DJANGO

2019-07-08 Thread Kevin McGraw
Consider you should not use absolute path in your request.  Place your file
in your static folder.  Request the file relative to this static location.
This would be similar to requesting other resources, such as css and js
files...like this:

{% load staticfiles i18n %}



or in javascript:
const data = "{% static 'js/yourfile.js' %}";

On Mon, Jul 8, 2019 at 12:51 PM Mayank Tripathi 
wrote:

> Hi Team,
>
> I am making quiz app, for which i wrote a function in view which will
> generate the json file and place it under the same location as of my all
> teamplates (C:/Desktop/Environment/envQuiz/quizsetup/templates/quizsetup)
> Now I am trying to read this json file in my HTML page via javascript
> file, and getting error as attached "Issue1.PNG".
>
> Please help... I also tried using header.. but no luck.
>
> Below is the js code i am using.
> 
> var requestURL =
> 'C:/Desktop/Environment/envQuiz/quizsetup/templates/quizsetup/json_data.json';
> let questions;
> let questionsCount;
> let currentQuestion;
> let score = 0;
>
> let question_title_elem = document.getElementById("title");
> let answers_elem = document.getElementById("answers");
> let action_btn = document.getElementById("action_btn");
>
> function getQuestions () {
> let request = new XMLHttpRequest();
> request.onreadystatechange = function () {
> if (this.readyState == 4 && this.status == 200) {
> questions = JSON.parse(this.responseText).questions;
> questionsCount = questions.length;
> currentQuestion = 0;
> }
> }
>
> /*json_data -- This is from view takeQuiz */
> request.open("GET", requestURL, false);
> request.send();
> 
> .
> ..
> .
> .
> .
> ...
> 
>
>
>
> --
> 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/57fd8bf5-8056-4355-b1ec-77247445e48d%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/CACHQt1e0rWpZuQ5cjM9P-q4wrmZFB_zFu9Xbzx1-CmFSZyiSVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


CockroachDB & Django

2019-07-08 Thread 'Andy Woods' via Django users
Hello All! 

I'm a product manager at Cockroach Labs 
 working on our SQL product 
area. CockroachDB leverages the Postgres wire protocol to provide 
distributed SQL to our customers. Because we support the same protocol as 
Postgres, we can often take advantage of the drivers, ORMs, and tools 
already created for Postgres with CockroachDB. 

Over the years we've seen community interest 
 in making a 
CockroachDB specific implementation of Django. In fact, one of our 
engineers even went so far as to build a working prototype 
 that passes the initial 
Django tutorial. 

We are now seeking help from experts in the Django community in advancing 
our prototype to the next level. We would happily welcome contributors to 
our open-source Django prototype. 

We'd also love any beta testers who would be willing to give our prototype 
a try and provide feedback to us.

If this is something you might be interested in, please let me know.

Thank you! 

Andy

a...@cockroachlabs.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/816723fc-bae9-46a3-adce-31cd0f5b40e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread Joe Reitman
Looks like a bug in pyparsing.py

https://github.com/pyparsing/pyparsing/pull/16

On Monday, July 8, 2019 at 1:09:16 PM UTC-5, Uri Even-Chen wrote:
>
> Hi,
>
> I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with 
> Python 3.7, and found out that when running tests with deprecation warnings 
> enabled, I receive the following error:
>
> DeprecationWarning: Using or importing the ABCs from 'collections' instead 
> of from 'collections.abc' is deprecated, and in 3.8 it will stop working
>
> Is this known that Django 1.11 doesn't work with Python 3.7 
> with deprecation warnings enabled? Does this problem exist with other 
> versions of Django too?
>
> By the way, running tests without deprecation warnings enabled works (the 
> tests pass).
>
> אורי
> u...@speedy.net 
>

-- 
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/b75d78e1-93a6-43f7-8326-6dc34fbc2ca6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
I found out that the same DeprecationWarning occurs with Django versions
2.0 and 2.0.13.
אורי
u...@speedy.net


‪On Mon, Jul 8, 2019 at 9:08 PM ‫אורי‬‎  wrote:‬

> Hi,
>
> I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with
> Python 3.7, and found out that when running tests with deprecation warnings
> enabled, I receive the following error:
>
> DeprecationWarning: Using or importing the ABCs from 'collections' instead
> of from 'collections.abc' is deprecated, and in 3.8 it will stop working
>
> Is this known that Django 1.11 doesn't work with Python 3.7
> with deprecation warnings enabled? Does this problem exist with other
> versions of Django too?
>
> By the way, running tests without deprecation warnings enabled works (the
> tests pass).
>
> אורי
> u...@speedy.net
>

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


DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
Hi,

I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with
Python 3.7, and found out that when running tests with deprecation warnings
enabled, I receive the following error:

DeprecationWarning: Using or importing the ABCs from 'collections' instead
of from 'collections.abc' is deprecated, and in 3.8 it will stop working

Is this known that Django 1.11 doesn't work with Python 3.7
with deprecation warnings enabled? Does this problem exist with other
versions of Django too?

By the way, running tests without deprecation warnings enabled works (the
tests pass).

אורי
u...@speedy.net

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


Re: reg: Object of type 'ListSerializer' is not JSON serializable

2019-07-08 Thread 'Amitesh Sahay' via Django users
Wow..you nailed it brother, thank you. It solved the issue.


Regards,
Amitesh Sahay 

On Monday, 8 July, 2019, 10:32:13 pm IST, Jani Tiainen  
wrote:  
 
 Hi.
In your view instead of using Response(serializer) you need to use 
Response(serializer.data)
HTH.

ma 8. heinäk. 2019 klo 19.48 'Amitesh Sahay' via Django users 
 kirjoitti:

hello Members, 
I am working on some POC for django rest framework. Its very simple setup, 
nothing complicated. While I was doing my testing I am facing below error:
===
TypeError at /api/status/
Object of type 'ListSerializer' is not JSON serializable
| Request Method: | GET |
| Request URL: | http://127.0.0.1:8000/api/status/ |
| Django Version: | 1.11.8 |
| Exception Type: | TypeError |
| Exception Value: | Object of type 'ListSerializer' is not JSON serializable |
| Exception Location: | /usr/lib/python3.6/json/encoder.py in default, line 180 
|
| Python Executable: | /root/PycharmProjects/vrest/bin/python |
| Python Version: | 3.6.5 |
| Python Path: | ['/root/PycharmProjects/src',
 '/usr/local/buildtools/current/sitecustomize',
 '/usr/lib/python36.zip',
 '/usr/lib/python3.6',
 '/usr/lib/python3.6/lib-dynload',
 '/root/PycharmProjects/vrest/lib/python3.6/site-packages'] |
| Server time: | Mon, 8 Jul 2019 16:03:26 + |

===Below are the details 
:-serializers.pyfrom rest_framework import 
serializers
from STATUS.models import Status


class StatusSerializer(serializers.ModelSerializer):
class Meta:
model = Status
fields = [
'user',
'content',
'image'
]

def validate_content(self, value):
if len(value) > 500:
raise serializers.ValidationError("way too long string")

def validate(self, data):
content = data.get('content', None)
if content =='':
content = None
image = data.get('image', None)
if content is None and image is None:
raise serializers.ValidationError('Required fields')
return data
models.py-from django.db import models
from django.conf import settings


def upload_status_image(instance, filename):
return "updates/{user}/{filename}" .format(user=instance.user, 
filename=filename)


class StatusQuerySet(models.QuerySet):
pass


class StatusManager(models.Manager):
def get_queryset(self):
return StatusQuerySet(self.model, using=self._db)


class Status(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
content = models.TextField(null=True, blank=True)
image = models.ImageField(upload_to=upload_status_image)
updated = models.DateTimeField
timestamp = models.DateTimeField(auto_now_add=True)

objects = StatusManager()

def __str__(self):
return str(self.content)[:50]

class Meta:
verbose_name = 'status post'
verbose_name_plural = 'status posts'views.py
from django.views.generic import View
from rest_framework.views import APIView
from rest_framework.response import Response
from .serializers import StatusSerializer
from STATUS.models import Status


class StatusListSearchAPIView(APIView):
permission_classes = []
authentication_classes = []

def get(self, request, format=None):
qs = Status.objects.all()
serializer = StatusSerializer(qs, many=True)
return Response(serializer)forms.py
from django import forms
from .models import Status

class StatusForm(forms.ModelForm):
class Meta:
model = Status
fields = [
'user',
'content',
'image'
]

def clean_content(self, *args, **kwargs):
content = self.cleaned_data.get('content')
if len(content) > 240:
raise forms.ValidationError('Content is too long')
return content

def clean(self, *args, **kwargs):
data = self.cleaned_data
content = data.get('content', None)
if content == '':
content = None

image = data.get('image', None)
if content is None and image is None:
raise forms.ValidationError('Content or image is required..')
return super().clean(*args, **kwargs)app.urls.py
from django.conf.urls import url, include
from django.contrib import admin
from .views import StatusListSearchAPIView

urlpatterns = [
url(r'^$', StatusListSearchAPIView.as_view()),
#url(r'^create/$', StatusCreateAPIView.as_view()),
#url(r'^(?P.*)/$', StatusDetailAPIiew.as_view()),
#url(r'^(?P.*)/update/$', StatusUpdateAPIView.as_view()),
#url(r'^(?P.*)/update/$', StatusDeleteAPIView.as_view()),

]project.urls.py
from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'api/status/', include('STATUS.API.urls')),
]Project Structure : attached with the email, if not 

Re: reg: Object of type 'ListSerializer' is not JSON serializable

2019-07-08 Thread Jani Tiainen
Hi.

In your view instead of using Response(serializer) you need to use
Response(serializer.data)

HTH.


ma 8. heinäk. 2019 klo 19.48 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> kirjoitti:

> hello Members,
>
> I am working on some POC for django rest framework. Its very simple setup,
> nothing complicated. While I was doing my testing I am facing below error:
>
> ===
> TypeError at /api/status/
>
> Object of type 'ListSerializer' is not JSON serializable
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/api/status/
> Django Version: 1.11.8
> Exception Type: TypeError
> Exception Value:
>
> Object of type 'ListSerializer' is not JSON serializable
>
> Exception Location: /usr/lib/python3.6/json/encoder.py in default, line
> 180
> Python Executable: /root/PycharmProjects/vrest/bin/python
> Python Version: 3.6.5
> Python Path:
>
> ['/root/PycharmProjects/src',
>  '/usr/local/buildtools/current/sitecustomize',
>  '/usr/lib/python36.zip',
>  '/usr/lib/python3.6',
>  '/usr/lib/python3.6/lib-dynload',
>  '/root/PycharmProjects/vrest/lib/python3.6/site-packages']
>
> Server time: Mon, 8 Jul 2019 16:03:26 +
> ===
> Below are the details :
> -
> serializers.py
>
> from rest_framework import serializers
> from STATUS.models import Status
>
>
> class StatusSerializer(serializers.ModelSerializer):
> class Meta:
> model = Status
> fields = [
> 'user',
> 'content',
> 'image'
> ]
>
> def validate_content(self, value):
> if len(value) > 500:
> raise serializers.ValidationError("way too long string")
>
> def validate(self, data):
> content = data.get('content', None)
> if content =='':
> content = None
> image = data.get('image', None)
> if content is None and image is None:
> raise serializers.ValidationError('Required fields')
> return data
>
>
> models.py
> -
>
> from django.db import models
> from django.conf import settings
>
>
> def upload_status_image(instance, filename):
> return "updates/{user}/{filename}" .format(user=instance.user, 
> filename=filename)
>
>
> class StatusQuerySet(models.QuerySet):
> pass
>
>
> class StatusManager(models.Manager):
> def get_queryset(self):
> return StatusQuerySet(self.model, using=self._db)
>
>
> class Status(models.Model):
> user = models.ForeignKey(settings.AUTH_USER_MODEL)
> content = models.TextField(null=True, blank=True)
> image = models.ImageField(upload_to=upload_status_image)
> updated = models.DateTimeField
> timestamp = models.DateTimeField(auto_now_add=True)
>
> objects = StatusManager()
>
> def __str__(self):
> return str(self.content)[:50]
>
> class Meta:
> verbose_name = 'status post'
> verbose_name_plural = 'status posts'
>
> views.py
>
> from django.views.generic import View
> from rest_framework.views import APIView
> from rest_framework.response import Response
> from .serializers import StatusSerializer
> from STATUS.models import Status
>
>
> class StatusListSearchAPIView(APIView):
> permission_classes = []
> authentication_classes = []
>
> def get(self, request, format=None):
> qs = Status.objects.all()
> serializer = StatusSerializer(qs, many=True)
> return Response(serializer)
>
> forms.py
>
> from django import forms
> from .models import Status
>
> class StatusForm(forms.ModelForm):
> class Meta:
> model = Status
> fields = [
> 'user',
> 'content',
> 'image'
> ]
>
> def clean_content(self, *args, **kwargs):
> content = self.cleaned_data.get('content')
> if len(content) > 240:
> raise forms.ValidationError('Content is too long')
> return content
>
> def clean(self, *args, **kwargs):
> data = self.cleaned_data
> content = data.get('content', None)
> if content == '':
> content = None
>
> image = data.get('image', None)
> if content is None and image is None:
> raise forms.ValidationError('Content or image is required..')
> return super().clean(*args, **kwargs)
>
> app.urls.py
>
> from django.conf.urls import url, include
> from django.contrib import admin
> from .views import StatusListSearchAPIView
>
> urlpatterns = [
> url(r'^$', StatusListSearchAPIView.as_view()),
> #url(r'^create/$', StatusCreateAPIView.as_view()),
> #url(r'^(?P.*)/$', StatusDetailAPIiew.as_view()),
> #url(r'^(?P.*)/update/$', StatusUpdateAPIView.as_view()),
> #url(r'^(?P.*)/update/$', StatusDeleteAPIView.as_view()),
>
> ]
>
> project.urls.py
>
> from django.conf.urls import url, include
> from django.contrib import admin
>
> urlpatterns = [
> 

reg: Object of type 'ListSerializer' is not JSON serializable

2019-07-08 Thread 'Amitesh Sahay' via Django users
hello Members, 
I am working on some POC for django rest framework. Its very simple setup, 
nothing complicated. While I was doing my testing I am facing below error:
===
TypeError at /api/status/
Object of type 'ListSerializer' is not JSON serializable
| Request Method: | GET |
| Request URL: | http://127.0.0.1:8000/api/status/ |
| Django Version: | 1.11.8 |
| Exception Type: | TypeError |
| Exception Value: | Object of type 'ListSerializer' is not JSON serializable |
| Exception Location: | /usr/lib/python3.6/json/encoder.py in default, line 180 
|
| Python Executable: | /root/PycharmProjects/vrest/bin/python |
| Python Version: | 3.6.5 |
| Python Path: | ['/root/PycharmProjects/src',
 '/usr/local/buildtools/current/sitecustomize',
 '/usr/lib/python36.zip',
 '/usr/lib/python3.6',
 '/usr/lib/python3.6/lib-dynload',
 '/root/PycharmProjects/vrest/lib/python3.6/site-packages'] |
| Server time: | Mon, 8 Jul 2019 16:03:26 + |

===Below are the details 
:-serializers.pyfrom rest_framework import 
serializers
from STATUS.models import Status


class StatusSerializer(serializers.ModelSerializer):
class Meta:
model = Status
fields = [
'user',
'content',
'image'
]

def validate_content(self, value):
if len(value) > 500:
raise serializers.ValidationError("way too long string")

def validate(self, data):
content = data.get('content', None)
if content =='':
content = None
image = data.get('image', None)
if content is None and image is None:
raise serializers.ValidationError('Required fields')
return data
models.py-from django.db import models
from django.conf import settings


def upload_status_image(instance, filename):
return "updates/{user}/{filename}" .format(user=instance.user, 
filename=filename)


class StatusQuerySet(models.QuerySet):
pass


class StatusManager(models.Manager):
def get_queryset(self):
return StatusQuerySet(self.model, using=self._db)


class Status(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
content = models.TextField(null=True, blank=True)
image = models.ImageField(upload_to=upload_status_image)
updated = models.DateTimeField
timestamp = models.DateTimeField(auto_now_add=True)

objects = StatusManager()

def __str__(self):
return str(self.content)[:50]

class Meta:
verbose_name = 'status post'
verbose_name_plural = 'status posts'views.py
from django.views.generic import View
from rest_framework.views import APIView
from rest_framework.response import Response
from .serializers import StatusSerializer
from STATUS.models import Status


class StatusListSearchAPIView(APIView):
permission_classes = []
authentication_classes = []

def get(self, request, format=None):
qs = Status.objects.all()
serializer = StatusSerializer(qs, many=True)
return Response(serializer)forms.py
from django import forms
from .models import Status

class StatusForm(forms.ModelForm):
class Meta:
model = Status
fields = [
'user',
'content',
'image'
]

def clean_content(self, *args, **kwargs):
content = self.cleaned_data.get('content')
if len(content) > 240:
raise forms.ValidationError('Content is too long')
return content

def clean(self, *args, **kwargs):
data = self.cleaned_data
content = data.get('content', None)
if content == '':
content = None

image = data.get('image', None)
if content is None and image is None:
raise forms.ValidationError('Content or image is required..')
return super().clean(*args, **kwargs)app.urls.py
from django.conf.urls import url, include
from django.contrib import admin
from .views import StatusListSearchAPIView

urlpatterns = [
url(r'^$', StatusListSearchAPIView.as_view()),
#url(r'^create/$', StatusCreateAPIView.as_view()),
#url(r'^(?P.*)/$', StatusDetailAPIiew.as_view()),
#url(r'^(?P.*)/update/$', StatusUpdateAPIView.as_view()),
#url(r'^(?P.*)/update/$', StatusDeleteAPIView.as_view()),

]project.urls.py
from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'api/status/', include('STATUS.API.urls')),
]Project Structure : attached with the email, if not found do let me know I 
will re-attach


Project name:      googleAPP name:           STATUSdjango version :  1.11python 
version :  3.6 djangorestframework : 3.9.4




Regards,
Amitesh Sahay

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

Re: cicking to menu in navebar leads another subpage /subpage

2019-07-08 Thread Jani Tiainen
Hi.

There are two things wrong.

First and most important is that you should always use {%url %} template
tag to form urls to other django urls and preferably by using named url
patterns.

Secondly your hardcoded urls are relative. So each time you click link it
is appended to current url. If you would have been using url-tag you even
wouldn't have this problem.

ma 8. heinäk. 2019 klo 18.51 Surya Adhikari 
kirjoitti:

> i have a menu bar as, HOME   GALLERY
> When i click Home its the index page which is being display after when i
> click Gallary dropdown menu as  house it redirects to  search.html . BUT
> when i  again click hotel it redirects to  127.0.0.1/search/ search1
> insted of 127.0.0.1/search1.
>
>
>
> i have 3 web pages as:  search.html, search1.html, search2.html. i am
> inheriting search.html to all of those HTML file.
>
> My code:
>
>
>
> 
>
>   Home
>
>   
> Gallary
>   
> 
> 
>house
>   hotel
>   hospital
>
> 
>
> --
> 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/b9c81c3c-30e0-4b3c-84cc-5316ac408089%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/CAHn91ocs4%2BSPnYpAA0w29d8rXv8-OVuw%3DLxAs-D_o-ErP%3DxAFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


CORS policy issue when using with JSON and DJANGO

2019-07-08 Thread Mayank Tripathi
Hi Team,

I am making quiz app, for which i wrote a function in view which will 
generate the json file and place it under the same location as of my all 
teamplates (C:/Desktop/Environment/envQuiz/quizsetup/templates/quizsetup)
Now I am trying to read this json file in my HTML page via javascript file, 
and getting error as attached "Issue1.PNG".

Please help... I also tried using header.. but no luck.

Below is the js code i am using.

var requestURL = 
'C:/Desktop/Environment/envQuiz/quizsetup/templates/quizsetup/json_data.json';
let questions;
let questionsCount;
let currentQuestion;
let score = 0;

let question_title_elem = document.getElementById("title");
let answers_elem = document.getElementById("answers");
let action_btn = document.getElementById("action_btn");

function getQuestions () {
let request = new XMLHttpRequest();
request.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) { 
questions = JSON.parse(this.responseText).questions;
questionsCount = questions.length;
currentQuestion = 0;
}
}

/*json_data -- This is from view takeQuiz */
request.open("GET", requestURL, false);
request.send();

.
..
.
.
.
...




-- 
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/57fd8bf5-8056-4355-b1ec-77247445e48d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: insert or update on table "app_job" violates foreign key constraint "app_job_user_id_f90a6dd9_fk_accounts_user_id" DETAIL: Key (user_id)=(3) is not present in table "accounts_user".

2019-07-08 Thread Sonu bhavsar
hello please first chak the value which you wants to insert you django
server
didn't get the foreign key which you had diffiend  so this is the value
error according to me

On Mon 8 Jul, 2019, 1:21 AM Aayush Bhattarai, 
wrote:

> [image: Capture.PNG]
>
>
> *I have used a function-based View to get data from post Request. I need
> to get many data that also include a primary key field too. I need to push
> data into two models. While doing so, I encountered an error.*
>
> #accounts models.py
> from django.db import models
> class User(models.Model):
> user_id = models.PositiveIntegerField(blank=True)
>
> name = models.CharField(max_length=200)
> phone = models.CharField(max_length=200)
> email = models.EmailField(max_length=254)
>
> #app models.py
> from accounts.models import User #from accounts models.py
> class job(models.Model):
> user = models.ForeignKey(User, on_delete=models.DO_NOTHING)
> ..
>
> #views.py
> data = job(.,map_link=map_link,user_id=user_id)
> data.save()
> info=User(name=name,email=email,phone=phone,user_id=user_id)
> info.save()
>
> *Error Message: http://dpaste.com/03Z0EPB *
>
> --
> 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/9f083194-4a44-4f09-94d2-5479fed45ab5%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/CAFYH2d6Z%2BMf9t_Y2rW%3D8koreBymDy7cfSUMrJznJN_%3DRFsA8_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


cicking to menu in navebar leads another subpage /subpage

2019-07-08 Thread Surya Adhikari
i have a menu bar as, HOME   GALLERY   
When i click Home its the index page which is being display after when i 
click Gallary dropdown menu as  house it redirects to  search.html . BUT  
when i  again click hotel it redirects to  127.0.0.1/search/ search1 insted 
of 127.0.0.1/search1. 



i have 3 web pages as:  search.html, search1.html, search2.html. i am 
inheriting search.html to all of those HTML file.

My code:




   
  Home
 
  
Gallary 
  


   house
  hotel
  hospital
 


-- 
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/b9c81c3c-30e0-4b3c-84cc-5316ac408089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django form not saving items to database

2019-07-08 Thread KIKOYO ISAAC
Some lessons about templates with django


On Mon, Jul 1, 2019 at 8:29 AM Joe Reitman  wrote:

> Try this:
>
>
> def sell(request):
>  if request.method == 'POST':
>   form = ProductsForm(request.POST)
>   if form.is_valid():
>   print('form is valid')
>   form.save()
>   return redirect('home')
>
>  else:
>  form = ProductsForm()
>  return render(request, 'sell/products_form.html', {'form': form})
>
>
> On Monday, July 1, 2019 at 6:35:31 AM UTC-5, brian wrote:
>>
>> model
>>
>> class Products(models.Model):
>>
>> UNIT = (
>> ('whole', 'whole unit'),
>> ('item', 'per single item'),
>> )
>>
>>
>> # category = models.ForeignKey(Category, related_name='products', 
>> on_delete=models.CASCADE)
>> ProductName = models.CharField(max_length=255)
>> user = models.ForeignKey(User, on_delete=models.CASCADE)
>> ProductDescription = models.TextField(max_length=500, blank=True)
>> price = models.FloatField()
>> location = models.CharField(choices = COUNTIES, max_length=300)
>> # category = models.CharField( choices = CATEGORIES, max_length=10, 
>> default='other')
>> category = models.ForeignKey(Category, related_name='products', 
>> on_delete=models.CASCADE)
>>
>> unitofsale = models.CharField(max_length=10, choices=UNIT)
>> image = models.FileField(upload_to='products_images/', blank=True)
>> sublocation = models.CharField(max_length=100)
>> created= models.DateTimeField(auto_now_add=True)
>> # slug = models.SlugField(max_length=200,db_index=True)
>>
>> class Meta:
>> ordering = ('-created',)
>> # index_together = (('id', 'slug'),)
>>
>> view
>>
>> def sell(request):
>>  if request.method == 'POST':
>>   form = ProductsForm()
>>   form = ProductsForm(request.POST, request.FILES, instance = 
>> request.user)
>>   if form.is_valid():
>>   print('form is valid')
>>   form = form.save(commit=True)
>>   user = request.user
>>   form.user = user
>>   form.save()
>>   return redirect('home')
>>
>>  else:
>>  form = ProductsForm()
>>  return render(request, 'sell/products_form.html', {'form': form})
>>
>> template
>>
>> > enctype="multipart/form-data">
>> {% csrf_token %}
>> 
>> 
>> 
>> Product Name
>> {{  form.ProductName}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Product Price
>> {{ form.price }}
>> 
>> 
>> 
>> 
>> 
>> 
>> County
>> {{  form.location}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Sub-location
>> {{ form.sublocation }}
>> 
>> 
>> 
>> 
>> 
>> 
>> Category
>> {{  form.category}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Unit of Sale
>> {{ form.unitofsale }}
>> 
>> 
>> 
>> 
>> 
>> 
>> Product Description
>> {{  form.ProductDescription}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Upload Product Image
>> {{ form.image }}
>> 
>> 
>> 
>> 
>> 
>> 
>>  Sell 
>>
>> 
>>
>>
>> 
>> 
>>
>>
>> 
>>
>> {##}
>> 
>>
>>
>> --
> 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/0066c21c-e4c4-43ed-9314-05ec360bbac9%40googlegroups.com
> 
> .
> For more options, visit 

linking diffirent wepages

2019-07-08 Thread Surya Adhikari
my nav menu have 2 menus : 
Home ,  Search Names 

ie. from index page when i click student from Sub menu of Search names  , 
it will redirects search.html after
if i click again teacher from search.html it will redirects to search.html/ 
search1.html rather then search1.html only.

it works normal only from index page. 
 i am inheriting the nav menu from index page to all of other pages. 
what am i doing wrong ? 


   
  Home
 
  
Search Names 
  


  student
  teachers
  non teaching
 

-- 
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/3bf58350-5f27-4b88-b803-1694ada2d6a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: having problem in login rest API

2019-07-08 Thread Sidnei Pereira
If would like to access CustomUser's attributes directly from an student 
instance you should use Multi-table Inheritance 

 
- a concrete model class that inherits from another, so `class 
Student(CustomUser)`. But if you want to keep the relationship using 
explict OneToOne like you did, maybe it's better to query on CustomUser 
instead of Student model, like this:

```
user = CustomUser.objects.filter(
Q(identity_no=identity_no) |
Q(student__student_no=student_no)
).distinct()
``` 

It will bring CustomUser objects (wich have the `check_password` method) 
instead of Student objects

Em segunda-feira, 8 de julho de 2019 01:21:39 UTC-3, laya escreveu:
>
> Yes Check_password attribute is in Django user model and when I write 
> Customuser. Objects.filter() it errors that Student_no is not an attribute 
> for User Django Model.
>
>  
>
> Sent from Mail  for 
> Windows 10
>
>  
>
> *From: *Aldian Fazrihady 
> *Sent: *Sunday, July 7, 2019 9:18 PM
> *To: *django...@googlegroups.com 
> *Subject: *Re: having problem in login rest API
>
>  
>
> It is in user object instead of student object,  right? 
>
> Regards, 
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
>  
>
> On Mon, 8 Jul 2019, 11:12 laya, > wrote:
>
> Hi,
>
> Please help me in this part, I stuck in some days, 
>
> My project is about a university system which professors and students can 
> sign up and login. I use Custom User Django which inherits User Django 
> Model. It should be mentioned that login is by identity number and 
> Student-no and Professor-no. 
>
> My codes are as follow:
>
> Models.py:
>
> class CustomUser(AbstractUser):
> USER_TYPE_CHOICES = ((1, 'student'),
>  (2, 'professor'),)
> username = models.CharField(max_length=50, unique=True)
> user_type = models.PositiveSmallIntegerField(choices=USER_TYPE_CHOICES, 
> null=True)
> first_name = models.CharField(max_length=50)
> last_name = models.CharField(max_length=100)
> identity_no = models.PositiveIntegerField(default=0)
> email = models.EmailField(max_length=300,
>   validators=[RegexValidator
>   
> (regex="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.["r"a-zA-Z0-9-.]+$",
>message='please enter the correct 
> format')],
>   )
> date_joined = models.DateTimeField('date joined', default=timezone.now)
> is_active = models.BooleanField(default=True)
> is_admin = models.BooleanField(default=False)
> is_staff = models.BooleanField(default=False)
>
>
> class Student(models.Model):
> user = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
> entry_year = models.PositiveIntegerField()
> student_no = models.PositiveIntegerField()
>
> def get_full_name(self):
> return self.user.first_name +" "+ self.user.last_name
>
> def __unicode__(self):
> return self.user.first_name +" "+ self.user.last_name
>
> def __str__(self):
> return self.user.first_name +" "+  self.user.last_name
>
>  
>
> serializers.py:
>
>  
>
> """STUDENT LOGIN"""
> class StudentLoginSerializer(serializers.ModelSerializer):
> user = CustomUserSerializerForLogin()
>
> class Meta:
> model = Student
> fields = [
> "user",
> "student_no", ]
>
> def validate(self, data):  # validated_data
> user_data = data.pop('user', None)
> identity_no = user_data.get('identity_no')
> print("identity_no", identity_no)
> student_no = data.get("student_no")
> user = Student.objects.filter(
> Q(user__identity_no=identity_no) |
> Q(student_no=student_no)
> ).distinct()
> # user = 
> user.exclude(user__identity_no__isnull=True).exclude(user__identity_no__iexact='')
> if user.exists() and user.count() == 1:
> user_obj = user.first()
> else:
> raise ValidationError("This username or student_no is not 
> existed")
> if user_obj:
> if not user_obj.check_password(student_no):  # Return a boolean 
> of whether the raw_password was correct.
> raise ValidationError("Incorrect Credential please try again")
> return user_obj
>
> Views.py:
>
>
> class StudentLoginView(APIView):
> queryset = Student.objects.all()
> serializer_class = StudentLoginSerializer
> def post(self, request, *args, **kwargs):
> data = request.data
> serializer = StudentLoginSerializer(data=data)
> if serializer.is_valid(raise_exception=True):
> new_data = serializer.data
> return Response(new_data, status= HTTP_200_OK)
> return Response(serializer.errors, status=HTTP_400_BAD_REQUEST)
>
> Error:
>
> The 

Re: Django Interview Questions

2019-07-08 Thread Joe Reitman
Error 522 Ray ID: 4f324c909f05d29a • 2019-07-08 13:11:05 UTCConnection 
timed out
On Monday, November 2, 2009 at 9:36:41 AM UTC-6, Dimitri Gnidash wrote:
>
> Hey guys, 
>
> For all those of you interviewing or being interviewed, I created a 
> quick list of sample interview questions. 
> While not comprehensive, it is a good start to review these before the 
> interview, if anything, to gain a perspective on how other people 
> might be using Django. 
>
>
> http://blog.lightsonsoftware.com/django-interview-questions-0 
>
>
> Dimitri Gnidash 
> www.lightsonsoftware.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/b18a4b85-ee2d-4a19-821a-21adebef782c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Interview Questions

2019-07-08 Thread Pradeep Singh
thanks alot

On Sun, 7 Jul 2019 at 22:29, pooja kaur 
wrote:

> I have updated with fresh list  of django interview questions for freshers
> and experienced persons.
>
> Here  is the list
>
> https://onlinetutorials.today/python/django-interview-questions/
>
> On Monday, November 2, 2009 at 9:06:41 PM UTC+5:30, Dimitri Gnidash wrote:
>>
>> Hey guys,
>>
>> For all those of you interviewing or being interviewed, I created a
>> quick list of sample interview questions.
>> While not comprehensive, it is a good start to review these before the
>> interview, if anything, to gain a perspective on how other people
>> might be using Django.
>>
>>
>> http://blog.lightsonsoftware.com/django-interview-questions-0
>>
>>
>> Dimitri Gnidash
>> www.lightsonsoftware.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/d63c1465-dcb5-403f-8687-e9fd54e96682%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/CANwgZcaguzb17zvLOrEuZwP1nzBFuAf7T92ienqOE09%2BAM7RzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.