Re: Hire remote Python codeer

2023-12-27 Thread Sounak Ray
Hello I am interested in this position and here is my resume attached to
this email

On Wed, 27 Dec 2023, 19:52 Aakash Singh,  wrote:

> Hi i am interested. Have 3yeara of experience as python developer.
>
> On Tuesday 24 October 2023 at 22:00:11 UTC+5:30 许三高 wrote:
>
>> Hire remote Python codeer
>>
>> We are currently looking for a talented and experienced remote Python
>> programmer to join our team. If you have at least three years of work
>> experience, the ability to independently develop front-end and back-end
>> solutions, strong familiarity with MongoDB, the ability to write automation
>> scripts, and proficiency in Linux system maintenance, then we want to hear
>> from you .
>>
>> Require:
>>
>> At least three years of Python programming experience.
>> Proficient in developing front-end and back-end solutions independently.
>> Very familiar with MongoDB database administration.
>> Ability to write automation scripts to streamline processes.
>> Proficient in Linux system maintenance and troubleshooting.
>> Have experience in developing web development frameworks flask and django
>> salary:
>>
>> Salary range: $1000-$1500 per month.
>> Starting salary: $1,000 per month.
>> The probation period is three months, and the salary can be adjusted
>> based on work performance.
>> Maximum monthly salary is capped at $1,500 based on development skills
>> and performance ratings.
>> telegram: https://t.me/easychat3
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/aed9c176-3243-4fda-a644-17927d1bd287n%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGmHB-Cst%2Bwf%3Dbrp3CmT26ppyQBPGjgJwRzuzBsKe0xN1aGc_g%40mail.gmail.com.


Resume (1).pdf
Description: Adobe PDF document


hello everyone please can someone help me with my problem is very important please Environment: Request Method: GET Request URL: http://127.0.0.1:8000/user/ Django Version: 4.0.4 Python Version: 3

2022-04-30 Thread ray nkamwa
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afc98569-1c64-4322-a533-d62a1a297115n%40googlegroups.com.
Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/user/

Django Version: 4.0.4
Python Version: 3.10.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'djangopressing',
 'bdpressing',
 'rest_framework',
 'django_filters',
 'rest_framework.authtoken',
 'dj_rest_auth']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\django\core\handlers\exception.py",
 line 55, in inner
response = get_response(request)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\django\core\handlers\base.py",
 line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\django\views\decorators\csrf.py",
 line 54, in wrapped_view
return view_func(*args, **kwargs)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\viewsets.py",
 line 125, in view
return self.dispatch(request, *args, **kwargs)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 509, in dispatch
response = self.handle_exception(exc)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 469, in handle_exception
self.raise_uncaught_exception(exc)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 480, in raise_uncaught_exception
raise exc
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 497, in dispatch
self.initial(request, *args, **kwargs)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 415, in initial
self.check_permissions(request)
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 331, in check_permissions
for permission in self.get_permissions():
  File 
"C:\Users\User\Desktop\djangopressing\env\lib\site-packages\rest_framework\views.py",
 line 278, in get_permissions
return [permission() for permission in self.permission_classes]

Exception Type: TypeError at /user/
Exception Value: 'BasePermissionMetaclass' object is not iterable

Re: Sorting price and discount price (urgent)

2021-07-01 Thread Aritra Ray
Hi,

I will avoid using 'urgent'. The problem is as described above, I want to
sort my products in ascending or descending price order which will include
the discount price too if it exists. Right now, if there are two products,
A and B; A being ₹900 and B being ₹1200 too but after discount, ₹ 800, the
sorting order highest to lowest price is: B,A instead of A,B. As Shailesh
asked, discount_price is a model field as I've given in the code about. And
the 'fields = {'price': 'discount_price'}' is wrong after I searched a bit
on the internet, kindly ignore that.

Kindly suggest a way to include discount_price in the sorting parameter
where it'll be considered instead of the original price itself.

On Thu, 1 Jul, 2021, 4:06 pm Shailesh Yadav, 
wrote:

> yes, I agree with Kasper please don't use urgent  OR very urgent, and
> please describe your questions in detail.
> from where you getting this *discount_price* and why you using the *price*
> key for two different values. (can you check by printing *discount_price*)
>
> fields={
> 'price': 'price',
> 'price':'discount_price'
> },
>
>
>
> Thanks & Regards
> Shailesh Yadav
>
>
>
> On Thu, Jul 1, 2021 at 1:33 PM Aritra Ray  wrote:
>
>> I tried to describe the problem but till my capability and it is urgent,
>> not just for increasing the possibility of getting help. Thank you for your
>> advice and help.
>>
>> On Thu, 1 Jul, 2021, 1:30 pm Kasper Laudrup, 
>> wrote:
>>
>>> On 7/1/21 8:03 AM, Aritra Ray wrote:
>>> > I am facing a problem in including the discount_price into
>>> consideration
>>> > when sorting price through the products. Kindly help me to do so. The
>>> > below attached files are filters.py, views.py and  models.py.
>>> >
>>>
>>> Instead of writing "urgent" in hope it will increase your chances of
>>> getting help faster, you'll have a much better chance of getting some
>>> useful help if you spend some time describing the exact problem you have
>>> instead of just "a problem".
>>>
>>> This might help you:
>>>
>>>
>>> https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2b
>>>
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/0c454b7d-cb51-ea95-d0e8-ca4be0c2bad7%40stacktrace.dk
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAFecadvpnYg3CWXRtZfNjWpLPbd4KyqndZ5EdmVUmaP_dbvR0Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFecadvpnYg3CWXRtZfNjWpLPbd4KyqndZ5EdmVUmaP_dbvR0Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMQ-AEVPDkAeFihwbd1xYWNskvUc8zta-9FZW1ePr_rYZ0vnGA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMQ-AEVPDkAeFihwbd1xYWNskvUc8zta-9FZW1ePr_rYZ0vnGA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecaduF3yum-%2BXVDqYTmcaBgSK5UajT8tBYYyErWGoJe7FsAw%40mail.gmail.com.


Re: Sorting price and discount price (urgent)

2021-07-01 Thread Aritra Ray
I tried to describe the problem but till my capability and it is urgent,
not just for increasing the possibility of getting help. Thank you for your
advice and help.

On Thu, 1 Jul, 2021, 1:30 pm Kasper Laudrup,  wrote:

> On 7/1/21 8:03 AM, Aritra Ray wrote:
> > I am facing a problem in including the discount_price into consideration
> > when sorting price through the products. Kindly help me to do so. The
> > below attached files are filters.py, views.py and  models.py.
> >
>
> Instead of writing "urgent" in hope it will increase your chances of
> getting help faster, you'll have a much better chance of getting some
> useful help if you spend some time describing the exact problem you have
> instead of just "a problem".
>
> This might help you:
>
>
> https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2b
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0c454b7d-cb51-ea95-d0e8-ca4be0c2bad7%40stacktrace.dk
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadvpnYg3CWXRtZfNjWpLPbd4KyqndZ5EdmVUmaP_dbvR0Q%40mail.gmail.com.


Sorting price and discount price (urgent)

2021-06-30 Thread Aritra Ray
I am facing a problem in including the discount_price into consideration
when sorting price through the products. Kindly help me to do so. The below
attached files are filters.py, views.py and  models.py.

Regards,
Aritra

class ProductFilter(django_filters.FilterSet):
sort = OrderingFilter(
choices=(
('price', 'Lowest to Highest'),
('-price', 'Highest to Lowest'),
),
fields={
'price': 'price',
'price':'discount_price'
},
)
price = RangeFilter()
class Meta:
model = Items
fields = ['size', 'category']

class Product(ListView):
model = Items
paginate_by = 6
template_name = 'products.html'
ordering = ["-id"]

def get_queryset(self):
queryset = super().get_queryset()
filter = ProductFilter(self.request.GET, queryset)
return filter.qs

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
queryset = self.get_queryset()
filter = ProductFilter(self.request.GET, queryset)
context["filter"] = filter
return context
class Items(BaseModel):
title = models.CharField(max_length=100, null=True, blank=True)
price = models.FloatField(null=True, blank=True)
discount_price = models.FloatField(max_length=100, blank=True, null=True
)
description = models.TextField(max_length=500)
size = models.CharField(choices=SIZES, default=SIZES[0][0], max_length=
10)
category = models.CharField(choices=CATEGORY, default=CATEGORY[0][0
], max_length=1)
featured = models.BooleanField(default=False)
availability = models.CharField(choices=AVAILABILITY, default=
AVAILABILITY[0][0], max_length=1)
image = ResizedImageField(upload_to="", null=True, blank=True)
slug = models.SlugField(max_length=100)
date_added = models.DateField(default=timezone.now)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadsUerZLP7gj7M23DLjytHQcuWc1ys2nqEcs_JNLKMc_Qg%40mail.gmail.com.


Re: In need of urgent help for products sorting and displaying

2021-06-28 Thread Aritra Ray
We've realised the error but are unable to fix it. We'll be grateful if you
can solve it for us as we've been stuck on this for a long time. The search
function in the views.py is conditioning the products via products.html
filter form which is requesting for a "products-list url" which looks like
this: path('products', Product.as_view(), name='products-list').
The problem is the url pattern. Can you help us resolve this issue?
The GitHub link to our repo is
https://github.com/First-project-01/Django-ecommerce


Will be of great help
Regards,
Aritra.


On Mon, 28 Jun 2021 at 16:40, Kasper Laudrup  wrote:

> On 28/06/2021 12.51, Adarsh Sarda wrote:
> >  I've been building a Django E-commerce website and I'm facing problems
> > displaying the sorted products on the products page of my website. I can
> > display the products by category sorting in which I'm using crispy-forms
> > to display the form but I am unable to display the products when sorted
> > by price. I've attached the required files below.
> >
> > Do let me know if anything else is needed.
> > Thanks for your help in advance
> >
>
> Check the "action" parameter to your form. Where exactly does the string
> given to that parameter end?
>
> That should help you figure out how to fix it.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bec6b39c-53a2-2905-eb4c-77cb24ba6c25%40stacktrace.dk
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadvCQGUGmCpd9O%3DHXrgnMV83uHUBhYv5m2qyOqi_Cf10Dw%40mail.gmail.com.


Re: Kindly help me with Django filer, urgent need.

2021-06-25 Thread Aritra Ray
Right, kindly heed to the problem as early as possible, The GitHub link is
provided below.
https://github.com/First-project-01/Django-ecommerce/issues/12

On Fri, 25 Jun 2021 at 19:34, Symaxx  wrote:

> This is easier to work with on GitHub, do you have a GitHub account?
>
> You can raise an issue then share the link here 🙂
>
> On Fri, 25 Jun 2021, 3:04 PM Aritra Ray,  wrote:
>
>> Hi,
>> This is my second request regarding the same issue. I've been building a
>> Django E-commerce website and I'm facing problems filtering the product
>> according to price. I used django-filter to filter category and size.
>> Please suggest a solution for price in the following manner: Latest
>> products, Lowest to Highest and Highest to Lowest. I've made some progress
>> in the template without using django-filter. Kindly help me tie it up with
>> the backend.
>>
>> Do let me know if anything else is needed.
>> Thanks for your help in advance
>>
>> Regards,
>> Aritra
>>
>> #products-html
>>  
>> 
>>   
>>   
>> {{filter.form|crispy}}
>> 
>>   Select sorting criteria
>>   
>>   
>>   
>>   > '-date_added' %}selected{% endif %}>Latest collection
>>   >  %} selected {% endif %}>Lowest to Highest
>>   >  %} selected {% endif %}>Highest to Lowest
>>   
>>   
>>   
>>   
>> > class="glyphicon glyphicon-search"> Search
>> 
>>   
>> 
>>
>> #views.py
>>
>> class Product(ListView):
>> model = Items
>> paginate_by = 6
>> template_name = 'products.html'
>> ordering = ["-id"]
>>
>> def get_queryset(self):
>> queryset = super().get_queryset()
>> filter = ProductFilter(self.request.GET, queryset)
>> return filter.qs
>>
>> def get_context_data(self, **kwargs):
>> context = super().get_context_data(**kwargs)
>> queryset = self.get_queryset()
>> filter = ProductFilter(self.request.GET, queryset)
>> context["filter"] = filter
>> return context
>>
>> # filters.py
>> import django_filters
>> from .models import Items
>>
>> class ProductFilter(django_filters.FilterSet):
>> class Meta:
>> model = Items
>> fields = ['size', 'category']
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAFecadt5eYOdDX3sL46kbscLfbhwAzEcvwUpM9TF_s%2B9YhBGVQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFecadt5eYOdDX3sL46kbscLfbhwAzEcvwUpM9TF_s%2B9YhBGVQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANPYDAtyWhqy%3DGM%3DEGpwVrUFDrTuctmgpN4xPcrLyKYgOv23cg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CANPYDAtyWhqy%3DGM%3DEGpwVrUFDrTuctmgpN4xPcrLyKYgOv23cg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecaduYnX1yYU-f1B2rOKZjX4_XnU-%2BVDGVPZan4DikY_e19A%40mail.gmail.com.


Kindly help me with Django filer, urgent need.

2021-06-25 Thread Aritra Ray
Hi,
This is my second request regarding the same issue. I've been building a
Django E-commerce website and I'm facing problems filtering the product
according to price. I used django-filter to filter category and size.
Please suggest a solution for price in the following manner: Latest
products, Lowest to Highest and Highest to Lowest. I've made some progress
in the template without using django-filter. Kindly help me tie it up with
the backend.

Do let me know if anything else is needed.
Thanks for your help in advance

Regards,
Aritra

#products-html
 

  
  
{{filter.form|crispy}}

  Select sorting criteria
  
  
  
  Latest collection
  Lowest to Highest
  Highest to Lowest
  
  
  
  
 Search

  


#views.py

class Product(ListView):
model = Items
paginate_by = 6
template_name = 'products.html'
ordering = ["-id"]

def get_queryset(self):
queryset = super().get_queryset()
filter = ProductFilter(self.request.GET, queryset)
return filter.qs

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
queryset = self.get_queryset()
filter = ProductFilter(self.request.GET, queryset)
context["filter"] = filter
return context

# filters.py
import django_filters
from .models import Items

class ProductFilter(django_filters.FilterSet):
class Meta:
model = Items
fields = ['size', 'category']

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadt5eYOdDX3sL46kbscLfbhwAzEcvwUpM9TF_s%2B9YhBGVQ%40mail.gmail.com.


In need of urgent help as I've been stuck on this for a while

2021-06-24 Thread Aritra Ray
Hi,
This is my second request regarding the same issue. I've been building a
Django E-commerce website and I'm facing problems filtering the product
according to price. I used django-filter to filter category and size.
Please suggest a solution for price in the following manner: Latest
products, Lowest to Highest and Highest to Lowest. I've made some progress
in the template without using django-filter. Kindly help me tie it up with
the backend.

Do let me know if anything else is needed.
Thanks for your help in advance

Regards,
Aritra

#products-html
 

  
  
{{filter.form|crispy}}

  Select sorting criteria
  
  
  
  Latest collection
  Lowest to Highest
  Highest to Lowest
  
  
  
  
 Search

  


#views.py

class Product(ListView):
model = Items
paginate_by = 6
template_name = 'products.html'
ordering = ["-id"]

def get_queryset(self):
queryset = super().get_queryset()
filter = ProductFilter(self.request.GET, queryset)
return filter.qs

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
queryset = self.get_queryset()
filter = ProductFilter(self.request.GET, queryset)
context["filter"] = filter
return context

# filters.py
import django_filters
from .models import Items

class ProductFilter(django_filters.FilterSet):
class Meta:
model = Items
fields = ['size', 'category']

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadukpt-gAgFwT5%2BKGM2tp3u3fdFDj98MQHWPgbY42dMGVQ%40mail.gmail.com.


Re: Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
Can you write the class based function of the above views.py. I'm unable to
do so. Will be of great help.


On Wed, 23 Jun 2021 at 21:54, Shailesh Yadav 
wrote:

> in Html code
>
> 
> {{items_filter.form}}
> 
>  Search
> 
> 
>
> Thanks & Regards
> Shailesh Yadav
> +91-9920886044
>
>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>
>
>
> On Wed, Jun 23, 2021 at 9:50 PM Shailesh Yadav <
> shaileshyadav7...@gmail.com> wrote:
>
>> Okay.
>> If you using the Django filter then, please try like below in your views..
>>
>> abc_list = ModelName.objects.all()
>> result_filter = ModelNameFilter(request.GET, queryset=abc_list)
>>
>> Thanks & Regards
>> Shailesh Yadav
>> +91-9920886044
>>
>>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>
>>
>>
>>
>> On Wed, Jun 23, 2021 at 9:13 PM Aritra Ray  wrote:
>>
>>> Sorry, it's not working. I tried items_filter.form but it didn't work.
>>> Kindly check my views.py if that'll be of any help or require any changes.
>>>
>>>
>>> On Wed, 23 Jun 2021 at 15:02, Shailesh Yadav <
>>> shaileshyadav7...@gmail.com> wrote:
>>>
>>>> Okay use below in html
>>>> {{yourmodelnameinsmall_filter.form}}
>>>>
>>>> Thanks & Regards
>>>> Shailesh Yadav
>>>> +91-9920886044
>>>>
>>>>   [image: Linkedin]
>>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>>
>>>>
>>>>
>>>> On Wed, Jun 23, 2021 at 2:58 PM Aritra Ray  wrote:
>>>>
>>>>> This isn't working. When we are supplying a filter, the html is
>>>>> displaying all the products irrespective of the requested.
>>>>>
>>>>> On Wed, 23 Jun, 2021, 2:57 pm Shailesh Yadav, <
>>>>> shaileshyadav7...@gmail.com> wrote:
>>>>>
>>>>>> Can you help with what ERROR you are getting?
>>>>>>
>>>>>> Thanks & Regards
>>>>>> Shailesh Yadav
>>>>>> +91-9920886044
>>>>>>
>>>>>>   [image: Linkedin]
>>>>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 23, 2021 at 2:25 PM Aritra Ray 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I've been trying to introduce a filter system in my Django-ecommerce
>>>>>>> website and I've been struggling despite reading the documents, etc. I 
>>>>>>> am
>>>>>>> using 'django-filter' and below are filters.py, models.py, views.py and 
>>>>>>> the
>>>>>>> template. To check out the project, follow the github link:
>>>>>>> https://github.com/First-project-01/Django-ecommerce.
>>>>>>>
>>>>>>> Will be grateful if anyone can sort this out. Thanks in advance.
>>>>>>> Regards,
>>>>>>> Aritra
>>>>>>>
>>>>>>> #filters.py
>>>>>>> class ProductFilter(django_filters.FilterSet):
>>>>>>> price = django_filters.NumberFilter()
>>>>>>> price__gt = django_filters.NumberFilter(field_name='price'
>>>>>>> , lookup_expr='gt')
>>>>>>> price__lt = django_filters.NumberFilter(field_name='price'
>>>>>>> , lookup_expr='lt')
>>>>>>> class Meta:
>>>>>>> model = Items
>>>>>>> fields = ['size', 'availability']
>>>>>>>
>>>>>>> #views.py
>>>>>>> class Product(ListView):
>>>>>>> model = Items
>>>>>>> paginate_by = 6
>>>>>>> template_name = 'products.html'
>>>>>>> def get_context_data(self, **kwargs):
>>>>>>> context = super(Product, self).get_context_data(**kwargs)
>>>>>>> context['filter'] = ProductFilter(self.request.GET, queryset
>>>>>>> =self.get_queryset())
>>>>>>> return context
>>>>

Re: Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
Like this?

class Product(ListView):
model = Items.objects.all()
paginate_by = 6
template_name = 'products.html'
result_filter = ProductFilter(request.GET, queryset=model)

On Wed, 23 Jun 2021 at 21:51, Shailesh Yadav 
wrote:

> Okay.
> If you using the Django filter then, please try like below in your views..
>
> abc_list = ModelName.objects.all()
> result_filter = ModelNameFilter(request.GET, queryset=abc_list)
>
> Thanks & Regards
> Shailesh Yadav
> +91-9920886044
>
>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>
>
>
> On Wed, Jun 23, 2021 at 9:13 PM Aritra Ray  wrote:
>
>> Sorry, it's not working. I tried items_filter.form but it didn't work.
>> Kindly check my views.py if that'll be of any help or require any changes.
>>
>>
>> On Wed, 23 Jun 2021 at 15:02, Shailesh Yadav 
>> wrote:
>>
>>> Okay use below in html
>>> {{yourmodelnameinsmall_filter.form}}
>>>
>>> Thanks & Regards
>>> Shailesh Yadav
>>> +91-9920886044
>>>
>>>   [image: Linkedin]
>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>
>>>
>>>
>>> On Wed, Jun 23, 2021 at 2:58 PM Aritra Ray  wrote:
>>>
>>>> This isn't working. When we are supplying a filter, the html is
>>>> displaying all the products irrespective of the requested.
>>>>
>>>> On Wed, 23 Jun, 2021, 2:57 pm Shailesh Yadav, <
>>>> shaileshyadav7...@gmail.com> wrote:
>>>>
>>>>> Can you help with what ERROR you are getting?
>>>>>
>>>>> Thanks & Regards
>>>>> Shailesh Yadav
>>>>> +91-9920886044
>>>>>
>>>>>   [image: Linkedin]
>>>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jun 23, 2021 at 2:25 PM Aritra Ray 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I've been trying to introduce a filter system in my Django-ecommerce
>>>>>> website and I've been struggling despite reading the documents, etc. I am
>>>>>> using 'django-filter' and below are filters.py, models.py, views.py and 
>>>>>> the
>>>>>> template. To check out the project, follow the github link:
>>>>>> https://github.com/First-project-01/Django-ecommerce.
>>>>>>
>>>>>> Will be grateful if anyone can sort this out. Thanks in advance.
>>>>>> Regards,
>>>>>> Aritra
>>>>>>
>>>>>> #filters.py
>>>>>> class ProductFilter(django_filters.FilterSet):
>>>>>> price = django_filters.NumberFilter()
>>>>>> price__gt = django_filters.NumberFilter(field_name='price'
>>>>>> , lookup_expr='gt')
>>>>>> price__lt = django_filters.NumberFilter(field_name='price'
>>>>>> , lookup_expr='lt')
>>>>>> class Meta:
>>>>>> model = Items
>>>>>> fields = ['size', 'availability']
>>>>>>
>>>>>> #views.py
>>>>>> class Product(ListView):
>>>>>> model = Items
>>>>>> paginate_by = 6
>>>>>> template_name = 'products.html'
>>>>>> def get_context_data(self, **kwargs):
>>>>>> context = super(Product, self).get_context_data(**kwargs)
>>>>>> context['filter'] = ProductFilter(self.request.GET, queryset=
>>>>>> self.get_queryset())
>>>>>> return context
>>>>>> #models.py
>>>>>> AVAILABILITY = (
>>>>>> ('Y', 'Available'),
>>>>>> ('N', 'Out of Stock'),
>>>>>> )
>>>>>>
>>>>>> SIZES = (
>>>>>> ('K', 'King - 108 x 120'),
>>>>>> ('Q', 'Queen - 90 x 108')
>>>>>> )
>>>>>> class Items(BaseModel):
>>>>>> title = models.CharField(max_length=100, null=True, blank=True)
>>>>>> price = models.FloatField(null=True, blank=True)
>>>>>&g

Re: Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
Sorry, it's not working. I tried items_filter.form but it didn't work.
Kindly check my views.py if that'll be of any help or require any changes.


On Wed, 23 Jun 2021 at 15:02, Shailesh Yadav 
wrote:

> Okay use below in html
> {{yourmodelnameinsmall_filter.form}}
>
> Thanks & Regards
> Shailesh Yadav
> +91-9920886044
>
>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>
>
>
> On Wed, Jun 23, 2021 at 2:58 PM Aritra Ray  wrote:
>
>> This isn't working. When we are supplying a filter, the html is
>> displaying all the products irrespective of the requested.
>>
>> On Wed, 23 Jun, 2021, 2:57 pm Shailesh Yadav, <
>> shaileshyadav7...@gmail.com> wrote:
>>
>>> Can you help with what ERROR you are getting?
>>>
>>> Thanks & Regards
>>> Shailesh Yadav
>>> +91-9920886044
>>>
>>>   [image: Linkedin]
>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>
>>>
>>>
>>> On Wed, Jun 23, 2021 at 2:25 PM Aritra Ray  wrote:
>>>
>>>> Hi,
>>>> I've been trying to introduce a filter system in my Django-ecommerce
>>>> website and I've been struggling despite reading the documents, etc. I am
>>>> using 'django-filter' and below are filters.py, models.py, views.py and the
>>>> template. To check out the project, follow the github link:
>>>> https://github.com/First-project-01/Django-ecommerce.
>>>>
>>>> Will be grateful if anyone can sort this out. Thanks in advance.
>>>> Regards,
>>>> Aritra
>>>>
>>>> #filters.py
>>>> class ProductFilter(django_filters.FilterSet):
>>>> price = django_filters.NumberFilter()
>>>> price__gt = django_filters.NumberFilter(field_name='price'
>>>> , lookup_expr='gt')
>>>> price__lt = django_filters.NumberFilter(field_name='price'
>>>> , lookup_expr='lt')
>>>> class Meta:
>>>> model = Items
>>>> fields = ['size', 'availability']
>>>>
>>>> #views.py
>>>> class Product(ListView):
>>>> model = Items
>>>> paginate_by = 6
>>>> template_name = 'products.html'
>>>> def get_context_data(self, **kwargs):
>>>> context = super(Product, self).get_context_data(**kwargs)
>>>> context['filter'] = ProductFilter(self.request.GET, queryset=
>>>> self.get_queryset())
>>>> return context
>>>> #models.py
>>>> AVAILABILITY = (
>>>> ('Y', 'Available'),
>>>> ('N', 'Out of Stock'),
>>>> )
>>>>
>>>> SIZES = (
>>>> ('K', 'King - 108 x 120'),
>>>> ('Q', 'Queen - 90 x 108')
>>>> )
>>>> class Items(BaseModel):
>>>> title = models.CharField(max_length=100, null=True, blank=True)
>>>> price = models.FloatField(null=True, blank=True)
>>>> size = models.CharField(choices=SIZES, default=SIZES[0][0
>>>> ], max_length=1)
>>>> description = models.TextField(max_length=500)
>>>> availability = models.CharField(choices=AVAILABILITY, default=
>>>> AVAILABILITY[0][0], max_length=1)
>>>> ...
>>>>
>>>> #product-list.html
>>>> 
>>>>  
>>>> {{ filter.form| crispy }}
>>>> Search
>>>>  
>>>> 
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" 

Re: Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
Okay, will try and let you know.
Thank you for your response.

On Wed, 23 Jun, 2021, 3:02 pm Shailesh Yadav, 
wrote:

> Okay use below in html
> {{yourmodelnameinsmall_filter.form}}
>
> Thanks & Regards
> Shailesh Yadav
> +91-9920886044
>
>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>
>
>
> On Wed, Jun 23, 2021 at 2:58 PM Aritra Ray  wrote:
>
>> This isn't working. When we are supplying a filter, the html is
>> displaying all the products irrespective of the requested.
>>
>> On Wed, 23 Jun, 2021, 2:57 pm Shailesh Yadav, <
>> shaileshyadav7...@gmail.com> wrote:
>>
>>> Can you help with what ERROR you are getting?
>>>
>>> Thanks & Regards
>>> Shailesh Yadav
>>> +91-9920886044
>>>
>>>   [image: Linkedin]
>>> <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>>>
>>>
>>>
>>> On Wed, Jun 23, 2021 at 2:25 PM Aritra Ray  wrote:
>>>
>>>> Hi,
>>>> I've been trying to introduce a filter system in my Django-ecommerce
>>>> website and I've been struggling despite reading the documents, etc. I am
>>>> using 'django-filter' and below are filters.py, models.py, views.py and the
>>>> template. To check out the project, follow the github link:
>>>> https://github.com/First-project-01/Django-ecommerce.
>>>>
>>>> Will be grateful if anyone can sort this out. Thanks in advance.
>>>> Regards,
>>>> Aritra
>>>>
>>>> #filters.py
>>>> class ProductFilter(django_filters.FilterSet):
>>>> price = django_filters.NumberFilter()
>>>> price__gt = django_filters.NumberFilter(field_name='price'
>>>> , lookup_expr='gt')
>>>> price__lt = django_filters.NumberFilter(field_name='price'
>>>> , lookup_expr='lt')
>>>> class Meta:
>>>> model = Items
>>>> fields = ['size', 'availability']
>>>>
>>>> #views.py
>>>> class Product(ListView):
>>>> model = Items
>>>> paginate_by = 6
>>>> template_name = 'products.html'
>>>> def get_context_data(self, **kwargs):
>>>> context = super(Product, self).get_context_data(**kwargs)
>>>> context['filter'] = ProductFilter(self.request.GET, queryset=
>>>> self.get_queryset())
>>>> return context
>>>> #models.py
>>>> AVAILABILITY = (
>>>> ('Y', 'Available'),
>>>> ('N', 'Out of Stock'),
>>>> )
>>>>
>>>> SIZES = (
>>>> ('K', 'King - 108 x 120'),
>>>> ('Q', 'Queen - 90 x 108')
>>>> )
>>>> class Items(BaseModel):
>>>> title = models.CharField(max_length=100, null=True, blank=True)
>>>> price = models.FloatField(null=True, blank=True)
>>>> size = models.CharField(choices=SIZES, default=SIZES[0][0
>>>> ], max_length=1)
>>>> description = models.TextField(max_length=500)
>>>> availability = models.CharField(choices=AVAILABILITY, default=
>>>> AVAILABILITY[0][0], max_length=1)
>>>> ...
>>>>
>>>> #product-list.html
>>>> 
>>>>  
>>>> {{ filter.form| crispy }}
>>>> Search
>>>>  
>>>> 
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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 i

Re: Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
This isn't working. When we are supplying a filter, the html is displaying
all the products irrespective of the requested.

On Wed, 23 Jun, 2021, 2:57 pm Shailesh Yadav, 
wrote:

> Can you help with what ERROR you are getting?
>
> Thanks & Regards
> Shailesh Yadav
> +91-9920886044
>
>   [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110>
>
>
>
> On Wed, Jun 23, 2021 at 2:25 PM Aritra Ray  wrote:
>
>> Hi,
>> I've been trying to introduce a filter system in my Django-ecommerce
>> website and I've been struggling despite reading the documents, etc. I am
>> using 'django-filter' and below are filters.py, models.py, views.py and the
>> template. To check out the project, follow the github link:
>> https://github.com/First-project-01/Django-ecommerce.
>>
>> Will be grateful if anyone can sort this out. Thanks in advance.
>> Regards,
>> Aritra
>>
>> #filters.py
>> class ProductFilter(django_filters.FilterSet):
>> price = django_filters.NumberFilter()
>> price__gt = django_filters.NumberFilter(field_name='price'
>> , lookup_expr='gt')
>> price__lt = django_filters.NumberFilter(field_name='price'
>> , lookup_expr='lt')
>> class Meta:
>> model = Items
>> fields = ['size', 'availability']
>>
>> #views.py
>> class Product(ListView):
>> model = Items
>> paginate_by = 6
>> template_name = 'products.html'
>> def get_context_data(self, **kwargs):
>> context = super(Product, self).get_context_data(**kwargs)
>> context['filter'] = ProductFilter(self.request.GET, queryset=self
>> .get_queryset())
>> return context
>> #models.py
>> AVAILABILITY = (
>> ('Y', 'Available'),
>> ('N', 'Out of Stock'),
>> )
>>
>> SIZES = (
>> ('K', 'King - 108 x 120'),
>> ('Q', 'Queen - 90 x 108')
>> )
>> class Items(BaseModel):
>> title = models.CharField(max_length=100, null=True, blank=True)
>> price = models.FloatField(null=True, blank=True)
>> size = models.CharField(choices=SIZES, default=SIZES[0][0
>> ], max_length=1)
>> description = models.TextField(max_length=500)
>> availability = models.CharField(choices=AVAILABILITY, default=
>> AVAILABILITY[0][0], max_length=1)
>> ...
>>
>> #product-list.html
>> 
>>  
>> {{ filter.form| crispy }}
>> Search
>>  
>> 
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMQ-AEXsJ%2B19X3aO740%3DD%2BZUhcEYujh2FWScZDXCqM4cB0Bikg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMQ-AEXsJ%2B19X3aO740%3DD%2BZUhcEYujh2FWScZDXCqM4cB0Bikg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecaduw28greFLXGqsTuit5JmCrzfHqawOU9HKvoojfXQLYtg%40mail.gmail.com.


Need urgent help with filter system (django-filter) in Django

2021-06-23 Thread Aritra Ray
Hi,
I've been trying to introduce a filter system in my Django-ecommerce
website and I've been struggling despite reading the documents, etc. I am
using 'django-filter' and below are filters.py, models.py, views.py and the
template. To check out the project, follow the github link:
https://github.com/First-project-01/Django-ecommerce.

Will be grateful if anyone can sort this out. Thanks in advance.
Regards,
Aritra

#filters.py
class ProductFilter(django_filters.FilterSet):
price = django_filters.NumberFilter()
price__gt = django_filters.NumberFilter(field_name='price', lookup_expr=
'gt')
price__lt = django_filters.NumberFilter(field_name='price', lookup_expr=
'lt')
class Meta:
model = Items
fields = ['size', 'availability']

#views.py
class Product(ListView):
model = Items
paginate_by = 6
template_name = 'products.html'
def get_context_data(self, **kwargs):
context = super(Product, self).get_context_data(**kwargs)
context['filter'] = ProductFilter(self.request.GET, queryset=self.
get_queryset())
return context
#models.py
AVAILABILITY = (
('Y', 'Available'),
('N', 'Out of Stock'),
)

SIZES = (
('K', 'King - 108 x 120'),
('Q', 'Queen - 90 x 108')
)
class Items(BaseModel):
title = models.CharField(max_length=100, null=True, blank=True)
price = models.FloatField(null=True, blank=True)
size = models.CharField(choices=SIZES, default=SIZES[0][0], max_length=1
)
description = models.TextField(max_length=500)
availability = models.CharField(choices=AVAILABILITY, default=
AVAILABILITY[0][0], max_length=1)
...

#product-list.html

 
{{ filter.form| crispy }}
Search
 


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadtwZG0%3DLwE989gsFkusgAnAGkvEspF3i5WC1-uWO6OOHw%40mail.gmail.com.


Re: In need of urgent help regarding dynamic image display v

2021-06-23 Thread Aritra Ray
Thank you, it worked.


On Fri, 18 Jun 2021 at 00:08, Ayush Bisht  wrote:

> I think there is 2 method which you can do to get the work done. ...
>
> *1 : first one* .. you can declare a property decorator which just return
> the url of that image
>
>
>   class Banner(BaseModel):
> image = ResizedImageField(upload_to="banner", null=True,
> blank=True)
>
> @property
>   def get_image_url(self):
>   return str(self.image.url).replace(" ", "")
>
> and then you can simply access this function like normal attributes..
>
>  
> {% for banner in banners %}
> 
> {% endfor %}
>
> 
>
>
> *2 Method :  *you can create a   root path for static files as well
>
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [os.path.join(BASE_DIR,'static')]
>
>
> now , with this root path I can access all the file belonging to that
> particular folder 
>
> folder structure ...
>
> * static
>*Banner
>  *banner1.jpg
>
>
>
> now u can simply access all the stuff ...
>
> .banner-item-01 {
> padding:300px 0px;
> background-size: cover;
> background-image: url('/static/Banner/banner1.jpg');
> background-repeat: no-repeat;
> background-position: center center;
> }
>
> On Thursday, June 17, 2021 at 4:11:11 AM UTC-7 arit...@gmail.com wrote:
>
>> Hi,
>> I've been building a Django E-commerce website and I'm facing this
>> problem.
>> I have created a Banner model which will take in images via
>> django.ResizedImage and then display it in the homepage. But I'm unable to
>> process them in CSS.
>> Kindly help me out.
>>
>> PS: I'll have to process it as background-image orelse when passed as
>>  in html, we're getting extra wrapped spaces which aren't needed.
>>
>> Below given are: views.py, models.py, index.html, css block.
>> Kindly help me out as it is urgent. Thank you for your support in advance.
>>
>> Regards,
>> Aritra
>>
>> class HomeView(ListView):
>> context_object_name = 'items'
>> template_name = "index.html"
>> queryset = Items.objects.all()
>>
>> def get_context_data(self, **kwargs):
>> context = super(HomeView, self).get_context_data(**kwargs)
>> context['banners'] = Banner.objects.all()
>> return context
>>
>> class Banner(BaseModel):
>> image = ResizedImageField(upload_to="banner", null=True, blank=True)
>>
>> 
>> 
>>   {% for banner in banners %}
>> > {{banner.image.url}}>
>>   {% endfor %}
>> 
>> 
>>
>>   .banner-item-01 {
>>padding:300px 0px;
>>background-size: cover;
>>background-image: url(var(--item));
>>background-repeat: no-repeat;
>>background-position: center center;
>> }
>>
>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/241a1f08-a093-4f3a-a01f-46e0a3e73ce1n%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadu_Gjnr4nzRV_GEkfCpG%3DGWP%3DaNKoR0yZxqzqk8cE3MGQ%40mail.gmail.com.


Re: In need of help regarding HTML Submit button

2021-06-17 Thread Aritra Ray
Thank you, it worked!

On Tue, 15 Jun 2021 at 00:13, Nikeet NA  wrote:

> Change the type of button back to type='button" rather than type="submit"
>
> On Monday, 14 June 2021 at 22:39:27 UTC+5:30 arit...@gmail.com wrote:
>
>> Hi,
>> I'm facing an error with the Place Order button not working when the user
>> is choosing the default address. Kindly help me out in this regard and let
>> me know if any other files are needed.
>> Thank you in advance
>> Regards,
>> Aritra.
>>
>> class Address(BaseModel):
>> user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, 
>> blank=True)
>> address = models.CharField(max_length=500, null=True)
>> phone = models.CharField(max_length=10, null=False)
>> city = models.CharField(max_length=100, null=True)
>> state = models.CharField(max_length=100, null=True)
>> pincode = models.CharField(max_length=100, null=False)
>> default = models.BooleanField(default=False, null=True, blank=True)
>>
>> def __str__(self):
>> return self.user.username
>>
>> class Meta:
>> verbose_name_plural = 'Addresses'
>>
>> 
>>  {% if default_address %}
>>  
>>  > id="use_default">
>>  Use default 
>> shipping address: {{ default_address.address|truncatechars:40 }}
>>  
>>  {% endif %}
>> 
>> 
>>  
>>  > >Back
>>  
>>  Place 
>> Order
>> 
>>
>> class CheckoutView(View):
>> def get(self, *args, **kwargs):
>> try:
>> order = Cart.objects.get(user=self.request.user, ordered=False)
>> form = CheckoutForm()
>> context = {
>> 'form': form,
>> 'order': order,
>> }
>>
>> shipping_address_qs = Address.objects.filter(
>> user=self.request.user,
>> default=True
>> )
>> if shipping_address_qs.exists():
>> context.update(
>> {'default_address': shipping_address_qs[0]})
>> return render(self.request, "checkout.html", context)
>> except ObjectDoesNotExist:
>> messages.info(self.request, "You do not have an active order")
>> return redirect(reverse('store:cart-page'))
>>
>> def post(self, *args, **kwargs):
>> form = CheckoutForm(self.request.POST)
>> try:
>> order = Cart.objects.get(user=self.request.user, ordered=False)
>> if form.is_valid():
>> use_default = form.cleaned_data.get(
>> 'use_default')
>> if use_default:
>> print("Using the default shipping address")
>> address_qs = Address.objects.filter(
>> user=self.request.user,
>> default=True
>> )
>> if address_qs.exists():
>> shipping_address = address_qs[0]
>> order.shipping_address = shipping_address
>> order.save()
>> else:
>> messages.info(self.request, "No default shipping 
>> address available")
>> return redirect('store:cart-page')
>> else:
>> address = form.cleaned_data.get('address')
>> pincode = form.cleaned_data.get('zip')
>> phone = form.cleaned_data.get('phone')
>> city = form.cleaned_data.get('city')
>> state = form.cleaned_data.get('state')
>> if form.is_valid():
>> shipping_address = Address(
>> user=self.request.user,
>> address=address,
>> pincode=pincode,
>> state=state,
>> city=city,
>> phone=phone
>> )
>> shipping_address.save()
>> order.shipping_address = shipping_address
>> order.save()
>>
>> set_default = form.cleaned_data.get(
>> 'set_default')
>> if set_default:
>> shipping_address.default = True
>> shipping_address.save()
>>
>> else:
>> messages.info(self.request, "Please fill in the 
>> required shipping address fields")
>> except ObjectDoesNotExist:
>> messages.warning(self.request, "You do not have an active order")
>> return redirect(reverse('store:cart-page'))
>> return redirect(reverse('store:payment-page'))
>>
>> --
> 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

In need of urgent help regarding dynamic image display v

2021-06-17 Thread Aritra Ray
Hi,
I've been building a Django E-commerce website and I'm facing this problem.
I have created a Banner model which will take in images via
django.ResizedImage and then display it in the homepage. But I'm unable to
process them in CSS.
Kindly help me out.

PS: I'll have to process it as background-image orelse when passed as 
in html, we're getting extra wrapped spaces which aren't needed.

Below given are: views.py, models.py, index.html, css block.
Kindly help me out as it is urgent. Thank you for your support in advance.

Regards,
Aritra

class HomeView(ListView):
context_object_name = 'items'
template_name = "index.html"
queryset = Items.objects.all()

def get_context_data(self, **kwargs):
context = super(HomeView, self).get_context_data(**kwargs)
context['banners'] = Banner.objects.all()
return context

class Banner(BaseModel):
image = ResizedImageField(upload_to="banner", null=True, blank=True)



  {% for banner in banners %}

  {% endfor %}



  .banner-item-01 {
   padding:300px 0px;
   background-size: cover;
   background-image: url(var(--item));
   background-repeat: no-repeat;
   background-position: center center;
}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadvDi5V4%3DuetJhSZo1FSyOyGsvLH_s7K%2Bhc-vMLU%2BHLBpA%40mail.gmail.com.


Re: location based web app with django and geodjango

2021-06-15 Thread Aritra Ray
Hello,
Register your app in setting.py-> INSTALLED_APPS like
'appname.apps.appnameConfig' from your apps.py. Alternatively, you can
write 'app_name' instead of the whole sentence.

Regards,
Aritra.

On Tue, 15 Jun 2021 at 05:46, Stathis Angelou  wrote:

> good evening all,
>
> I have started building a webapp using python, django and linux, but i'm
> afraid the app does not appear under admin tab in 127.0.0.1:8000/admin
> I am sure I am missing something, attached is my code
>
> Thank you in advance
> Stathis
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f96dec5e-7f33-43d5-b48b-283460668f5an%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadsoLmb6WPRyZG1WaMu54a0_jg15zQBE70XvLBzoznysTw%40mail.gmail.com.


In need of help regarding HTML Submit button

2021-06-14 Thread Aritra Ray
Hi,
I'm facing an error with the Place Order button not working when the user
is choosing the default address. Kindly help me out in this regard and let
me know if any other files are needed.
Thank you in advance
Regards,
Aritra.

class Address(BaseModel):
user = models.ForeignKey(User, on_delete=models.SET_NULL,
null=True, blank=True)
address = models.CharField(max_length=500, null=True)
phone = models.CharField(max_length=10, null=False)
city = models.CharField(max_length=100, null=True)
state = models.CharField(max_length=100, null=True)
pincode = models.CharField(max_length=100, null=False)
default = models.BooleanField(default=False, null=True, blank=True)

def __str__(self):
return self.user.username

class Meta:
verbose_name_plural = 'Addresses'


 {% if default_address %}
 
 
 Use
default shipping address: {{ default_address.address|truncatechars:40
}}
 
 {% endif %}


 
 Back
 
 Place Order


class CheckoutView(View):
def get(self, *args, **kwargs):
try:
order = Cart.objects.get(user=self.request.user, ordered=False)
form = CheckoutForm()
context = {
'form': form,
'order': order,
}

shipping_address_qs = Address.objects.filter(
user=self.request.user,
default=True
)
if shipping_address_qs.exists():
context.update(
{'default_address': shipping_address_qs[0]})
return render(self.request, "checkout.html", context)
except ObjectDoesNotExist:
messages.info(self.request, "You do not have an active order")
return redirect(reverse('store:cart-page'))

def post(self, *args, **kwargs):
form = CheckoutForm(self.request.POST)
try:
order = Cart.objects.get(user=self.request.user, ordered=False)
if form.is_valid():
use_default = form.cleaned_data.get(
'use_default')
if use_default:
print("Using the default shipping address")
address_qs = Address.objects.filter(
user=self.request.user,
default=True
)
if address_qs.exists():
shipping_address = address_qs[0]
order.shipping_address = shipping_address
order.save()
else:
messages.info(self.request, "No default
shipping address available")
return redirect('store:cart-page')
else:
address = form.cleaned_data.get('address')
pincode = form.cleaned_data.get('zip')
phone = form.cleaned_data.get('phone')
city = form.cleaned_data.get('city')
state = form.cleaned_data.get('state')
if form.is_valid():
shipping_address = Address(
user=self.request.user,
address=address,
pincode=pincode,
state=state,
city=city,
phone=phone
)
shipping_address.save()
order.shipping_address = shipping_address
order.save()

set_default = form.cleaned_data.get(
'set_default')
if set_default:
shipping_address.default = True
shipping_address.save()

else:
messages.info(self.request, "Please fill in
the required shipping address fields")
except ObjectDoesNotExist:
messages.warning(self.request, "You do not have an active order")
return redirect(reverse('store:cart-page'))
return redirect(reverse('store:payment-page'))

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadue4NPnM7K12gr1R8PhCOgk9cX0P0JmOTWD%2BD0UhB%3DaMg%40mail.gmail.com.


Re: In immediate help of a long time pending request, kindly help.

2021-06-04 Thread Aritra Ray
Hello

I tried this but I'm still seeing the list of cart items. Can you tell me
where I am going wrong?

Regards,
Aritra

On Tue, 1 Jun 2021 at 21:23, Joel Tanko <7thog...@gmail.com> wrote:

> If you want to show the items relative to the currently logged in user,
> try adding this option => limit_choices_to={'user' : 'user'}, to your items
> field in models.py
>
>
>
> On Tuesday, 1 June 2021, Aritra Ray  wrote:
>
>> Right, thank you so much.
>>
>> Regards.
>>
>> On Tue, 1 Jun, 2021, 8:27 pm oba stephen,  wrote:
>>
>>> You should return this if you want to redirect to cart;
>>>
>>> return redirect(reverse("store:cart-page", kwargs={"id": >> cart>}))
>>>
>>> Best regards
>>>
>>> Stephen Oba
>>>
>>> On Tue, Jun 1, 2021, 3:27 PM Aritra Ray  wrote:
>>>
>>>> Sure, here's the file.
>>>>
>>>> [image: 2021-06-01 (6).png]
>>>>
>>>> Regards,
>>>> Aritra.
>>>>
>>>> On Tue, 1 Jun 2021 at 19:45, oba stephen  wrote:
>>>>
>>>>> Can I see your urls.py?
>>>>>
>>>>> Best regards
>>>>>
>>>>> Stephen Oba
>>>>>
>>>>> On Tue, Jun 1, 2021, 3:05 PM Aritra Ray  wrote:
>>>>>
>>>>>> Oh, okay. I was unaware of that. Although, my cart page is getting
>>>>>> redirected back to home page. Can you spot any mistake in the provided
>>>>>> screenshots?
>>>>>> Also, can you please guide on how to redirect a function to the
>>>>>> previously visited page? Like add-to-cart should redirect to either
>>>>>> products page or cart page itself depending on which page the user called
>>>>>> it from.
>>>>>>
>>>>>> On Tue, 1 Jun, 2021, 6:37 pm oba stephen, 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I don't think you have an error here. Although I haven't looked at
>>>>>>> the code, but from your django admin page I can see that none of those
>>>>>>> items are selected.
>>>>>>>
>>>>>>> If you run a query from your terminal, you would notice that the
>>>>>>> items would return as empty.
>>>>>>>
>>>>>>> When you create a many to many relationship in django, all objects
>>>>>>> on that related model would display this way.
>>>>>>>
>>>>>>> What is the difference between different carts?  The difference is,
>>>>>>> the items would be selected or highlighted in a cart they belong to.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> Stephen Oba
>>>>>>>
>>>>>>> On Tue, Jun 1, 2021, 1:52 PM Aritra Ray  wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>> This is Aritra reposting the same error. I have a problem regarding
>>>>>>>> an E-commerce Django website where the cart model on the admin page is
>>>>>>>> showing the items added to cart by one user to all other users as well.
>>>>>>>> I have a Profile model and a Cart model attached below. The
>>>>>>>> views.py has been attached too. Kindly comment back if anything else is
>>>>>>>> needed.
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Aritra
>>>>>>>>
>>>>>>>> Error:
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (4).png]
>>>>>>>>
>>>>>>>> Views.py
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (1).png][image: 2021-06-01 (5).png]
>>>>>>>>
>>>>>>>> Models.py
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (2).png][image: 2021-06-01 (3).png]
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message b

Re: In immediate help of a long time pending request, kindly help.

2021-06-01 Thread Aritra Ray
Right, will try and let you know.

On Tue, 1 Jun, 2021, 9:23 pm Joel Tanko, <7thog...@gmail.com> wrote:

> If you want to show the items relative to the currently logged in user,
> try adding this option => limit_choices_to={'user' : 'user'}, to your items
> field in models.py
>
>
>
> On Tuesday, 1 June 2021, Aritra Ray  wrote:
>
>> Right, thank you so much.
>>
>> Regards.
>>
>> On Tue, 1 Jun, 2021, 8:27 pm oba stephen,  wrote:
>>
>>> You should return this if you want to redirect to cart;
>>>
>>> return redirect(reverse("store:cart-page", kwargs={"id": >> cart>}))
>>>
>>> Best regards
>>>
>>> Stephen Oba
>>>
>>> On Tue, Jun 1, 2021, 3:27 PM Aritra Ray  wrote:
>>>
>>>> Sure, here's the file.
>>>>
>>>> [image: 2021-06-01 (6).png]
>>>>
>>>> Regards,
>>>> Aritra.
>>>>
>>>> On Tue, 1 Jun 2021 at 19:45, oba stephen  wrote:
>>>>
>>>>> Can I see your urls.py?
>>>>>
>>>>> Best regards
>>>>>
>>>>> Stephen Oba
>>>>>
>>>>> On Tue, Jun 1, 2021, 3:05 PM Aritra Ray  wrote:
>>>>>
>>>>>> Oh, okay. I was unaware of that. Although, my cart page is getting
>>>>>> redirected back to home page. Can you spot any mistake in the provided
>>>>>> screenshots?
>>>>>> Also, can you please guide on how to redirect a function to the
>>>>>> previously visited page? Like add-to-cart should redirect to either
>>>>>> products page or cart page itself depending on which page the user called
>>>>>> it from.
>>>>>>
>>>>>> On Tue, 1 Jun, 2021, 6:37 pm oba stephen, 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I don't think you have an error here. Although I haven't looked at
>>>>>>> the code, but from your django admin page I can see that none of those
>>>>>>> items are selected.
>>>>>>>
>>>>>>> If you run a query from your terminal, you would notice that the
>>>>>>> items would return as empty.
>>>>>>>
>>>>>>> When you create a many to many relationship in django, all objects
>>>>>>> on that related model would display this way.
>>>>>>>
>>>>>>> What is the difference between different carts?  The difference is,
>>>>>>> the items would be selected or highlighted in a cart they belong to.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> Stephen Oba
>>>>>>>
>>>>>>> On Tue, Jun 1, 2021, 1:52 PM Aritra Ray  wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>> This is Aritra reposting the same error. I have a problem regarding
>>>>>>>> an E-commerce Django website where the cart model on the admin page is
>>>>>>>> showing the items added to cart by one user to all other users as well.
>>>>>>>> I have a Profile model and a Cart model attached below. The
>>>>>>>> views.py has been attached too. Kindly comment back if anything else is
>>>>>>>> needed.
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Aritra
>>>>>>>>
>>>>>>>> Error:
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (4).png]
>>>>>>>>
>>>>>>>> Views.py
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (1).png][image: 2021-06-01 (5).png]
>>>>>>>>
>>>>>>>> Models.py
>>>>>>>>
>>>>>>>> [image: 2021-06-01 (2).png][image: 2021-06-01 (3).png]
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Django users"

Re: In need of immediate help from Django community

2021-05-24 Thread Aritra Ray
Thank you for your response. It worked out perfectly.

On Tue, 25 May, 2021, 4:39 am Kelvin Sajere,  wrote:

> Import the User model in your forms.py and use it instead of Profile. As
> the error clearly states, the Profile model does not have a username field.
> Django actually recommends using the AbstractUser, or the AbstractBaseUser
> to extend the default User model if you wish to create something like a
> profile.
>
> On Mon, May 24, 2021 at 9:31 PM Omkar Parab  wrote:
>
>> Error is in forms.py file.
>>
>> "model = User" not profile.
>>
>> Default "User" model comes with username, email filed.
>>
>> Why you're creating another email field in the Profile model?
>>
>> Just fetch it using {{ user.email }}
>>
>>
>> On Tue, May 25, 2021, 1:38 AM Aritra Ray  wrote:
>>
>>> Hi,
>>>
>>> I've been facing a problem recently in creating a Django Profile model
>>> for an E-commerce website.
>>> Error: FieldError(message) django.core.exceptions.FieldError: Unknown
>>> field(s) (username) specified for Profile
>>> Kindly help me out if possible. The screenshots have been attached below
>>> and the github link for the project has been provided.
>>>
>>> Link: https://github.com/First-project-01/Django-ecommerce (Check out
>>> the 'changes' branch)
>>>
>>> Regards,
>>> Aritra
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAFecadvxBCa6w02%3DZ887%2BnaEdY-R6B9%2BVVFzVW5zYvkt1gA2hg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAFecadvxBCa6w02%3DZ887%2BnaEdY-R6B9%2BVVFzVW5zYvkt1gA2hg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJY8mfzFT-GqqZ0YvdLKH9gKcTAv%2B1srG9973pXYfA5f_qVA7w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJY8mfzFT-GqqZ0YvdLKH9gKcTAv%2B1srG9973pXYfA5f_qVA7w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> KeLLs
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADYqDX1dm1Y-T89W9%3DyZQs1bH04eNUj5qcCpwieOSDoY%2BDy9Kg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CADYqDX1dm1Y-T89W9%3DyZQs1bH04eNUj5qcCpwieOSDoY%2BDy9Kg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFecadt6r70L7v78%3Dy63MfyNdFLYJwfKJaP2BeuxO-%3Dgp9fmMg%40mail.gmail.com.


Re: Python Django Training

2020-12-16 Thread Saswat Ray
Pls add me

On Wed, 16 Dec 2020, 10:26 pm Nagaraju Singothu, <
nagarajusingoth...@gmail.com> wrote:

> I'm also interested sir, Plz add me I'm from hyderabad
>
> On Mon 7 Dec, 2020, 1:40 PM narendra thapa, 
> wrote:
>
>> hello please add me also in training group?
>>
>>
>> On Fri, Feb 21, 2020 at 7:27 PM Bharati Nilam 
>> wrote:
>>
>>> Hi,
>>> I also from Hyderabad and I'm also interested in the training. please
>>> tell me how to join?
>>>
>>> Regards,
>>> Bharati
>>>
>>> On Thu, 20 Feb, 2020, 6:19 PM Thiagu Palaniappan, <
>>> thiagarajan@gmail.com> wrote:
>>>
 I'm also interested. Please add me in the group.


 Thanks & Regards,
 Thiagu

 On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
 wrote:

> I am interested also. Please let me know the details.
>
> On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:
>
>> Hi,
>>
>> I am from Hyderabad. I am Python Developer by Profession. I am eager
>> take up any Python , Django Training (online Preferrable or Weekends).
>> Members who require can contact me or share me  there idea.
>>
>> Regards,
>> Srikanth.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%40mail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
> 
> .
>


 --

 Thanks & Regards,

 *Thiagu Palaniappan*

 M +91 (0) 9994318799

 *DXC Technology*
 8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
 post, Ramapuram, Chennai - 600 089.

 dxc.technology  / Twitter
  / Facebook
  / LinkedIn
 

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEtntjXVaVAyDCJJzS748zfNVm242U%2B6vsFkynevf5ghnPgDhw%40mail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMyGuAbvEsXwNB5_Kwj7HwGtfpjR7e29YytETZZbeqEd4UXW4A%40mail.

How to display a line graph in Django?

2020-06-30 Thread ratnadeep ray
Hi all, 

I have wrote a python program to display the line graph as follows: 

import matplotlib.pyplot as plt 

x = [1,2,3] 
y = [2,4,1] 
  

plt.plot(x, y) 
  

plt.xlabel('x - axis') 
plt.ylabel('y - axis') 
  

plt.title('My first graph!') 
  
plt.show()


Now I need to display the same via Django. So I think I need to write the 
above code in the view and then redirect the same to the html template 
file. Am I right? 

In that case, how to send the request objects related to the line chart to 
the template? 

Normally, we send in the following format: 

def view1(request)


 return render(request, 'display_report.html', { 'var1': "abc", ...
 ... })

So if we are trying to display the line graph generated by the above code, 
how to do so ? 

Please share your inputs. 

Thanks. 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/827e0d0c-6bbb-4511-af73-9fa379df699do%40googlegroups.com.


How to pass values of drop down from html template to views in Django?

2020-06-26 Thread ratnadeep ray


I need to send the value of the selected option in a drop down to the views.

My html code is as follows:

> 
> Select version to compare with
> {%for ver in version_list%}
> **{{ver}} option>**
> {% endfor %}
> 


The above is giving me the following error:

> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/index/11.5.1.18900-96
> http://127.0.0.1:8000/index/11.5.1.18900-97
> Using the URLconf defined in Piechart_Excel.urls, Django tried these URL 
> patterns, in this order:
> admin/
> index/
> process_data/ [name='process_data']
> The current path, index/11.5.1.18900-96, didn't match any of these.


However if I am sending the value as follows i.e. without any drop down:

> {{ver}}


everything is working as expected.


My urls.py file content is as follows:


from django.urls import path
> from fusioncharts import views urlpatterns
> urlpatterns = [
> path('index/', views.index, name='index'),
> path('process_data/', views.process_data, name='process_data'),
> ] 

Can anyone say why is it not working in the case of drop down but working 
otherwise? If we have to send any value from the html template using drop 
down, then how to do so?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/da72e367-bc90-46cd-8b54-3502d1a126b9o%40googlegroups.com.


Re: Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-26 Thread ratnadeep ray
Hi Ogunasya, 

I tried that but still that's not working. After some research and 
analysis, I realized the issue is not with the urls but with the html file. 
When I am trying to direct to the url in the href via drop-down only, the 
error is coming. But if we I am trying to access the same url via table, it 
is working fine. 

So to summarize: 
*Working: *
{{ver}}


*Non-working: *
{{ver}}

Can you please suggest what is going wrong ? How can we reach the method 
'process_data' using dropdown ? 

On Thursday, 25 June 2020 12:08:12 UTC+5:30, Ogunsanya Opeyemi wrote:
>
> Also include in your URL before your urlpatterns 
>
> app_name=yourappname
>
>
> And in your template URL  write
> {% url 'yourappname:process_data' ver %}
>
>
>
> And if you still have issues send the update you made and let me check.
>
> On Thursday, June 25, 2020, ratnadeep ray  > wrote:
>
>> Hi Ogunsanya, 
>>
>> I have added that line of code but still getting the same error. 
>>
>> So what can be done next ? 
>>
>> On Thursday, 25 June 2020 00:25:17 UTC+5:30, Ogunsanya Opeyemi wrote:
>>>
>>>
>>> Yes
>>> On Wednesday, June 24, 2020, ratnadeep ray  wrote:
>>>
>>>> So I need to add this also:
>>>>
>>>>
>>>>
>>>> urlpatterns = [
>>>> ...
>>>> ...
>>>> path('process_data/', views.process_data, name='process_data'),
>>>>
>>>> -- 
>>>> 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 view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/5c62826f-a652-43c3-a89e-29cf1855a9f8o%40googlegroups.com
>>>> .
>>>>
>>>
>>>
>>> -- 
>>> OGUNSANYA OPEYEMI
>>>
>>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9-45ec-9a59-86e3ed9b6454o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9-45ec-9a59-86e3ed9b6454o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/db746050-5807-4b00-847f-3c3077faccb2o%40googlegroups.com.


Re: Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-25 Thread ratnadeep ray
Hi Ogunsanya,

Now I added the same as per your suggestion. Following is my urls.py 
contnent

from django.urls import path
from fusioncharts import views
app_name = 'fusioncharts'


urlpatterns = [
path('push-data/', views.push_data, name='push-data'),
path('home/', views.home, name='home'),
path('display_data/', views.display_data, name=
'display_data'),
path('index/', views.index, name=''),
*path**('process_data/', views.process_data, 
name='process_data'),*
]

And my template content (process_data.py)is as follows: 




Home


  
  Index page
  
  Select the version to compare with
  
 Select version to compare with
 {%for ver in version_list%}
 
{{ver}}
 {% endfor %}
  
  
  The current version{{version}}
  
  
  




But now I am getting the following error: 

Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/index/11.5.1.18900-96
http://127.0.0.1:8000/index/11.5.1.18900-97


Using the URLconf defined in Piechart_Excel.urls, Django tried these URL 
patterns, in this order:
admin/
push-data/ [name='push-data']
home/ [name='home']
display_data/ [name='display_data']
index/
process_data/ [name='process_data']

The current path, index/11.5.1.18900-96, didn't match any of these.


Can you suggest now what's going wrong ? 



On Thursday, 25 June 2020 12:08:12 UTC+5:30, Ogunsanya Opeyemi wrote:
>
> Also include in your URL before your urlpatterns 
>
> app_name=yourappname
>
>
> And in your template URL  write
> {% url 'yourappname:process_data' ver %}
>
>
>
> And if you still have issues send the update you made and let me check.
>
> On Thursday, June 25, 2020, ratnadeep ray  > wrote:
>
>> Hi Ogunsanya, 
>>
>> I have added that line of code but still getting the same error. 
>>
>> So what can be done next ? 
>>
>> On Thursday, 25 June 2020 00:25:17 UTC+5:30, Ogunsanya Opeyemi wrote:
>>>
>>>
>>> Yes
>>> On Wednesday, June 24, 2020, ratnadeep ray  wrote:
>>>
>>>> So I need to add this also:
>>>>
>>>>
>>>>
>>>> urlpatterns = [
>>>> ...
>>>> ...
>>>> path('process_data/', views.process_data, name='process_data'),
>>>>
>>>> -- 
>>>> 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 view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/5c62826f-a652-43c3-a89e-29cf1855a9f8o%40googlegroups.com
>>>> .
>>>>
>>>
>>>
>>> -- 
>>> OGUNSANYA OPEYEMI
>>>
>>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9-45ec-9a59-86e3ed9b6454o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9-45ec-9a59-86e3ed9b6454o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/14aca6b8-8bc9-455a-b3c6-de0c8740a9a7o%40googlegroups.com.


Re: Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-24 Thread ratnadeep ray
Hi Ogunsanya, 

I have added that line of code but still getting the same error. 

So what can be done next ? 

On Thursday, 25 June 2020 00:25:17 UTC+5:30, Ogunsanya Opeyemi wrote:
>
>
> Yes
> On Wednesday, June 24, 2020, ratnadeep ray  > wrote:
>
>> So I need to add this also:
>>
>>
>>
>> urlpatterns = [
>> ...
>> ...
>> path('process_data/', views.process_data, name='process_data'),
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/5c62826f-a652-43c3-a89e-29cf1855a9f8o%40googlegroups.com
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9-45ec-9a59-86e3ed9b6454o%40googlegroups.com.


Re: Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-24 Thread ratnadeep ray
So I need to add this also:



urlpatterns = [
...
...
path('process_data/', views.process_data, name='process_data'),

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5c62826f-a652-43c3-a89e-29cf1855a9f8o%40googlegroups.com.


Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-24 Thread ratnadeep ray
Hi all,

Any comment on this?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/852e2f1b-fcfc-43a9-b098-9170579a8f56o%40googlegroups.com.


Reverse for 'process_data' not found. 'process_data' is not a valid view function or pattern name.

2020-06-24 Thread ratnadeep ray
Hi all, 

I am trying to direct the option selected from the dropdown in the 
index.html along with the value to the process_data method in the views.py. 
But now I am getting the following error when I am trying to load my index 
page: 

NoReverseMatch at /index/

Reverse for 'process_data' not found. 'process_data' is not a valid view 
function or pattern name.




My index.html file is as follows: 




Home


  
  Index page
  
  Select the version to compare with
  
 Select version to compare with
 {%for ver in version_list%}
 {{ver}}
 {% endfor %}
  
  
  The current version{{version}}
  
  
  



My view file content is like this: 

def index(request):
#query_results = QRC_DB.objects.all()
global percentage_variation
percentage_variation = 0
global version
version = None 
context = RequestContext(request)
response_context = get_result(request)
#print("The response_context values  = \n %s" 
%response_context.get("get_result"))
cursor  = connection.cursor()
cursor.execute("select version from fusioncharts_qrc_db group by 
version")
rows = cursor.fetchall()
#print("The fetched rows =\n")
#print(rows)
version_list = []
#print(version_list)
for ver in rows:
version = str(ver).split("'")[1]
version_list.append(version)

print("The final version list = %s" %version_list)
return render(request, 'index.html', {
'version': version, 
'version_list': version_list,
})


def process_data(request,ver):

print("==The version selected = %s===" %ver)

return render(request, 'display_data.html', {
'version': version, 
  
})


The url file contents are as follows: 

from django.urls import path
from fusioncharts import views


urlpatterns = [
path('push-data/', views.push_data, name='push-data'),
path('home/', views.home, name='home'),
path('display_data/', views.display_data, name=
'display_data'),
path('index/', views.index, name='index'),
]

from django.contrib import admin
from django.urls import path,include


urlpatterns = [
path('admin/', admin.site.urls),
path('', include('fusioncharts.urls'))
]

Can anyone please help me why the above error is coming and how to fix that 
? 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6b391dfb-f423-4c8f-b713-73c4879ffe34o%40googlegroups.com.


Can we use python related api's on the Django templates ?

2020-05-27 Thread ratnadeep ray
Hi all, 

Currently I am trying to print the type of a variable from the Django 
template html file as follows: 

The type of feature list report for version 
> {%type(version)%} is


For the above, I am getting the following error: 

Invalid block tag on line 9: 'type(version)'. Did you forget to register or 
load this tag?


So what's going wrong here? How can we use the python related api's (like 
type) from the html template files? I think inside the {%  %} we can 
use python related evaluations. Am I right? 

Please throw some lights on this .

Thanks. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2863977e-c712-4746-bbb0-b175bc976a0d%40googlegroups.com.


Re: How to retrieve the values from the context_process.py file to template?

2020-05-26 Thread ratnadeep ray
So what should be the correction in my case?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5195d557-7c89-4814-b7ca-46d64234a15d%40googlegroups.com.


Re: How to retrieve the values from the context_process.py file to template?

2020-05-26 Thread ratnadeep ray
So for this we have to import the model of context_process ?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/11fb0baa-0782-4ef4-8069-215fb679b334%40googlegroups.com.


How to retrieve the values from the context_process.py file to template?

2020-05-26 Thread ratnadeep ray
Hi all, 

I am trying to display the value from the context_process.py file to the 
template. 

The content of my context_process.py is as follows: 

from fusioncharts.models import QRC_DB
from django.db import connection

def get_result(request):
> cursor  = connection.cursor()
> pattern = "%%"+TotalTime+"%%"
> cursor.execute("select * from fusioncharts_qrc_db")
> rows = cursor.fetchall()
> return {'get_result': rows}


Then in the html template file, I am trying to display the variable 
get_result as follows: 

{% block content %}
>Result = 
>   
>   {{get_result}}
>
> {% endblock %}


My template details in the settings.py is as follows: 

 

> TEMPLATES = [
> {
> ...
> 'OPTIONS': {
> 'context_processors': [
> .
> 'fusioncharts.context_processors.get_result',
> ],
> },
> },
> ]


My views.py file is as follows: 

def home(request):
> context = RequestContext(request)
> response_context = {}
> return render(request, 'display_data.html',response_context)



But when I am running that, it is not displaying anything in the web page. 

Is there anything missing in my code? What is going wrong here? 





-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aa0a33a7-3cb8-4cc5-9ccb-c95cddd83c67%40googlegroups.com.


Getting the except django.core.exceptions.ImproperlyConfigured while querying DB

2020-05-20 Thread ratnadeep ray
I am trying to fetch a few rows from the DB using the following code in my 
views.py:

from django.http import HttpResponsefrom django.shortcuts import renderfrom 
fusioncharts.models import QRC_DB
def display_data(request,component):
query_results = QRC_DB.objects.get(component_name__contains=component)
return HttpResponse("You're looking at the component %s." % component)

For the above, I am getting the following exception:

django.core.exceptions.ImproperlyConfigured: The included URLconf 
'Piechart_Excel.urls' does not appear to have any patterns in it. If you see 
valid patterns in the file then the issue is probably caused by a circular 
import.

However whenever I am *removing/commenting out* the below line, the above 
exception disappears:

query_results = QRC_DB.objects.get(component_name__contains=component)


Can anyone say what can be going wrong here? 

urls.py file under app is as follows: 

from django.urls import path from fusioncharts import views urlpatterns 
urlpatterns 
> = [
> path('push-data/', views.push_data, name='push-data'),
> path('home/', views.home, name='home'),
> path('display_data/', views.display_data, name=
> 'display_data'),
> ]

The url under the main project is as follows: 

from django.contrib import adminfrom django.urls import path,include
>
> urlpatterns urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]

So please advise what's going wrong. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0acc7888-9e25-43fd-8a50-64fe43086190%40googlegroups.com.


Reverse for 'display_data' not found. 'display_data' is not a valid view function or pattern name

2020-05-19 Thread ratnadeep ray
Hi all, 

I am getting the below error when I am trying to load the home page:
Reverse for 'display_data' not found. 'display_data' is not a valid view 
function or pattern name

My views.py file is as follows: 

 

> def home(request):
> #query_results = QRC_DB.objects.all()
> return render(request, 'display_data.html')
>
> def display_data(request,component):
> #query_results = QRC_DB.objects.all()
> return HttpResponse("You're looking at the component %s." % component)


My urls.py file under the app is as follows: 

from django.urls import path
from fusioncharts import views

urlpatterns = [
> path('home/', views.home, name=''),
> ]


The urls.py file under the project is as follows: 

from django.contrib import admin
> from django.urls import path,include
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]



And my html file (display_data) code is as follows : 

>
> {% block content %}
>   Display the test results
>   
> 
> SQL
>   
> {% endblock %}




Can anyone please help me to find out the mistake ? 

Thanks. 

 

 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31ce205c-b54c-484f-8928-350eb91178a6%40googlegroups.com.


How to pass a variable to views from a template using href ?

2020-05-19 Thread ratnadeep ray
Hi all, 

My requirement is to pass a variable to the view from the template using 
href. 

For example, I have written the following line of code: 

SQL data


So using the above line, can we send the value "SQL" clicking on the link 
of "SQL data" to the method "execute" written in the views? If not, then 
what way can I do so? 

Thanks. 





-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7e892826-f4c1-426d-bf9b-1a1b0b2b17be%40googlegroups.com.


Re: Django foreign-key cannot assign must be a instance

2020-05-19 Thread ratnadeep ray
Can you please say in which line we should make that change because in so 
many places I am using comp. So in all the places should I change that ?

On Tuesday, 19 May 2020 12:36:19 UTC+5:30, Aldian Fazrihady wrote:
>
> Use comp_id= instead of comp=
>
> Regards, 
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
> Pada tanggal Sel, 19 Mei 2020 13.49, ratnadeep ray  > menulis:
>
>> Hi all, 
>>
>> I am trying to add a row in the DB using the following views.py: 
>>
>> # Create your views here.
>>> from django.shortcuts import render
>>> from fusioncharts.models import Component,Report
>>> import xlrd
>>> def pie_chart(request):
>>> labels = []
>>> data = []
>>> loc = ("C:\Django_apps\QRC_Report.xlsx")
>>> workbook = xlrd.open_workbook(loc) 
>>> worksheet = workbook.sheet_by_name('Sheet1')
>>> num_rows = worksheet.nrows - 1
>>> num_cols = worksheet.ncols - 1
>>> curr_row = -1
>>> component = []
>>> comp = None 
>>> while curr_row < num_rows:
>>>   curr_row += 1
>>>   row = worksheet.row(curr_row)
>>>   curr_col = -1
>>>   if "Header" in worksheet.cell_value(curr_row, 0):
>>> compon = worksheet.cell_value(curr_row, 0).strip("*")
>>> print("The component is %s" %compon)
>>> component.append(compon)
>>> print("===The results of the component %s is as 
>>> follows" %compon)
>>> Component.objects.create(comp=compon)
>>> continue
>>>   while curr_col < num_cols:
>>> curr_col += 1
>>> cell_value = worksheet.cell_value(curr_row, curr_col)
>>> #print("Cell value = %s" %cell_value)
>>> test_name = worksheet.cell_value(curr_row,0)
>>> print("Test name = %s" %test_name)
>>> test_value = worksheet.cell_value(curr_row,1)
>>> print("Test result = %s" %test_value)
>>> print("The component is = %s" %comp)
>>> 
>>> *Report.objects.create(param=test_name,comp=compon,value=test_value)*
>>> return render(request, 'pie_chart.html', {
>>> 'labels': labels,
>>> 'data': data,
>>> })
>>
>>
>> However the above highlighted line is throwing the following error: 
>>
>>> Cannot assign "'Header SQL Detailed'": "Report.comp" must be a 
>>> "Component" instance.
>>
>>
>> My model is as follows: 
>>
>> from django.db import models
>>> from django.urls import reverse
>>> from decimal import Decimal
>>> # Create your models here.
>>> class Component(models.Model):
>>> comp = models.CharField(max_length=30)
>>> class Report(models.Model):
>>> comp = models.ForeignKey(Component,on_delete=models.CASCADE)
>>> param = models.CharField(max_length=30)
>>> value = 
>>> models.DecimalField(max_digits=25,decimal_places=18,default=Decimal('0.'))
>>
>>
>>
>> Can anyone please point out what is going wrong here? What should be the 
>> correction? 
>>
>> Thanks. 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/afb5a06a-0d7d-4038-a0fc-3c2aadbbe4fc%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/afb5a06a-0d7d-4038-a0fc-3c2aadbbe4fc%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1425af8b-7dae-4cdb-ba8a-82d0a9fa0a74%40googlegroups.com.


Django foreign-key cannot assign must be a instance

2020-05-18 Thread ratnadeep ray
Hi all, 

I am trying to add a row in the DB using the following views.py: 

# Create your views here.
> from django.shortcuts import render
> from fusioncharts.models import Component,Report
> import xlrd
> def pie_chart(request):
> labels = []
> data = []
> loc = ("C:\Django_apps\QRC_Report.xlsx")
> workbook = xlrd.open_workbook(loc) 
> worksheet = workbook.sheet_by_name('Sheet1')
> num_rows = worksheet.nrows - 1
> num_cols = worksheet.ncols - 1
> curr_row = -1
> component = []
> comp = None 
> while curr_row < num_rows:
>   curr_row += 1
>   row = worksheet.row(curr_row)
>   curr_col = -1
>   if "Header" in worksheet.cell_value(curr_row, 0):
> compon = worksheet.cell_value(curr_row, 0).strip("*")
> print("The component is %s" %compon)
> component.append(compon)
> print("===The results of the component %s is as 
> follows" %compon)
> Component.objects.create(comp=compon)
> continue
>   while curr_col < num_cols:
> curr_col += 1
> cell_value = worksheet.cell_value(curr_row, curr_col)
> #print("Cell value = %s" %cell_value)
> test_name = worksheet.cell_value(curr_row,0)
> print("Test name = %s" %test_name)
> test_value = worksheet.cell_value(curr_row,1)
> print("Test result = %s" %test_value)
> print("The component is = %s" %comp)
> 
> *Report.objects.create(param=test_name,comp=compon,value=test_value)*
> return render(request, 'pie_chart.html', {
> 'labels': labels,
> 'data': data,
> })


However the above highlighted line is throwing the following error: 

> Cannot assign "'Header SQL Detailed'": "Report.comp" must be a "Component" 
> instance.


My model is as follows: 

from django.db import models
> from django.urls import reverse
> from decimal import Decimal
> # Create your models here.
> class Component(models.Model):
> comp = models.CharField(max_length=30)
> class Report(models.Model):
> comp = models.ForeignKey(Component,on_delete=models.CASCADE)
> param = models.CharField(max_length=30)
> value = 
> models.DecimalField(max_digits=25,decimal_places=18,default=Decimal('0.'))



Can anyone please point out what is going wrong here? What should be the 
correction? 

Thanks. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afb5a06a-0d7d-4038-a0fc-3c2aadbbe4fc%40googlegroups.com.


How to display multiple pie charts based on multiple lists?

2020-05-12 Thread ratnadeep ray
Hi all, 

I have a requirement where I need to display multiple pie charts based on 
multiple lists. 

Currently, I am able to display one pie chart involving 2 lists. Below is 
the views.py code for the same: 

# Create your views here.
from django.shortcuts import render

def pie_chart(request):
labels = ["A", "B", "C"]
data = ["10", "15", "2"]

   return render(request, 'pie_chart.html', {
'labels': labels,
'data': data,
})

Now what if we have another pair of lists as follows: 
labels1 = ["X", "Y", "Z"]
data1 = ["10", "15", "2"]

So can anyone say what changes should I made in the above code  to display 
2 pie charts displaying labels/data and labels1/data1 ? 

Thanks in advance. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8308ffd5-68f5-47ff-883d-05b6a22795c8%40googlegroups.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Thanks Derek for this. 

On Friday, 8 May 2020 19:20:31 UTC+5:30, Derek wrote:
>
> If you can, use an existing app:
>
> https://github.com/wq/django-data-wizard
>
>
> On Friday, 8 May 2020 14:57:43 UTC+2, Kasper Laudrup wrote:
>>
>> Hi Ratnadeep, 
>>
>> On 08/05/2020 14.03, ratnadeep ray wrote: 
>> > Hi all, 
>> > 
>> > Can anyone let me know how to push the fetched data from an excel to 
>> any 
>> > DB using Django? 
>> > 
>>
>> It's not very clear what you mean by "the fetched data". Have you 
>> fetched some data already? In which format? 
>>
>> If you need to extract data from an excel sheet, this was the first 
>> guide I could find: 
>>
>> https://www.geeksforgeeks.org/reading-excel-file-using-python/ 
>>
>> Also, "any DB" is extremely vague. Do you have a database already? Or do 
>> you just want to go for whatever database is the best suited for 
>> whatever you are trying to achieve? 
>>
>> And what exactly do you want to use Django for? Django is a web 
>> framework and nothing in your question mentions anything about that... 
>>
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4cca72a6-1b5d-4fa8-8c60-c3593cdaca90%40googlegroups.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Hi Kasper, 

I want to read the data from excel and the retrieved data should be pushed 
to a DB, in my case it's MySQL. 

I believe the steps mentioned in the link 
https://www.geeksforgeeks.org/reading-excel-file-using-python/ , should be 
written in the views.py file. Am I right? 

Please clarify these because I am pretty new to Django. 

Thanks. 

On Friday, 8 May 2020 18:27:43 UTC+5:30, Kasper Laudrup wrote:
>
> Hi Ratnadeep, 
>
> On 08/05/2020 14.03, ratnadeep ray wrote: 
> > Hi all, 
> > 
> > Can anyone let me know how to push the fetched data from an excel to any 
> > DB using Django? 
> > 
>
> It's not very clear what you mean by "the fetched data". Have you 
> fetched some data already? In which format? 
>
> If you need to extract data from an excel sheet, this was the first 
> guide I could find: 
>
> https://www.geeksforgeeks.org/reading-excel-file-using-python/ 
>
> Also, "any DB" is extremely vague. Do you have a database already? Or do 
> you just want to go for whatever database is the best suited for 
> whatever you are trying to achieve? 
>
> And what exactly do you want to use Django for? Django is a web 
> framework and nothing in your question mentions anything about that... 
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92c1e4f6-35a8-47f2-ab1a-79809fef8b05%40googlegroups.com.


How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Hi all, 

Can anyone let me know how to push the fetched data from an excel to any DB 
using Django? 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com.


django.core.exceptions.ImproperlyConfigured: error is coming

2020-05-08 Thread ratnadeep ray
I am new to Django and hence don't have much idea about it. I am trying to 
create an app having the following contents in my view.py file:

from django.shortcuts import render
> from fusioncharts.models import City
> def pie_chart(request):
> labels = []
> data = []
> queryset = City.objects.order_by('-population')[:3]
> for city in queryset:
> labels.append(city.name)
> data.append(city.population)
> return render(request, 'pie_chart.html', {
> 'labels': labels,
> 'data': data,
> })


The content of my urls.py file inside the app is as follows:

from django.urls import path
> from fusioncharts import views
> urlpatterns = [
> path('pie-chart/', views.pie_chart, name='pie-chart'),
> ]


and the content of my urls.py file inside the main project folder is as 
follows:

from django.contrib import admin
> from django.urls import path
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]


In the settings.py file, I have added the following:

ROOT_URLCONF = 'Piechart.urls'


and under the TEMPLATES, added the following:

'DIRS': ['Piechart/fusioncharts/templates'], 


Now while running my app, I am getting the following error:

*django.core.exceptions.ImproperlyConfigured: The included URLconf 
> 'Piechart.urls' does not appear to have any patterns in it. If you see 
> valid patterns in the file then the issue is probably caused by a circular 
> import.*


Can anyone please say what's going wrong?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com.


How to display pie chart using Django

2020-05-07 Thread ratnadeep ray
Hi all, 

I just started to work on Django and hence have limited knowledge about it. 

Now I need to design an app to display a pie chart based on some sample 
data. Can anybody please help me to do so? Is there any sample app existing 
which fulfills this requirement ? 

Thanks. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84036bfa-ddfb-451b-98ff-27fffcfb151c%40googlegroups.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-03-31 Thread Saswat Ray
Hi,
Interested.

*Thanks*,
*Saswat*

https://www.linkedin.com/in/saswat-ray-27313316/
https://www.quora.com/profile/Saswat-Ray



On Tue, Mar 31, 2020 at 7:10 PM Juan J. Moreno Piña <
prof.juanj.mor...@gmail.com> wrote:

> available now, I'm located remote
> Juan
>
> *Teaching to learn *
> *Trading to survive*
> *M.Sc. Juan J. Moreno*
> En Venezuela (Maracaibo)
> Skype:studiom2j
> Tel (Italy): +39 02320628565
>
>
>
>
>
>
> El lun., 30 de mar. de 2020 a la(s) 07:56, Satish Pal (
> satishpal...@gmail.com) escribió:
>
>> Hi
>>
>> I have total of 2 years of experience and I am interested to join your
>> team.
>> please check my Linkedin profile
>> https://www.linkedin.com/in/satish-kumar-2230b3158/
>>
>> Thanks in Advance.
>>
>> On Mon, Mar 30, 2020 at 8:51 AM Phako Perez <13.phak...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I’m also interested to join your team, have 3+ years working with python
>>> Currently I’m teaching python to a group in order them to improve theirs
>>> career
>>>
>>> Thanks in advance
>>>
>>> Sent from my iPhone
>>>
>>> On 29 Mar 2020, at 20:48, chinna 
>>> wrote:
>>>
>>> 
>>> Hi,
>>>
>>> I am Premkumar having 3 years of experience in web and rest api
>>> development using python and Django. I would like to join your team
>>>
>>> On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak  wrote:
>>>
>>>> I am looking for a django developer who has expertise in building
>>>> enterprise grade solutions.
>>>>
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com
>>> <https://groups.google.com/d/msgid/django-users/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALzNJXmFb3cSFpEmYs2yB502x%2BB9DtNkDT_L2hqxvmvTPx08jA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CALzNJXmFb3cSFpEmYs2yB502x%2BB9DtNkDT_L2hqxvmvTPx08jA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMf5KvxLjfvMEPJZ6j3PTruMpho34FOW3HaLOECfbkGQFV%2B6zA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMf5KvxLjfvMEPJZ6j3PTruMpho34FOW3HaLOECfbkGQFV%2B6zA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLFtrnrw39q6jP5R536BzbivfbE8KTOHjjyaJzbdSUG1WA%40mail.gmail.com.


Re: Asking for help

2020-03-19 Thread Saswat Ray
Hi,
Please try to post on linkedin as well.It may help


*Thanks*,
*Saswat*





On Fri, Mar 20, 2020 at 6:58 AM Motaz Hejaze  wrote:

> Hi guys ,
> How are you all ?
> Hope you are all fine ..
> Guys i am now for 3 months without any job nor any income , and the news
> about corona make me fear that this period may increase , this will be very
> because i have a daughter to support ..
>
> I didnt want to write such a post , but anyone can help with a job will
> make a great help ...
>
>
> Thank you all ..
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/71df5876-2a3f-4f3e-bf5a-4fa754254710%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLGYT8fRnHjujA-iOSaMvATKbwcSANa1%3DEEQexjp%3DKwt9w%40mail.gmail.com.


Re:

2020-02-22 Thread Saswat Ray
Nope

*Thanks*,
*Saswat*

https://www.linkedin.com/in/saswat-ray-27313316/
https://www.quora.com/profile/Saswat-Ray



On Sat, Feb 22, 2020 at 7:39 PM Suraj Kumar 
wrote:

> Do you know Automation through Python.
> I want to learn automation tools.
>
> Tools like appium, selenium
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACCwaoVZuL2awcQyPo0YPHaaB3k51PsxbN70NOJotXyctaYvCA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACCwaoVZuL2awcQyPo0YPHaaB3k51PsxbN70NOJotXyctaYvCA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLHN8WAeeThjApE851t9k5jSvoKhwzUZjUxxZ_d-Lg31Eg%40mail.gmail.com.


Help on passing model field as function argument

2020-02-19 Thread Saswat Ray
Hi All,

*Views.py :*
class DASDataViewSet(viewsets.ModelViewSet):
queryset = DASData.objects.all()
serializer_class = DASDataSerializer

def create(self, request, *args, **kwargs):
try:
das_data = {
'patient': request.data['patient'],
'hexa_data': request.data['hexa_data'],
'device_id': request.data['device_id'],
}
serializer = DASDataSerializer(data=das_data)
if serializer.is_valid():
serializer.save()
self._numeric_conversion(serializer)
#self._start_monitoring(request.data['patient'])
return Response("Success", status=status.HTTP_201_CREATED)
except DASData.DoesNotExist:
return Response("Failed to persist device data",
status=status.HTTP_400_BAD_REQUEST)

@staticmethod
*def _start_monitoring(patient_id, presentation_mode):# should be like
this*
with open(os.path.join(constants.LOG_DIR, "%s.lck" %
str(patient_id)), 'w+'):
pass
p = Pipeline()
   # p.startmonitor(patient_id)
*p.startmonitor(patient_id, presentation_mode) # should be like
this*
*---*
*models.py:*

class Patients(models.Model):
GENDER_CHOICES = (
('M', 'Male'),
('F', 'Female'),
)
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255)
gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
age = models.IntegerField()
height = models.IntegerField()
weight = models.DecimalField(max_digits=5, decimal_places=2)
bmi = models.DecimalField(max_digits=5, decimal_places=2, null=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
*presentation_mode* = models.CharField(max_length=20,
default='sleeping')

*Doubt :*
In the view.py, i would like to add "presentation_mode" in
p.startmonitor(patient_id) like p.startmonitor(patient_id,
presentation_mode) but "presentation_mode" is the field of Patients model
as shown above but DASDataViewSet we are using "DASData" model.

*How can i fetch "presentation_mode" as argument
to p.startmonitor(patient_id) which is field of Patients model.?*



*Thanks*,
*Saswat*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLFs3imguC4SXahLHy6aM1-sGWc0wu22CTtX553skF%2Bgyg%40mail.gmail.com.


Re: Django Hands On with Industry Oriented application

2020-02-12 Thread Saswat Ray
Please contact to 8885505922 for detail or direct mail me your contact
number

*Thanks*,
*Saswat*

https://www.linkedin.com/in/saswat-ray-27313316/
https://www.quora.com/profile/Saswat-Ray



On Thu, Feb 13, 2020 at 12:30 PM paarull shukla 
wrote:

> Heloo sir I want to join ur session please let me know how much charge I
> have to make and where.
>
> On Thu, 13 Feb, 2020, 11:50 AM Saswat Ray,  wrote:
>
>> Hi,
>>
>> I am starting a new online batch to make student or professional to learn
>> this most sought after web development experience.Let me know if anyone
>> interested.Its a weekend online paid session.After successfully completed
>> the session with task, i can refer candidates to my connections(please note
>> i am not guarantee any job, i will help candidate to make right decision
>> and make them industry ready).
>>
>>
>> *Thanks*,
>> *Saswat*
>>
>> https://www.linkedin.com/in/saswat-ray-27313316/
>> https://www.quora.com/profile/Saswat-Ray
>> https://github.com/raysaswat
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEhPkLHPJM3-umuZs45GOviCPXdziVOCd%2BsnaHxHjLw-Jr2VaA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAEhPkLHPJM3-umuZs45GOviCPXdziVOCd%2BsnaHxHjLw-Jr2VaA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACLQzsc0wbtrCpJy_%3DR6%2BiaE89bSwuym7CdHqhyh_79cM%2BcM%2BA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACLQzsc0wbtrCpJy_%3DR6%2BiaE89bSwuym7CdHqhyh_79cM%2BcM%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLGWxxQd24Jm4XAk1E_-%2BLHdjVtTrqNv5hri3v8ZdGutjg%40mail.gmail.com.


Django Hands On with Industry Oriented application

2020-02-12 Thread Saswat Ray
Hi,

I am starting a new online batch to make student or professional to learn
this most sought after web development experience.Let me know if anyone
interested.Its a weekend online paid session.After successfully completed
the session with task, i can refer candidates to my connections(please note
i am not guarantee any job, i will help candidate to make right decision
and make them industry ready).


*Thanks*,
*Saswat*

https://www.linkedin.com/in/saswat-ray-27313316/
https://www.quora.com/profile/Saswat-Ray
https://github.com/raysaswat

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLHPJM3-umuZs45GOviCPXdziVOCd%2BsnaHxHjLw-Jr2VaA%40mail.gmail.com.


Re: Authentication of Zendesk

2020-01-08 Thread Saswat Ray
Thanks Kasper.



*Thanks*,
*Saswat*




On Wed, Jan 8, 2020 at 4:39 PM Kasper Laudrup  wrote:

> Hi Saswat,
>
> On 08/01/2020 11.52, Saswat Ray wrote:
> > Hi I want to authenticate Zendesk with my apps.Anyone know how to do in
> > DJANGO
> >
>
> Zendesk seems to support OAuth:
>
>
> https://support.zendesk.com/hc/en-us/articles/203663836-Using-OAuth-authentication-with-your-app
>
> Combining that with Django OAuth should probably do the trick:
>
> https://django-oauth-toolkit.readthedocs.io/en/latest/
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d7822d3c-68d4-1e4e-77b2-8363fc988bfb%40stacktrace.dk
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLHc82Jgt9zhbeh1my90vUhvFDA0JOnr-FdBk-3QytfV5A%40mail.gmail.com.


Authentication of Zendesk

2020-01-08 Thread Saswat Ray
Hi I want to authenticate Zendesk with my apps.Anyone know how to do in
DJANGO


*Thanks*,
*Saswat*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLGt_qpxCP7f2LXQ9ZJL5jaCSaUpCO_eeADaD5syB4g1_A%40mail.gmail.com.


Re: MultiValueDictKeyError at /add 'radio2'

2019-12-26 Thread Saswat Ray
https://stackoverflow.com/questions/5895588/django-multivaluedictkeyerror-error-how-do-i-deal-with-it

*Thanks*,
*Saswat*




On Wed, Dec 25, 2019 at 7:08 PM shree hari  wrote:

> error: https://del.dog/engigywarf.txt
> code: https://del.dog/cringanuwa.txt
>
> can someone help with me this ?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/38aa273e-9d81-4dc1-a5ad-2ef9691997e8%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLEzO52QhvXuGYiYQuQrohbUamTcqNWswkt9Vr8hkf47RA%40mail.gmail.com.


Unit test in django

2019-12-02 Thread Saswat Ray
*def webhook_register(request, organization_pk, campaign_id):user_id =
Campaign.objects.filter(id=campaign_id)user_id =
user_id[0].__dict__["user_id"]# social_user_details =
UserSocialAuth.objects.filter(provider=request.GET["provider"],
user_id=user_id)social_user_details =
UserSocialAuth.objects.filter(provider="shopify", user_id=user_id)shop
= social_user_details[0].__dict__['extra_data']['shop']
SOCIAL_AUTH_ACCESS_TOKEN =
social_user_details[0].__dict__['extra_data']['access_token']# shop =
'store-adi.myshopify.com 'headers = {
  "X-Shopify-Access-Token": SOCIAL_AUTH_ACCESS_TOKEN,"Accept":
"application/json","Content-Type": "application/json",}
payload = {"webhook": {"topic": "orders/create",
"address": "https://%s/webhook/receiver/shopify/%s"; % (NGROK_DOMAIN,
campaign_id),"format": "json"}}response =
requests.post("https://"; + shop + "/admin/api/2019-10/webhooks.json",
data=json.dumps(payload), headers=headers)   #
print(response.content)return HttpResponse('success')*


*i am writing unitest for the above function,there are some Factory and
fakers method is used. I am looking how i can convert this *
user_id = Campaign.objects.filter(id=campaign_id)

to equivalent statment for unit test using  CampaignFactory method .



*Thanks*,
*Saswat*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLEVGr6P4w78KD%2BPbP0%3DeNYFcFWQZaFOAyQJm_GkGJjGVw%40mail.gmail.com.


Re:

2019-11-28 Thread Saswat Ray
Without looking your code and folder structure its hard to tell.

*Thanks*,
*Saswat*




On Thu, Nov 28, 2019 at 5:59 PM vaneet bawa  wrote:

> First of all thanks Saswat for the response but i have already done this
> thing on my views.py but my html file is not displaying anything rather it
> throws an exception templatedoesnot exit
>
> I hope you are geeting what i am saying
>
> Best Regards
> Vaneet
>
>
>
> On 28-Nov-2019, at 5:42 PM, Saswat Ray  wrote:
>
> 
> Django app expects a response from your  view file to render and show to
> user.You need add a template to render. like in views.py
> return render(request, "xyz.html")
>
> https://docs.djangoproject.com/en/2.2/topics/http/shortcuts/
>
>
> render
> *Thanks*,
> *Saswat*
>
>
>
>
>
> On Thu, Nov 28, 2019 at 5:35 PM vaneet bawa 
> wrote:
>
>> Exception Type: TemplateDoesNotExist
>>
>> Could someone please tell me that i m getting this error how I can handle
>> it...
>>
>> what i m trying to do is i have created a input field and in that field i
>> m providing a message and then i want that on button click that message
>> should be displayed on my console
>>
>> Best Regards
>> Vaneet
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKubXnzO%3DQizgnNaHWZoYwxXWMjCbj-bzkbxmOzcV6WZsyO_Ow%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKubXnzO%3DQizgnNaHWZoYwxXWMjCbj-bzkbxmOzcV6WZsyO_Ow%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEhPkLEJrcfCXsj3C-i058ABE0_1i7Hd%3DCBbS84A9DtqbYa3aQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAEhPkLEJrcfCXsj3C-i058ABE0_1i7Hd%3DCBbS84A9DtqbYa3aQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/205D5E6D-03B1-48A8-BE44-1DEDE11BFE8A%40gmail.com
> <https://groups.google.com/d/msgid/django-users/205D5E6D-03B1-48A8-BE44-1DEDE11BFE8A%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLGRUow9DiNU4qnmxgZqAvmbp__xXWNOZto5u-8BnABWkQ%40mail.gmail.com.


Re:

2019-11-28 Thread Saswat Ray
Django app expects a response from your  view file to render and show to
user.You need add a template to render. like in views.py
return render(request, "xyz.html")

https://docs.djangoproject.com/en/2.2/topics/http/shortcuts/


render
*Thanks*,
*Saswat*





On Thu, Nov 28, 2019 at 5:35 PM vaneet bawa  wrote:

> Exception Type: TemplateDoesNotExist
>
> Could someone please tell me that i m getting this error how I can handle
> it...
>
> what i m trying to do is i have created a input field and in that field i
> m providing a message and then i want that on button click that message
> should be displayed on my console
>
> Best Regards
> Vaneet
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKubXnzO%3DQizgnNaHWZoYwxXWMjCbj-bzkbxmOzcV6WZsyO_Ow%40mail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLEJrcfCXsj3C-i058ABE0_1i7Hd%3DCBbS84A9DtqbYa3aQ%40mail.gmail.com.


Making A Field Read Only

2019-11-06 Thread Ray Z
Hey Everyone,

 Im very new to django and im trying to figure out how to make a field on a 
forum read only. The field is my date created field that has a automatic 
timestamp. The form structure im using is a modelform  . Here is my code of 
my forms.py . I appreciate the help. Thank you everyone !


from django import forms
from django.forms import ModelForm
from .models import StudentCheck
from django.utils.translation import gettext_lazy as _



class NewStudentForm(forms.ModelForm):
 class Meta:
model = StudentCheck
fields = '__all__'  
labels = {'date_created':_('Date Created'), 'startdate':_('Start 
Date'), 'esy':_('ESY')}


models.py

from django.db import models
from django.utils import timezone
from django.forms import ModelForm


# Create your models here.

class StudentCheck (models.Model):
startdate = models.DateField(max_length= 10 )  
esy = models.BooleanField(default = False)
ten_month_school_year = models.BooleanField(default= False)
other = models.BooleanField(default = False)
intakedate = models.DateField(max_length=10)
grade = models.CharField(max_length=2)
date_created = models.DateTimeField(default=timezone.now)
firstname = models.CharField(max_length=50)
lastname = models.CharField(max_length=60)
address = models.CharField(max_length=100)
city = models.CharField(max_length=100)
state = models.CharField(max_length=30)
zipcode = models.CharField(max_length=5)
parent_one_name = models.CharField(max_length= 100)
parent_one_phone = models.CharField(max_length=100)
parent_one_email = models.CharField(max_length=100)
parent_two_name = models.CharField(max_length=100)
parent_two_phone = models.CharField(max_length=12)
parent_two_email = models.CharField(max_length=100)


def __str__(self):
return self.lastname

class StudentCheckForm (ModelForm):
class Meta:
 model = StudentCheck
 fields = '__all__'

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b24f33d9-2a88-4bdb-af17-e9913e312b14%40googlegroups.com.


Webhook creation for shopify

2019-11-05 Thread Saswat Ray
HI,
Can anyone help me creating a webhook for shopify

*Thanks*,
*Saswat*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLEw%2BATt4n3uXwKAm-im5BbYCe_zWfp7UX%3Du7baWvh4WTg%40mail.gmail.com.


Creating Shopify webhook using pipeline

2019-10-30 Thread Saswat Ray
Hi Guys,

I need to create one webhook in shopify(order/product) but using *pipeline
function*.I did the app authentication and got the access taken.

In settings.py i added this

SOCIAL_AUTH_SHOPIFY_WEBHOOK_PIPELINE = (
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.auth_allowed',
*'apps.integrations.pipelines.shopify_webhook_order_create',*
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
)

I wanted to do something like this inside "*shopify_webhook_order_create"*
def register_webhook():
headers = {
"X-Shopify-Access-Token": session.get("access_token"),
"Content-Type": "application/json"
}

payload = {
"webhook": {
"topic": "draft_orders/create",
"address": "https://{0}/webhook".format(HOST),
"format": "json"
}
}
response = requests.post("https://"; + session.get("shop")
 + "/admin/webhooks.json",
 data=json.dumps(payload), headers=headers)

if response.status_code == 201:

return render_template('register_webhook.html',

 webhook_response=json.loads(response.text))
else:
return Response(response="{0} -
{1}".format(response.status_code,
response.text),
status=200)


but pipeline is having some specific format like below :

*"def slack_webhook_social_user(backend, uid, user=None, *args, **kwargs):*







*provider = backend.name social =
backend.strategy.storage.user.get_social_auth(provider, uid)if social
and not user:user = social.userreturn {'social': social,
'user': user,'is_new': user is None,
'new_association': social is None}"*



*My Question is how can i create webhook using pipeline function.*

*Thanks*,
*Saswat*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEhPkLGOAMO4SXXt2Fw8Pu_iEZkc7bx8XOJEQb6dKcepK8XQGA%40mail.gmail.com.


App authentication using python social core and creation of webhook

2019-10-23 Thread Saswat Ray
https://m.facebook.com/groups/411741268877125?view=permalink&id=2659955947388968

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39e2d5a5-5d2b-4949-b0f4-3c346a47ec64%40googlegroups.com.


Re: Name error

2019-06-05 Thread Raichand Ray
6bbb6b5b655b5556555tgt

On Wed 5 Jun, 2019, 3:17 PM Sipum Mishra,  wrote:

> Plz show your code otherwise search your total error line in Google you
> can find it.
> Always try to paste error codes so that it will b easy to find out error.
>
> Thanks.
>
> On Wed, 5 Jun, 2019, 3:12 PM RAJA MISHRA, 
> wrote:
>
>> Name error : name 'django' is not defined in one of my app
>> Plzz anyone explain how to fix this
>>  also how to use django.setup()
>>
>> --
>> 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/4bbd7afe-ddd8-4c25-a620-7e6da5ddd5c5%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/CAGHZBzzo8Ks05zFq7eVHjGFQV1aF5E5D%2B7zMe1cH%3D2PAUwN6Vg%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/CAGQNQsW7ak%2BD13MTuuML6%2BBLsB-6%2BmdDm%3DOoi4WmRYVyJM1Qkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How do I code this in views.py

2017-06-26 Thread ray laurenz Monterola
I have two views function: index and login:
Index should load first and check if session user id is set, if not it 
should call login function.
login function if get renders the login.html. 

The problem is I'm having errors with index during run time.

-- 
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/b8a1ebcc-98ed-460e-b23b-19241084863c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Migration File with Invalid import (import no longer exists)

2016-12-05 Thread Ray Leyendecker
I recently update the oauth2 library I am using in my project.
There are now import references in my (already run) migration files that no 
longer exist (as a result of the oauth2 upgrade).
As a result the make migrations command fails.

How is the best way to handle this problem?

I am also running my project on AWS (Amazon Web Services) so a solution 
that can be applied to that environment we be much appreciated.

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7f4d454d-9108-4417-9d5f-0312a29cc816%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Any Django developers in Chicago?

2015-02-11 Thread Brian Ray
Hey all,

We are having a Django focused meetup with ChiPy (Chicago Python User 
Group) tomorrow night:

RSVP

http://chipy.org and/or http://www.meetup.com/_ChiPy_/events/220117890/


Talks will be recorded. Also looking for more talks.


Hope to see some of you there.

Warm Regards, Brian Ray

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c81a7151-8e73-41ab-80ee-f2e5535433ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


JSON recieving backend

2014-09-05 Thread Meghdeep Ray
Hi,
I am working on an Android Application which will have to send JSONs to and 
receive them from a Backend which I plan to build in Django.
Does anyone have any good resources for this specific thing ?
Or does anyone know of a GitHub project which already does this ?
Any help is greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5ed81ee2-ea10-48b2-91e7-4658884da6e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Goodbye, Malcolm

2013-03-20 Thread Ray Loyzaga
Hi Jacob,

Would you be able to email me regarding the future funeral arrangements for
Malcolm.
So far the family are looking at 4th April, in Sydney, but the time (and
the date), haven't been totally settled.
It would be great if your could update the notice to include the details,
as his family is not in contact with his wider group of friends.

rloyz...@gmail.com


On Wednesday, March 20, 2013 4:01:39 AM UTC+11, Jacob Kaplan-Moss wrote:
>
> Hello fellow Djangonauts, 
>
> We have difficult news: Malcolm Tredinnick has passed away. 
>
> Malcolm was a long-time contributor to Django, a model community member, 
> a brilliant mind, and a friend. His contributions to Django — and to 
> many other open source projects — are nearly impossible to enumerate. 
> Many on the core Django team had their first patches reviewed by him; 
> his mentorship enriched us. His consideration, patience, and dedication 
> will always be an inspiration to us. 
>
> To say we'll miss him is an understatement. 
>
> Our thoughts are with Malcolm's friends, colleagues, and family at this 
> difficult time. 
>
> This came as quite a shock, and we're still sorting out details. We'll 
> update our blog, 
> https://www.djangoproject.com/weblog/2013/mar/19/goodbye-malcolm/, 
> once we know the details of how you can express your condolences to 
> Malcolm's friends and family. 
>
> — The Django Core Team 
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Object composition in django

2013-02-14 Thread Ray Hatfield
Thanks, but I've omitted related_name and I've used distinct related_names and 
gotten the same errors. I don't want to reuse addresses. The one-to-one 
relationship you describe is precisely what I'm trying to do.

On Feb 14, 2013, at 1:32 AM, Jani Tiainen  wrote:

> Hi,
> 
> You're trying to setup one-to-one relationship.
> 
> It means that producer.mailing_address does have exactly one unique Address 
> entity. Same goes for physical_address.
> 
> What you want is really ForeignKey to address which means that you reuse 
> addresses to multiple producer.mailing_address.
> 
> Then you can omit related names, or like someone suggested use different 
> related names for both fields.
> 
> 13.2.2013 21:25, Ray Hatfield kirjoitti:
>> Hi,
>> 
>> I have a model which requires two addresses: a mailing address and a
>> physical address. From an OO perspective it makes sense to have an
>> Address class and the Producer to have Address instances as properties,
>> but I can't seem to achieve this in django while still being able to
>> edit the addresses inline as part of the Producer admin.
>> 
>> I've tried this sort of thing:
>> 
>> class Address( models.Model ):
>> street = models.CharField( ... )
>> # city state zip, etc.
>> 
>> class Producer( models.Model ):
>> mailing_address = models.OneToOneField( Address, related_name='+' )
>> physical_address = models.OneToOneField( Address, related_name='+' )
>> 
>> but when I attempt to inline the addresses in the django admin I run
>> into trouble. I get errors like:
>> 
>>  has no ForeignKey to > 'producers.models.Producer'>
>> 
>> (This error is true, of course. But I was under the apparently erroneous
>> impression that including related_name='+' would prevent django from
>> setting up the reverse relationship.)
>> 
>> I realize I could add a foreign key to Address to associate it with a
>> specific Producer but this feels backwards to me. An Address shouldn't
>> need to know whether it's for a Producer or some other object. It's just
>> an address.
>> 
>> I've been banging my head on this for far too long. Advice?
>> 
>> --
>> 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 http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
> 
> 
> -- 
> Jani Tiainen
> 
> - Well planned is half done and a half done has been sufficient before...
> 
> -- 
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Object composition in django

2013-02-13 Thread Ray Hatfield
I've considered the address-type-and-foreign-key approach you describe — 
and implemented it and then backed it out again — but that approach bugs me 
at a philosophical level. Address is then bound explicitly to Producer and 
instead of having two addresses each with a specific designation I can have 
0-n addresses, one producer with 14 physical addresses, and so on. I 
understand that I can guard against these situations through validation and 
overriding save methods and such but object composition seems like such a 
simple, common, basic need I'm stunned to find it's not easily achievable.

Thanks for the input.


On Wednesday, February 13, 2013 2:59:56 PM UTC-6, Adam Mesha wrote:
>
> Inlines are for related objects, meaning when I have a foreign key from A 
> to B, on A there is an actual database field that points to B, but on B 
> there's a virtual (related object) field implemented as a python method. 
> When you have a foreign key, the way the admin shows that is just to give 
> you a drop-down list so you can choose the corresponding object in the 
> other model.
>
> To go back to the standard example, there is a foreign key pointing from 
> Book to Author. On the Author admin page you can see and edit all the 
> books, but on the Book page you just have a drop-down to select the 
> relevant author. You could think of it as Book extends in a certain sense 
> Author, so it has a field pointing to its parent.
>
> What I would probably do in your situation is to get rid of the mailing 
> address and physical address in your Producer model, and add a type 
> field(which could be 'mailing' or 'physical' or maybe some more 
> possibilities) and a producer field foreign key. That would allow for 
> easily adding more types of addresses, and more than one of a given type. 
> If it's essential to guarantee that there is exactly one mailing address 
> and exactly one physical address, I would probably override the relevant 
> save methods to check for that when objects are saved.
>
> On Wed, Feb 13, 2013 at 9:25 PM, Ray Hatfield 
> 
> > wrote:
>
>> Hi,
>>
>> I have a model which requires two addresses: a mailing address and a 
>> physical address. From an OO perspective it makes sense to have an Address 
>> class and the Producer to have Address instances as properties, but I can't 
>> seem to achieve this in django while still being able to edit the addresses 
>> inline as part of the Producer admin.
>>
>> I've tried this sort of thing:
>>
>> class Address( models.Model ):
>> street = models.CharField( ... )
>> # city state zip, etc.
>>
>> class Producer( models.Model ):
>> mailing_address = models.OneToOneField( Address, related_name='+' )
>> physical_address = models.OneToOneField( Address, related_name='+' )
>>
>> but when I attempt to inline the addresses in the django admin I run into 
>> trouble. I get errors like:
>>
>>  has no ForeignKey to > 'producers.models.Producer'>
>>
>> (This error is true, of course. But I was under the apparently erroneous 
>> impression that including related_name='+' would prevent django from 
>> setting up the reverse relationship.)
>>
>> I realize I could add a foreign key to Address to associate it with a 
>> specific Producer but this feels backwards to me. An Address shouldn't need 
>> to know whether it's for a Producer or some other object. It's just an 
>> address.
>>
>> I've been banging my head on this for far too long. Advice?
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Adam Mesha >
>  

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Object composition in django

2013-02-13 Thread Ray Hatfield
Hi,

I have a model which requires two addresses: a mailing address and a 
physical address. From an OO perspective it makes sense to have an Address 
class and the Producer to have Address instances as properties, but I can't 
seem to achieve this in django while still being able to edit the addresses 
inline as part of the Producer admin.

I've tried this sort of thing:

class Address( models.Model ):
street = models.CharField( ... )
# city state zip, etc.

class Producer( models.Model ):
mailing_address = models.OneToOneField( Address, related_name='+' )
physical_address = models.OneToOneField( Address, related_name='+' )

but when I attempt to inline the addresses in the django admin I run into 
trouble. I get errors like:

 has no ForeignKey to 

(This error is true, of course. But I was under the apparently erroneous 
impression that including related_name='+' would prevent django from 
setting up the reverse relationship.)

I realize I could add a foreign key to Address to associate it with a 
specific Producer but this feels backwards to me. An Address shouldn't need 
to know whether it's for a Producer or some other object. It's just an 
address.

I've been banging my head on this for far too long. Advice?

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Iphone applications via django

2012-09-11 Thread Ray Ch
Can you tell me how do i do that? 
Do you have any kind of blog or tutorial which would help me out connecting 
the web API's with iphone.

Do you suggest JSON or XML ?


On Tuesday, September 11, 2012 4:09:35 PM UTC+5:30, Cal Leeming [Simplicity 
Media Ltd] wrote:
>
> You can create a server side API for the app - but the actual interface is 
> done using the methods mentioned by Mario previously.
>
> Cal
>
> On Tue, Sep 11, 2012 at 11:09 AM, Mario Gudelj 
> 
> > wrote:
>
>> Nope. You do objective c or html and js with something like phonegap
>> On Sep 11, 2012 6:59 PM, "Sait Maraşlıoğlu" > 
>> wrote:
>>
>>> How do you create iphone applications via django.
>>> Application logic will be django but what about user interface, do we do 
>>> that with django too?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/xL4mqQobAEUJ.
>>> To post to this group, send email to django...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> django-users...@googlegroups.com .
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/J44uT5ivqbIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do you install Django on a shared hosting without root access?

2012-05-12 Thread Michael Ray
I second Webfaction! It will save you a lot of headaches. 

-- 
Michael Ray
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Saturday, May 12, 2012 at 3:22 PM, Timothy Makobu wrote:

> Hi, the host needs to specifically say they support python, then you know 
> wsgi works with them. Check out webfaction.com (http://webfaction.com)
> On May 12, 2012 9:39 PM, "Dan Santos"  (mailto:dansanto...@gmail.com)> wrote:
> > Hi I'm confused about how to setup Django on my shared hosting account 
> > without using root.  They don't have Django or Python support so I will 
> > have to install everything from scratch I guess.
> > 
> > Do I install things in this order for shared hosting, or have I messed up 
> > the order when not using root? 
> > 
> > 1. Python 2.7
> > 2. virtualenv.py
> > http://www.virtualenv.org/en/latest/index.html
> > 
> > 3. (ENV1)$ pip install django
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/django-users/-/_0SpeAgCoTUJ.
> > To post to this group, send email to django-users@googlegroups.com 
> > (mailto:django-users@googlegroups.com).
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com 
> > (mailto:django-users%2bunsubscr...@googlegroups.com).
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: is django for me?

2012-05-11 Thread Michael Ray
Well you are talking about a backend language vs a front end language, so 
theoretically yes django can work with flash. 

The Flash replacement though is HTML5 methods which include CSS Transitions, 
CSS Animations, and the Canvas elements paired with intermediate Jacascript 
knowledge.

All of those things are pure frontend and would work with any framework. 

-- 
Michael Ray
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Friday, May 11, 2012 at 10:08 PM, giraffasaurus wrote:

> Hi everyone,
> 
> i recently got my first web design job and i am wondering if django is
> the software for me. I will be working solo, doing both the graphic
> design and the coding.
> i am interested in django because i can already use python. The
> commission requires something highly customised, with a lot of inbuilt
> video and audio which can be constantly updated.
> The only website i have designed previously was built with Flash
> because this was the only way i could find to achieve a high degree of
> customisation and layout animation. But many people dislike flash
> these days, although im not really sure what the alternatives are and
> if any of the better ones are python based.
> Can Django integrate Flash, or some alternative animation software to
> help create a custom layout?
> Most of the precedents seem to be text heavy news websites quite
> different from my brief.
> How does it perform compared to other software, regarding multimedia
> and data structures?
> 
> thanks for your help,
> 
> regards,
> 
> giraffasaurus.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Help! Database is locked! Windows developing envrionment, sqlite3, djcelery and djkombu

2011-05-06 Thread Robert Ray
I''im using Django 1.3 with Djcelery and Djkombu on Windows7. When I'm
running a task, I alwalys get the following error saying the database
is locked and then the djcelery process quits:

[2011-05-07 09:44:05,319: INFO/MainProcess] Got task from broker:
app_wb.tasks.task_fetch_user_followers[c057ae92-8b98-468f-96fb-
cd7695e1495f]
[2011-05-07 09:44:20,385: WARNING/MainProcess] Traceback (most recent
call last):
[2011-05-07 09:44:20,387: WARNING/MainProcess] File "D:\CodeBase\qjj
\project_qjj\manage.py", line 14, in 
[2011-05-07 09:44:20,387: WARNING/MainProcess]
execute_manager(settings)
[2011-05-07 09:44:20,388: WARNING/MainProcess] File "C:\Python25\Lib
\site-packages\django\core\management\__init__.py", line 438, in
execute_manager
[2011-05-07 09:44:20,390: WARNING/MainProcess] utility.execute()
[2011-05-07 09:44:20,390: WARNING/MainProcess] File "C:\Python25\Lib
\site-packages\django\core\management\__init__.py", line 379, in
execute
[2011-05-07 09:44:20,391: WARNING/MainProcess]
self.fetch_command(subcommand).run_from_argv(self.argv)
[2011-05-07 09:44:20,391: WARNING/MainProcess] File "C:\Python25\Lib
\site-packages\django\core\management\base.py", line 191, in
run_from_argv
[2011-05-07 09:44:20,392: WARNING/MainProcess] self.execute(*args,
**options.__dict__)
[2011-05-07 09:44:20,394: WARNING/MainProcess] File "C:\Python25\Lib
\site-packages\django\core\management\base.py", line 220, in execute
[2011-05-07 09:44:20,394: WARNING/MainProcess] output =
self.handle(*args, **options)
[2011-05-07 09:44:20,394: WARNING/MainProcess] File "c:\python25\lib
\site-packages\django_celery-2.2.4-py2.5.egg\djcelery\management
\commands\celeryd.py", line 21, in handle
[2011-05-07 09:44:20,394: WARNING/MainProcess] worker.run(*args,
**options)
[2011-05-07 09:44:20,395: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\bin\celeryd.py", line 96,
in run
[2011-05-07 09:44:20,395: WARNING/MainProcess] return
self.app.Worker(**kwargs).run()
[2011-05-07 09:44:20,397: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\apps\worker.py", line
135, in run
[2011-05-07 09:44:20,397: WARNING/MainProcess] self.run_worker()
[2011-05-07 09:44:20,398: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\apps\worker.py", line
235, in run_worker
[2011-05-07 09:44:20,398: WARNING/MainProcess] worker.start()
[2011-05-07 09:44:20,398: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\worker\__init__.py", line
250, in start
[2011-05-07 09:44:20,401: WARNING/MainProcess]
blocking(component.start)
[2011-05-07 09:44:20,401: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\syn.py", line 14, in
blocking
[2011-05-07 09:44:20,401: WARNING/MainProcess] return
__sync_current(fun, *args, **kwargs)
[2011-05-07 09:44:20,401: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\syn.py", line 30, in
__blocking__
[2011-05-07 09:44:20,401: WARNING/MainProcess] return fun(*args,
**kwargs)
[2011-05-07 09:44:20,403: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\worker\consumer.py", line
275, in start
[2011-05-07 09:44:20,404: WARNING/MainProcess] self.consume_messages()
[2011-05-07 09:44:20,404: WARNING/MainProcess] File "c:\python25\lib
\site-packages\celery-2.2.5-py2.5.egg\celery\worker\consumer.py", line
291, in consume_messages
[2011-05-07 09:44:20,404: WARNING/MainProcess]
self.connection.drain_events()
[2011-05-07 09:44:20,405: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\connection.py", line 121,
in drain_events
[2011-05-07 09:44:20,405: WARNING/MainProcess] return
self.transport.drain_events(self.connection, **kwargs)
[2011-05-07 09:44:20,407: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\transport\virtual
\__init__.py", line 603, in drain_events
[2011-05-07 09:44:20,407: WARNING/MainProcess] item, channel =
self.cycle.get(timeout=timeout)
[2011-05-07 09:44:20,407: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\transport\virtual
\scheduling.py", line 40, in get
[2011-05-07 09:44:20,407: WARNING/MainProcess] return
self.fun(resource, **kwargs), resource
[2011-05-07 09:44:20,407: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\transport\virtual
\__init__.py", line 622, in _drain_channel
[2011-05-07 09:44:20,410: WARNING/MainProcess] return
channel.drain_events(timeout=timeout)
[2011-05-07 09:44:20,410: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\kombu\transport\virtual
\__init__.py", line 454, in drain_events
[2011-05-07 09:44:20,411: WARNING/MainProcess] return
self._poll(self.cycle, timeout=timeout)
[2011-05-07 09:44:20,411: WARNING/MainProcess] File "c:\python25\lib
\site-packages\kombu-1.0.7-py2.5.egg\komb

Re: Django 1.2 Dropped Sessions when single view contains registration and login authentication

2011-04-26 Thread Ray Cote
- Original Message -
> From: "benp" 
> To: "Django users" 
> Sent: Monday, April 25, 2011 8:54:15 AM
> Subject: Django 1.2 Dropped Sessions when single view contains registration 
> and login authentication
> I've seen other Django developers have the same exact issue with
> registering and logging in a user in the same view. There hasn't been
> a satisfactory answer yet, though I've seen it suggested that it could
> be related to MySQL timeouts or threading issues.
I'll just add my voice as someone else also fighting this issue to no avail.

In our situation, we have two (originally identical) deployments of a custom 
Django app. 
One never has this problem. Users of the second one frequently report this 
error. 
And yes, difficult to reproduce in our test environments. 
--Ray

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model.clean() ValidationError

2011-03-15 Thread Ion Ray Studios

On 15/03/11 14:56, Tom Evans wrote:

On Tue, Mar 15, 2011 at 2:36 PM, Ben Dembroski  wrote:

Hi Tom,

Thanks for your reply. (You're right, my example was lousy).

I did in fact try what you suggested earlier on, and got the the
following error:

AttributeError at /people/add/

'ValidationError' object has no attribute 'message_dict'

Request Method: POST
Request URL:http://localhost:8000/people/add/
Django Version: 1.3 rc 1 SVN-15755
Exception Type: AttributeError
Exception Value:

'ValidationError' object has no attribute 'message_dict'

Exception Location: /home/benjamin/Ion/ellieharrison/trajectories/
views.py in playeradd, line 298
Python Executable:  /usr/bin/python
Python Version: 2.6.6
Python Path:

['/home/benjamin/Ion/ellieharrison',
  '/usr/lib/python2.6',
  '/usr/lib/python2.6/plat-linux2',
  '/usr/lib/python2.6/lib-tk',
  '/usr/lib/python2.6/lib-old',
  '/usr/lib/python2.6/lib-dynload',
  '/usr/lib/python2.6/dist-packages',
  '/usr/lib/python2.6/dist-packages/PIL',
  '/home/benjamin/django-trunk',
  '/usr/lib/python2.6/dist-packages/gst-0.10',
  '/usr/lib/pymodules/python2.6',
  '/usr/lib/python2.6/dist-packages/gtk-2.0',
  '/usr/lib/pymodules/python2.6/gtk-2.0']

Server time:Tue, 15 Mar 2011 14:27:13 +

I have this in the code:
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS

and the code is currently so:
except ValidationError, e:
errormsg = e.message_dict[NON_FIELD_ERRORS]

form = EditPerson()
return render_to_response('personentry.html', { 
'form' : form,
'errormsg': errormsg  },context_instance=RequestContext(request))


Here's the full traceback:

Environment:


Request Method: POST
Request URL: http://localhost:8000/people/add/

Django Version: 1.3 rc 1 SVN-15755
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.messages',
  'django.contrib.admin',
  'trajectories']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/home/benjamin/django-trunk/django/core/handlers/base.py" in
get_response
  111. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/benjamin/django-trunk/django/contrib/auth/decorators.py"
in _wrapped_view
  23. return view_func(request, *args, **kwargs)
File "/home/benjamin/Ion/ellieharrison/trajectories/views.py" in
playeradd
  298.  errormsg = e.message_dict[NON_FIELD_ERRORS]

Exception Type: AttributeError at /people/add/
Exception Value: 'ValidationError' object has no attribute
'message_dict'


Hmm, I think the docs are, if not wrong, misleading. From looking at
the code (1.2/trunk), ValidationError only has an attribute
message_dict if it is constructed with a dictionary (I let out an
audible 'ewww' as I read the code).

If it is constructed with a string or a list of strings, then it
should have an attribute messages, which is a simple list of strings.

There is also a method update_error_dict(). I think using this, you
can write some code which works in all cases:

from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
try:
   ...
except ValidationError, e:
   message_dict = e.update_error_dict({})
   print message_dict[NON_FIELD_ERRORS]

Just while I'm on this class, the update_error_dict() method will
happily take None as an argument if it is constructed with a
dictionary (by design, it checks for it), but blows up if it is
constructed with a list or a string:


e=ValidationError({'foo': 'bar'})
e.update_error_dict(None)

{'foo': 'bar'}

e=ValidationError('foo bar')
e.update_error_dict(None)

Traceback (most recent call last):
   File "", line 1, in
   File "django/core/exceptions.py", line 85, in update_error_dict
 error_dict[NON_FIELD_ERRORS] = self.messages
TypeError: 'NoneType' object does not support item assignment


This class is horrendous - however it is constructed, it should
present a consistent interface. It can't even present a consistent
method.

Dirty, Bad and Wrong.

Cheers

Tom


Thanks Tom.

Did the trick!

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model.clean() ValidationError

2011-03-15 Thread Ion Ray Studios

On 15/03/11 14:42, Daniel Roseman wrote:

On Tuesday, March 15, 2011 2:36:45 PM UTC, Ben Dembroski wrote:


Hi Tom,

Thanks for your reply. (You're right, my example was lousy).

I did in fact try what you suggested earlier on, and got the the
following error:

AttributeError at /people/add/

'ValidationError' object has no attribute 'message_dict'


I have this in the code:
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS

and the code is currently so:
except ValidationError, e:
errormsg = e.message_dict[NON_FIELD_ERRORS]

form = EditPerson()
return render_to_response('personentry.html', { 'form' : form,
'errormsg': errormsg  },context_instance=RequestContext(request))


Why are you trying to catch the ValidationError? The whole point is 
that this is caught by the form's `clean()` method and then the 
message appears in the error dictionary.

--
DR.
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

I knew someone was going to ask that :)

Mostly, it's a 'hacky' reason.  In this occasion, the form is collecting 
the date date in 'sections', Year, Month, Day.  Only the Year is 
required.  The month and the day are optional.   If the user leaves the 
month and / or day fields blank, the  view is inserting dummy values 
into the database.  (Don't ask me why, please).


At the moment, all the form is doing is checking to make sure each field 
is an integer, and has the appropriate number of digits in each field.   
However, it's still possible for a user to enter an invalid date -- Like 
1956 - 02 - 31.   The form is valid, but the date is not.  Handling the 
exception being raised by the model validation just seemed easier for 
some reason.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cleaned_data not behaving how I expect it to. (newbie confusion)

2011-02-08 Thread Ion Ray Studios

Thanks for the "heads up".

I actually was aware of this. When I'm trying to figure this kind of 
thing out, I start with the simplest problem and then add complications 
once I understand the fundamentals -- even if that means doing it the 
wrong way initially.  Perhaps not the best approach...


Thanks again!

On 08/02/11 09:21, Tom Evans wrote:

On Mon, Feb 7, 2011 at 11:54 PM, Ben Dembroski  wrote:

My apologies to the list.

I just noticed the commas at the end of the lines in the views.py
file.

Once I got rid of those, all was much better.




Glad to hear it. BTW, you are expressly going against how django
suggests you validate two fields that depend upon each other. [1]

Cheers

Tom

[1] 
http://docs.djangoproject.com/en/1.2/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: copying sqlite database file between projects

2011-01-26 Thread Ion Ray Studios
Yup. That did it.  The errors were a result of setttings.py pointing to 
the wrong database.


Too much mucking about with too many things at the same time...


On 25/01/11 16:36, Michael wrote:

I believe table names are all lower-case, so try 'sample_app_person'


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: copying sqlite database file between projects

2011-01-25 Thread Ion Ray Studios
That solved the syncdb error, but I'm still getting the same error 
inside the shell when I am trying get to the data.


Progress!

Thanks again!


On 25/01/11 16:36, Michael wrote:

I believe table names are all lower-case, so try 'sample_app_person'


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Proper approach to updating model object with 100 attributes.

2010-06-30 Thread Ray Cote
Thanks for everybody's comments. 
I ended up using the setattr method and, since I always know the data I have is 
a subset of the data in the model, that works wonderfully. 

--Ray


- Original Message -
From: "euan.godd...@googlemail.com" 
To: "Django users" 
Sent: Wednesday, June 30, 2010 10:01:11 AM GMT -05:00 US/Canada Eastern
Subject: Re: Proper approach to updating model object with 100 attributes.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Proper approach to updating model object with 100 attributes.

2010-06-29 Thread Ray Cote
Hi Tim: 

Thanks for the pointers. 
I think the setattr is probably safest way to deal with the Django models. 

--Ray

- Original Message -
From: "Tim Chase" 
To: django-users@googlegroups.com
Cc: "Ray Cote" 
Sent: Tuesday, June 29, 2010 2:03:05 PM GMT -05:00 US/Canada Eastern
Subject: Re: Proper approach to updating model object with 100 attributes.

On 06/29/2010 12:01 PM, Ray Cote wrote:
> Hi List:
>
> I have a Django model with over 100 fields in it that is loaded from a data 
> feed.
> Each row in the model has a unique field, let's call it item_id.
> When loading new data, I'm first checking to see if item_id is in the table,
> if it is, I want to update it with the new data from the new 100 fields.
>
> To date, I've done things like:
>
> obj = Model.objects.get(item_id = item_id_from_field)
>
> and then.
> obj.field1 = new_field1
> etc.
>
> However, for 100 fields, I'd like to find something a bit cleaner than 
> listing 100 fieldnames.
> The data for the new 100 fields is in a nice dictionary.
>
> When I create a new item, I'm able to do this:
>obj = MyModel(**dictionary_of_field_values)
>
> Is there something similar I can do with my obj once the data is retrieved?

Well, you could do something like

   for name, value in dictionary_of_field_values.items():
 setattr(obj, name, value)

or possibly even just

   obj.__dict__.update(dictionary_of_field_values)

(I'm not sure how this interacts with Django's meta-class 
yumminess, but it works for regular Python classes)

-tkc




-- 
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Proper approach to updating model object with 100 attributes.

2010-06-29 Thread Ray Cote
Hi List:

I have a Django model with over 100 fields in it that is loaded from a data 
feed. 
Each row in the model has a unique field, let's call it item_id.
When loading new data, I'm first checking to see if item_id is in the table, 
if it is, I want to update it with the new data from the new 100 fields. 

To date, I've done things like:

obj = Model.objects.get(item_id = item_id_from_field)

and then.
obj.field1 = new_field1
etc. 

However, for 100 fields, I'd like to find something a bit cleaner than listing 
100 fieldnames. 
The data for the new 100 fields is in a nice dictionary. 

When I create a new item, I'm able to do this:
  obj = MyModel(**dictionary_of_field_values)

Is there something similar I can do with my obj once the data is retrieved? 

Thanks
--Ray

-- 
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Chicago Python User Group: Customize Django Admin

2010-06-10 Thread Brian Ray
Hello:

I will be presenting tonight at ChiPy http://chipy.org If anyone is
around Chicago tonight, feel free to stop in.   Here is the official
announcement http://mail.python.org/pipermail/chicago/2010-June/006863.html

thanks, Brian Ray
http://twitter.com/brianray

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
usually in a folder called data as defined in the solrconfig.xml but I
dont think looking in the data folder will help you.

Ray

On 23 Apr, 18:32, Ariel  wrote:
> Where does the apache solr save the index ???
>
>
>
>
>
> On Fri, Apr 23, 2010 at 1:23 PM, Ariel  wrote:
> > What I do here in search_indexes.py is this:
>
> > from haystack import site
> > from atl_cms.content_type.models import News, Document
>
> > site.register(News)
> > site.register(Document)
>
> > On Fri, Apr 23, 2010 at 4:18 AM, Ray McBride wrote:
>
> >> You should have defined the fields yourself in you search_indexes.py
> >> file in your app
>
> >>http://docs.haystacksearch.org/dev/searchindex_api.html#quick-start
>
> >> Solr knows about these because you copy your generated schema.xml file
> >> into the conf folder
>
> >> Ray
>
> >> On Apr 22, 6:46 pm, Ariel  wrote:
> >> > I don't know how to know that because I don't know the name of the
> >> fields in
> >> > the index.
> >> > How could I know it ???
> >> > Regards
> >> > Ariel
>
> >> > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride 
> >> wrote:
> >> > > How many results are returned when you search using the solr admin
> >> > > interface?
>
> >> > > Are you using the code that I posted for you previously?
>
> >> > > Ray
>
> >> > > On Apr 19, 6:29 pm, Ariel  wrote:
> >> > > > Hi everybody:
> >> > > > I have a big problem with pagination using apache solr and haystack,
> >> this
> >> > > is
> >> > > > what it is happening: I have a site where the news are being
> >> indexing
> >> > > with
> >> > > > haystack and solr, but the problem is that when a I make the search
> >> the
> >> > > > pagination is showing me more match results that what really exists
> >> even
> >> > > > more results that total news in my database, for example I have only
> >> 20
> >> > > news
> >> > > > in the database but when I make a search the pagination said 40
> >> matching
> >> > > > results are found then when I navigate with the "next" link to see
> >> the
> >> > > other
> >> > > > results any result is showed.
>
> >> > > > I hope I have made a good explanation of my problem.
> >> > > > Could you help me please ???
> >> > > > I don't know why it is happening that 
> >> > > > Regards.
> >> > > > Ariel
>
> >> > > > --
> >> > > > You received this message because you are subscribed to the Google
> >> Groups
> >> > > "Django users" group.
> >> > > > To post to this group, send email to django-us...@googlegroups.com.
> >> > > > To unsubscribe from this group, send email to
> >> > > django-users+unsubscr...@googlegroups.com >> > >  groups.com>
> >> 
> >> > > .
> >> > > > For more options, visit this group athttp://
> >> > > groups.google.com/group/django-users?hl=en.
>
> >> > > --
> >> > > You received this message because you are subscribed to the Google
> >> Groups
> >> > > "Django users" group.
> >> > > To post to this group, send email to django-us...@googlegroups.com.
> >> > > To unsubscribe from this group, send email to
> >> > > django-users+unsubscr...@googlegroups.com >> > >  groups.com>
> >> 
> >> > > .
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/django-users?hl=en.
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> Groups "Django users" group.
> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> django-users+unsubscr...@googlegroups.com >>  groups.com>
> >> .
> >> > For more options, visit this group athttp://
> >> groups.google.com/group/django-users?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Django users" group.
> >> To post to this group, send email to django-us...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> django-users+unsubscr...@googlegroups.com >>  groups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
You have no SearchIndex class. see the quick start guide in the link I
sent you
R

On 23 Apr, 18:23, Ariel  wrote:
> What I do here in search_indexes.py is this:
>
> from haystack import site
> from atl_cms.content_type.models import News, Document
>
> site.register(News)
> site.register(Document)
>
>
>
>
>
> On Fri, Apr 23, 2010 at 4:18 AM, Ray McBride  wrote:
> > You should have defined the fields yourself in you search_indexes.py
> > file in your app
>
> >http://docs.haystacksearch.org/dev/searchindex_api.html#quick-start
>
> > Solr knows about these because you copy your generated schema.xml file
> > into the conf folder
>
> > Ray
>
> > On Apr 22, 6:46 pm, Ariel  wrote:
> > > I don't know how to know that because I don't know the name of the fields
> > in
> > > the index.
> > > How could I know it ???
> > > Regards
> > > Ariel
>
> > > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride 
> > wrote:
> > > > How many results are returned when you search using the solr admin
> > > > interface?
>
> > > > Are you using the code that I posted for you previously?
>
> > > > Ray
>
> > > > On Apr 19, 6:29 pm, Ariel  wrote:
> > > > > Hi everybody:
> > > > > I have a big problem with pagination using apache solr and haystack,
> > this
> > > > is
> > > > > what it is happening: I have a site where the news are being indexing
> > > > with
> > > > > haystack and solr, but the problem is that when a I make the search
> > the
> > > > > pagination is showing me more match results that what really exists
> > even
> > > > > more results that total news in my database, for example I have only
> > 20
> > > > news
> > > > > in the database but when I make a search the pagination said 40
> > matching
> > > > > results are found then when I navigate with the "next" link to see
> > the
> > > > other
> > > > > results any result is showed.
>
> > > > > I hope I have made a good explanation of my problem.
> > > > > Could you help me please ???
> > > > > I don't know why it is happening that 
> > > > > Regards.
> > > > > Ariel
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Django users" group.
> > > > > To post to this group, send email to django-us...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > django-users+unsubscr...@googlegroups.com > > >  groups.com>
> > 
> > > > .
> > > > > For more options, visit this group athttp://
> > > > groups.google.com/group/django-users?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Django users" group.
> > > > To post to this group, send email to django-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > django-users+unsubscr...@googlegroups.com > > >  groups.com>
> > 
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/django-users?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/django-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
You should have defined the fields yourself in you search_indexes.py
file in your app

http://docs.haystacksearch.org/dev/searchindex_api.html#quick-start

Solr knows about these because you copy your generated schema.xml file
into the conf folder

Ray

On Apr 22, 6:46 pm, Ariel  wrote:
> I don't know how to know that because I don't know the name of the fields in
> the index.
> How could I know it ???
> Regards
> Ariel
>
>
>
>
>
> On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride  wrote:
> > How many results are returned when you search using the solr admin
> > interface?
>
> > Are you using the code that I posted for you previously?
>
> > Ray
>
> > On Apr 19, 6:29 pm, Ariel  wrote:
> > > Hi everybody:
> > > I have a big problem with pagination using apache solr and haystack, this
> > is
> > > what it is happening: I have a site where the news are being indexing
> > with
> > > haystack and solr, but the problem is that when a I make the search the
> > > pagination is showing me more match results that what really exists even
> > > more results that total news in my database, for example I have only 20
> > news
> > > in the database but when I make a search the pagination said 40 matching
> > > results are found then when I navigate with the "next" link to see the
> > other
> > > results any result is showed.
>
> > > I hope I have made a good explanation of my problem.
> > > Could you help me please ???
> > > I don't know why it is happening that 
> > > Regards.
> > > Ariel
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/django-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I have a problem with the pagination with haystack and apache solr

2010-04-21 Thread Ray McBride
How many results are returned when you search using the solr admin
interface?

Are you using the code that I posted for you previously?

Ray

On Apr 19, 6:29 pm, Ariel  wrote:
> Hi everybody:
> I have a big problem with pagination using apache solr and haystack, this is
> what it is happening: I have a site where the news are being indexing with
> haystack and solr, but the problem is that when a I make the search the
> pagination is showing me more match results that what really exists even
> more results that total news in my database, for example I have only 20 news
> in the database but when I make a search the pagination said 40 matching
> results are found then when I navigate with the "next" link to see the other
> results any result is showed.
>
> I hope I have made a good explanation of my problem.
> Could you help me please ???
> I don't know why it is happening that 
> Regards.
> Ariel
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to make pagination with haystack

2010-04-08 Thread Ray McBride
page is passed in by the view

http://github.com/toastdriven/django-haystack/blob/master/haystack/views.py

django pagination requires page_obj

http://code.google.com/p/django-pagination/source/browse/trunk/pagination/templates/pagination/pagination.html

best wishes

Ray
--
http://raymcbride.com



On 8 April 2010 21:07, Ariel  wrote:
> That variables in the piece of code that you have given are automatically
> passed by the faceted view of the haystack to the search.html template ???
>
> On Thu, Apr 8, 2010 at 10:43 AM, Ray McBride  wrote:
>>
>> Try
>>
>> {% with page as page_obj %}
>> {% paginate %}
>> {% endwith %}
>>
>> Ray
>>
>> On Apr 8, 2:57 pm, Ariel  wrote:
>> > Hi everybody:
>> > I am relatively newbie in django, I have an application with search
>> > functionalities that's why I am using haystack with solr, the search
>> > work
>> > perfectly but I need to make the pagination but I have not idea how to
>> > do
>> > it, could you give some help ??? how to do it ???
>> > Thanks in advance,
>> > Ariel
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to make pagination with haystack

2010-04-08 Thread Ray McBride
Try

{% with page as page_obj %}
{% paginate %}
{% endwith %}

Ray

On Apr 8, 2:57 pm, Ariel  wrote:
> Hi everybody:
> I am relatively newbie in django, I have an application with search
> functionalities that's why I am using haystack with solr, the search work
> perfectly but I need to make the pagination but I have not idea how to do
> it, could you give some help ??? how to do it ???
> Thanks in advance,
> Ariel

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Hosting for Django sites

2010-04-03 Thread Ray Cote
We have experience with Webfaction, Slicehost, and Linode. 
Webfaction has excellent Django support, ability to generate basic app layouts, 
etc. 
Shell access (which is always important to us). 

Slicehost and Linode are excellent Django-serving platforms, but then again 
they are excellent general serving platforms. You're on your own with 
install/configuration. But you get more fine-tuned control than with 
WebFaction. 

--Ray

- Original Message -
From: "django_jedi" 
To: "Django users" 
Sent: Saturday, April 3, 2010 10:39:41 AM GMT -05:00 US/Canada Eastern
Subject: Hosting for Django sites

Hi Folks,

I'm wondering what people would recommend for hosting Django sites?
I've read the blog posts; I'm wondering what the latest word on the
street would be.  We're talking about hosting multiple Django/Satchmo
installs, possibly w/dedicated/managed servers.

Among the leading contenders so far:

- Webfaction
- Media Temple
- Rackspace Cloud/Slicehost

Thoughts?

TIA.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


-- 
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Any CRM based on django?

2010-02-19 Thread Ray
On Feb 19, 8:58 pm, Massimiliano della Rovere
 wrote:
> At work we are planning move from Sugar CRM PRO to something else
> free. I'd love moving to something python based, but it seems the only
> free and reliable solution is VTiger 5 written in php.
>
> Does anybody here know any CRM based on django?

It may not fit the requirements exactly but OpenERP may have the
functionality you require.

Regards,

Ray Smith
http://RaymondSmith.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Why there are so few open-source business applications in django?

2010-01-07 Thread Ray
On Jan 8, 9:35 am, Mohammad Tayseer  wrote:
> I know that there are applications written in django for everything, but why 
> there are so few open-source business application in django? I mean 
> applications like warehouse management systems, HR systems, etc. The existing 
> ones are out of date.

I think you can say the same thing about Python in general.
And to take it a step further there really aren't that many "good"
open source "business" applications.  There are a few of course but
compared to other categories of software - very few.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: New to Django

2009-12-23 Thread Ray
On Dec 24, 10:32 am, datta  wrote:
> Hi, I just decided to build my web application in Django some 10
> minutes ago. (Don't ask me "why?". For the curious mind, it is a
> random decision because I like Python).


great!

> Can someone tell me if:
>
> 1. Can I do everything I can do in PHP (like maintaining sessions,
> etc.) using Django ?

Yes

> 2. How can I change my UI design?

Yes

> 3. Is it a difficult learning curve for designing websites with
> Django?

It depends on your experience with previous web development and your
current skills and ability to learn.  But, many say Django is one of
the easiest frameworks to get up and going quickly.

> Some simple tutorial (other than the one on Django website).
> If some Django evangelist can guild me I will be INDEBTED!


The online tutorial is great,
The main Django doco is great

http://djangobook.com is great

If you have read all of that, played with Django a bit you should be
well on your way to building your new site! :)

Regards,

Ray Smith

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Making the case for Django (vs. Drupal)

2009-11-12 Thread Ray
On Nov 12, 11:16 am, shacker  wrote:
> I just wanted to thank everyone for their excellent contributions to
> this thread. Sorry I got side-tracked for a while. I've just put up a
> pretty complete draft of a post on this topic, written with decision
> makers (managers, supervisors) in mind. It's still probably somewhat
> technical for that group, but that's the nature of the topic.
>
> http://birdhouse.org/blog/2009/11/11/drupal-or-django/
>

Hi Scot,

You should probably send a link over to the Drupal forum as well to
get some feedback from the other side of the fence.

To sum it up, anyone who is good developer and experienced in either
platform will probably produce very similar results in a similar
timeframe.

It really comes down to:

"do you (or your department) want to write code in PHP or Python"

because unless you have hugely complex or popular sites, either would
work quite comfortably.

Regards,

Ray Smith

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.




Re: Encoding question

2009-09-09 Thread ray

Hi Oleg

You can use BeautifulSoup

from BeautifulSoup import BeautifulSoup
>>> html = '\r\n\r\n\r\n>> Strict//EN" 
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>\r\n\r\n>> xmlns="http://www.w3.org/1999/xhtml";>\r\n  \r\n>> http-equiv="content-type" content="text/html; charset=utf-8" />\r\n\r\n 
>>>\nJapanese innovation | 
>>> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f 
>>> \xd0\xb8\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8\n\r\n
>>> \n>> content="\xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f, 
>>> \xd0\xa2\xd0\xb5\xd1\x85\xd0\xbd\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb3\xd0\xb8\xd0\xb8,
>>>  \xd0\x98\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8, 
>>> \xd0\x94\xd0\xbe\xd0\xbc\xd0\xb0\xd1\x88\xd0\xbd\xd1\x8f\xd1\x8f 
>>> \xd1\x81\xd1\x82\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb0" />\n>> name="description" 
>>> content="\xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f, 
>>> \xd1\x8f\xd0\xbf\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8\xd0\xb5 
>>> \xd0\xb8\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8, 
>>> \xd1\x8f\xd0\xbf\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8\xd0\xb5 
>>> \xd1\x82\xd0\xb5\xd1\x85\xd0\xbd\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb3\xd0\xb8\xd0\xb8,
>>>  \xd0\xbd\xd0\xb0\xd1\x83\xd0\xba\xd0\xb0 
>>> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd0\xb8, 
>>> \xd1\x83\xd1\x87\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8b\xd0\xb5 
>>> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f, 
>>> \xd0\xba\xd0\xbe\xd0\xbc\xd0\xbf\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xb8 
>>> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f, 
>>> \xd1\x82\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8b 
>>> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f" />\n\r\n\r\n'
>>> soup = BeautifulSoup(html)
>>> print soup.prettify()

http://www.w3.org/1999/xhtml";>
 
  
  
   Japanese innovation | Япония инновации
  
  
  
 


best wishes

Ray McBride

On 9 Sep, 10:06, Oleg Oltar  wrote:
> Hi!
>
> One of my tests returned following text ()
>
> The test:
> from django.test.client import Client
>  c = Client()
> resp = c.get("/")
> resp.content
>
> In [25]: resp.content
> Out[25]: '\r\n\r\n\r\n Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>\r\n\r\n xmlns="http://www.w3.org/1999/xhtml";>\r\n  \r\n     http-equiv="content-type" content="text/html; charset=utf-8" />\r\n
> \r\n    \nJapanese innovation |
> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f
> \xd0\xb8\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8\n\r\n
> \n content="\xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f,
> \xd0\xa2\xd0\xb5\xd1\x85\xd0\xbd\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb3\xd0\xb8\xd0\xb8,
> \xd0\x98\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8,
> \xd0\x94\xd0\xbe\xd0\xbc\xd0\xb0\xd1\x88\xd0\xbd\xd1\x8f\xd1\x8f
> \xd1\x81\xd1\x82\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb0" />\n name="description"
> content="\xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f,
> \xd1\x8f\xd0\xbf\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8\xd0\xb5
> \xd0\xb8\xd0\xbd\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8,
> \xd1\x8f\xd0\xbf\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8\xd0\xb5
> \xd1\x82\xd0\xb5\xd1\x85\xd0\xbd\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb3\xd0\xb8\xd0\xb8,
> \xd0\xbd\xd0\xb0\xd1\x83\xd0\xba\xd0\xb0
> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd0\xb8,
> \xd1\x83\xd1\x87\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8b\xd0\xb5
> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f,
> \xd0\xba\xd0\xbe\xd0\xbc\xd0\xbf\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xb8
> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f,
> \xd1\x82\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8b
> \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f" />\n\r\n\r\n
>
> Is there a way I can convert it to normal readable text? (I need for example
> to find a string of text in this response to check if my test case Pass or
> failed)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django, MySQL, unicode

2009-09-07 Thread ray

Hi there

We have a app that processes xml from a third party web service.

We were constantly getting decoding errors so we now use BeautifulSoup
to tidy the xml up before any processing.

best wishes

Ray

On 7 Sep, 10:03, Tracy Reed  wrote:
> I have a Django app which processes emails. It is often handed emails
> with unicode characters in them. My understanding is that Python and
> Django handle unicode just fine and somewhat transparently. I was,
> however, told that I need to set my database tables to UTF-8
> encoding. I have done this. Yet I still frequently get errors such as
> this when my app encounters unicode:
>
>  Traceback (most recent call last):
>
>    File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 
> 92, in get_response
>      response = callback(request, *callback_args, **callback_kwargs)
>
>    File "/var/spool/filter/email_archive/store_emails/views.py", line 84, in 
> mail_detail
>      return render_to_response('mail_detail.html', {'mail': ourmail,
>
>    File "/usr/lib/python2.4/site-packages/django/shortcuts/__init__.py", line 
> 20, in render_to_response
>      return HttpResponse(loader.render_to_string(*args, **kwargs), 
> **httpresponse_kwargs)
>
>    File "/usr/lib/python2.4/site-packages/django/template/loader.py", line 
> 108, in render_to_string
>      return t.render(context_instance)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 178, in render
>      return self.nodelist.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 779, in render
>      bits.append(self.render_node(node, context))
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 792, in render_node
>      return node.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/loader_tags.py", 
> line 97, in render
>      return compiled_parent.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 178, in render
>      return self.nodelist.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 779, in render
>      bits.append(self.render_node(node, context))
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 792, in render_node
>      return node.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/loader_tags.py", 
> line 24, in render
>      result = self.nodelist.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 779, in render
>      bits.append(self.render_node(node, context))
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 792, in render_node
>      return node.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py", 
> line 243, in render
>      return self.nodelist_true.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 779, in render
>      bits.append(self.render_node(node, context))
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 792, in render_node
>      return node.render(context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 831, in render
>      return _render_value_in_context(output, context)
>
>    File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 
> 811, in _render_value_in_context
>      value = force_unicode(value)
>
>    File "/usr/lib/python2.4/site-packages/django/utils/encoding.py", line 92, 
> in force_unicode
>      raise DjangoUnicodeDecodeError(s, *e.args)
>
>  DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in
>  position 1468: unexpected code byte. You passed in "\nGood
>  Day,\n\n\n\nWe offer a part time job on your computer.
>
>   
>
> There is a 0x92 in position 1468 just as the error says.
>
> Do I need to be doing a .encode('utf-8') before putting anything into
> the db? I cannot seem to get a clear answer on this. Some say no, some
> say yes. Do I need to do any decoding or anything on data pulled out
> of the db? I have been told that MySQL should be handling all of this
> for me.
>
> I have been banging my head on this particular error off and on for a
> couple of weeks and cannot seem to find the solution.
>
> Any pointers appreciated.
>
> --
> Tracy Reedhttp://tracyreed.org
>
>  application_pgp-signature_part
> < 1KViewDownload

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to add basic text formatting to the message body of send_mail in django?

2009-08-21 Thread Ray

Hi,
I'm trying to do this:

send_mail(subject='hey, Ray',
    message='Hey ray, this is an automated message, \n heres a
link: yahoo.com or yahoo.com',
from_email='bl...@gmail.co',
recipient_list=['blan...@gmail.com'],
fail_silently=False
)

I'm trying to add newline formatting to the text and perhaps a link.
Is that possible to do without having to send a html message? I tried
\n, that didn't work

thanks,
Ray
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



  1   2   >