Re: [GSoC] Update of my work

2014-08-31 Thread anubhav joshi
I have created a gist which summarizes the work done during my GSoC project 
with links to the commits.
For those interested may have a look: 


*goo.gl/qGGhok *Regards
Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/45df8af7-0cc5-4202-a295-5e24184b0d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[GSoC] Update of my work

2014-07-27 Thread anubhav joshi
Hi all

My project "*Improving error reporting & Fixing up the related issues" 
*proposal 
can be seen here: GSoC Proposal 
<https://gist.github.com/coder9042/c505dfba9514a6e52fdc>

I have been keeping a log of all the work I have been doing for past weeks 
on gist. I thought it'd be good to share it here.
GSoC Work <https://gist.github.com/coder9042/366766db260d4b6f157a>

The work done in 10 weeks is listed out in the gist.
I still have few more issues left to be worked upon in the remainder of the 
time.


Regards,
Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/62649896-e493-497f-9c23-c4f3c8418191%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Decision for ticket #14787

2014-07-10 Thread anubhav joshi
On Thursday, July 10, 2014 9:39:09 PM UTC+5:30, Tim Graham wrote:
>
> It could be useful, however, I think many projects would also want to have 
> some way of configuring the max file upload size without having to specify 
> it on every FileField. One way to achieve this might be if a a custom file 
> upload handler could raise an exception that would be presented as a form 
> field error which is the original idea from that ticket.
>

I found this in tests:

class QuotaUploadHandler(FileUploadHandler):
"""
This test upload handler terminates the connection if more than a quota
(5MB) is uploaded.
"""

QUOTA = 5 * 2 ** 20  # 5 MB

def __init__(self, request=None):
super(QuotaUploadHandler, self).__init__(request)
self.total_upload = 0

def receive_data_chunk(self, raw_data, start):
self.total_upload += len(raw_data)
if self.total_upload >= self.QUOTA:
raise StopUpload(connection_reset=True)
return raw_data

def file_complete(self, file_size):
return None 

Here, we are using QUOTA, we could also use the setting: 
FILE_UPLOAD_MAX_MEMORY_SIZE here as well and specify the size in settings 
file, this does stops the upload but there is no form error.

Here is what I have understood:

Raising error in uploadhandler to catch in forms might not be possible, 
because forms are given the data after handlers have done the job eg. 

form = UploadFileForm(request.POST, request.FILES)
But error in handler must have come when `request` was being made.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6fe70ace-325b-4d21-b080-1b965d86761f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Decision for ticket #14787

2014-07-10 Thread anubhav joshi
Do we have a decision here whether or not to include an option `max_size` 
on FileField in core?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7b1d2efc-0b6a-459c-965b-69f7270cb676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Decision for ticket #14787

2014-07-07 Thread anubhav joshi
As per the suggestion on the ticket, I would like to tell my ideas in a 
better way.

- Add a new attribute *max_size* to FileField and add a check in 
*to_python()* like the others.
  Reasons:
 Easy way to limit the size of file-uploads.
 No need to search for third party implementations or go for server 
based solutions.
 It would default to None so the check would not run if not specified, 
so no problem of backwards incompatibility

- Check for file_name encoding type as well.
  Reasons:
 The problem for file_name encoding can be better dealt this way as 
before proceeding with anything, we check whether name follows proper utf-8 
encoding or not and
 correspondingly raise ValidationError.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0be21ba0-1d23-49ef-ae30-2ad88b84e2ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Decision for ticket #14787

2014-07-07 Thread anubhav joshi
#14787 

The ticket says to handle more errors on *FileField*. The idea it suggests 
is by propagating errors from uploadhandler to forms.
Recently I took to solving the issue.

If we look in files/uploadhandler.py 
,
 
there does not seems to be a proper mechanism to handle errors there or 
raise errors and then catch in forms. Also I feel that all particular 
errors for a particular thing should be together at one place.
For *max_size*, I have added a diff:14787.diff 
 on the 
ticket. What it does is add a new attribute for max_size and then in 
forms.FileField.to_python() 
, 
where all checks are there, it adds another check for the same.
Before trying to add checks for anything else, I had a discussion with Tim 
Graham on this. So what he told me is there are several third party 
implementations which do similar things.

So there are two questions:
1.) Should we including this in core, i.e. the *max_size* attribute and 
corresponding check ?
2.) If not is there any other way to address the issue in the ticket?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9e1046eb-4b9e-411a-8b31-2b6c6bcd51fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: #22383 Add the HTML5 required tag to the input fields which are required for database entry

2014-04-11 Thread anubhav joshi


On Friday, April 11, 2014 4:57:33 AM UTC+5:30, Gregor Müllegger wrote:
>
> I think adding the `required` attribute but ignoring the other possible 
> html form validations (like `min` and `max` [1] for  that are used 
> by the forms.IntegerField) seems a bit half-hearted.
>
> My opinion is that having the required attribute is pretty cool, but 
> should come with all other possible validations baked in then.
> django-floppyforms already includes those validations already in the HTML 
> output of forms and it turns out to be quite useful in many situations. 
> Even if you turn of the browser validation by adding the novalidate 
> attribute to the  tag, it's good to have this meta data in the HTML 
> representation, e.g. for styling.
>
> Gregor
>

Thanks Gregor, but I think here we first need to make it clear do we really 
want it. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/969aae8e-9e07-4e58-96ab-5614436b919e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: #22383 Add the HTML5 required tag to the input fields which are required for database entry

2014-04-10 Thread anubhav joshi


On Thursday, April 10, 2014 11:19:18 PM UTC+5:30, anubhav joshi wrote:
>
> A ticket has been opened asking to add HTML5 required tag in forms for the 
> fields which are required for database entry.
>
> Better wording:
"required for database entry" --> fields have *required* attribute as *True*

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f7f8a915-8cc4-4505-8bc3-770599afeb30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#22383 Add the HTML5 required tag to the input fields which are required for database entry

2014-04-10 Thread anubhav joshi
A ticket has been opened asking to add HTML5 required tag in forms for the 
fields which are required for database entry.

There have been several issues:

   1. Is this new option going to stay or is it just transitional.
   2. Is it going to be an optional feature or default behaviour.
   3. Should we be using a proper deprecation strategy or make it default 
   on master as a backward-incompaible change as otherwise it will be of not 
   much use.
   4. The number of users wanting this may be quite a many.
   
Refs. #22383 

People involved in discussion uptil now on ticket on IRC or ticket: 
timograham, loic84, apollo13  and me.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/92e488c9-2a7d-41f9-8233-612b169d5d40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: #22268 - values_list() on a ManyToManyField returns

2014-03-28 Thread anubhav joshi


> values() and values_list() are both intended as optimisations for a 
> specific use case - retrieval of subsets of data without the overhead of 
> creating a model instance. This metaphor completely falls apart when 
> dealing with m2m relations, because the the "one row, one object" metaphor 
> that underpins most of the ORM falls apart. 
>
> I agree with you on this. "one-row,one-object" cannot be implemented here.
 

> While we could search for a deeper meaning for queries of this type, and 
> restructure the internal SQL to account for this, there's another issue to 
> consider. We're also talking about a part of the query API that has existed 
> since at least the query set refactor, and possibly as far back as magic 
> removal. That means there's between 5 and 7 years of legacy here, in which 
> time nobody else has raised a ticket about this issue. It's also reasonable 
> to assume that there will be a non-trivial number of people depending on 
> the API as currently implemented. 
>
> So, I'm inclined to say this is a known wart in the ORM, born of the leaky 
> abstraction of pushing relational data into an object-based representation. 
> Document the limitation, and move on.
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/da7a89f3-25c8-4503-a443-e77c6b609d09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-27 Thread anubhav joshi
Ok. Thanks

Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/535c14ec-3529-4be1-9363-f89a64fac6d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-27 Thread anubhav joshi
I read on google melange:
"mentoring organizations may request further proposal detail from the 
student applicant."

My tests are about to start so I want to know if and when should I be 
expecting this.

Regards,
Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4da1f7fe-f517-4f21-8524-f562a011685e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#22268 - values_list() on a ManyToManyField returns

2014-03-27 Thread anubhav joshi
There has been quite a discussion on the ticket regarding this
Refs. : https://code.djangoproject.com/ticket/22268
I think we must discuss and decide what should be the solution we should be 
working towards.
Until now there have been two strategies:

1.) The query generated is correct therefore,
We just add pk to the query and then when final result is obtained we can 
club the dicts/tuples having same pk and remove pk.
And also remove the ones where the pk is None (due to the LEFT OUTER JOIN).

2.) Instead of retrieving the M2M or reverse foreign key values in the same 
SQL query, use a clever combination of:

   - prefetch_related() 
   - subclassing dict and tuple 

So values() and values_list return these subclassed dicts and tuples, which 
lazily construct and return the relevant M2M or reverse foreign key 
elements when they are accessed.In the end, the subclassed dict and tuplewould 
work somewhat like the Django model, except that you access things in 
the form of dictionaries and tuples, and you limit the elements that can 
appear in them.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4c1b12a4-822a-4582-8d57-3a8f04f62a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC'14] Proposal: Improve annotation and aggregation

2014-03-21 Thread anubhav joshi
As far as I am aware already the tasks that are listed out in the GSoC idea 
page have been completed by someone and there is a PR for that purpose also.
https://github.com/django/django/pull/2184

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f8af5899-b48a-4156-96c1-ba96b12b909b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-12 Thread anubhav joshi
Well another thing I think I realize now is that I think is there seems to 
be problem of absence of common theme.
To this I would say that if one would look closely at the issues covered up 
in the proposal are those which do report of bad error reporting not just 
simple bugs. The issues do report of misleading messages popping up, 
whatever the reason may be. I did keep in mind this thing while doing my 
background research of issues on Trac or IRC.

Regards,
Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6b125ca5-9d38-43e4-a85d-df9cb9a31dff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-12 Thread anubhav joshi
Having replied to the potential questions above, I would like to summarize 
here once again:

1.) I have a very clear idea of what area of code I will be dealing with.
2.) I have been in conversation with community members on IRC, and have 
taken their say in fixing the issues mentioned in the proposal.
3.) I assure that the mentor will have no such problem of overloading 
himself with a lot of work.
Even if the issues consider several parts, I have good knowledge of those 
things and clear idea of what I have to do.
4.) The reason I chose for taking different modules of django under 
considerations is that if we want to improve upon something why not do it 
entirely instead of some parts.
5.) The idea is still targeted at making error reporting proper because all 
the issues taken into considerations do deal with bad errors coming out 
misleading the user.

I hope my answers satisfy the questions.
Waiting to hear more from you.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f6cf7a0a-69f7-4a21-adab-b24baa033452%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-12 Thread anubhav joshi
ther recast it 
> so that the "common thread" is more obvious (I'm not sure if this is even 
> possible), or take another look at the list of open tickets and try and 
> pick a set that has a slightly more cohesive focus. 
>
> As one last piece of guidance -- the reason this idea was on the wiki was 
> because there were (at least historically), a bunch of areas where Django 
> would raise errors, but the errors that Django raised were not helpful. 
> This was particularly true during template rendering, and to a lesser 
> extent when import errors occurred during model loading. The idea driving 
> the project was to improve this "grand idea" - making it easier to identify 
> the actual source of the problem. Looking at tickets was suggested as a 
> course of action because when big picture "it's bad" issues exist in a 
> framework, they often get reported in a myriad different ways, each 
> reflecting a subtlety in the bigger problem. The idea wasn't strictly to 
> get you to dig up a bunch of tickets to fix; it was to use the tickets as a 
> roadmap to identifying the "bigger" problem.
>  
>
All these areas that are mentioned in my proposal are related to errors 
being reported because at places where they should not be, or being raised 
because of some problem in the code, which is related to 'improve error 
reporting'. Further I extended the idea to fixing related issues.
As you would have seen there are many things that are proposed to be taken 
up like 'refactoring handlers', 'uri_to_iri', etc. which are important and 
they in their help in raising wrong types of error.
 

> That said - if someone steps up and volunteers to take on the workload of 
> shepherding lots of smaller, mostly unrelated tickets, I think this project 
> would probably represent a solid contribution to Django. I just know that 
> personally, I'm not going to be able to put my hand up on this one.
>
> Yours,
> Russ Magee %-)
>
>
> On Tue, Mar 11, 2014 at 1:06 AM, anubhav joshi 
> <anubh...@gmail.com
> > wrote:
>
>> I do keep updating gist upon getting feedback/reviews on IRC as well.
>> Please keep a track.
>> https://gist.github.com/coder9042/c505dfba9514a6e52fdc
>>
>>
>> Regards,
>> Anubhav Joshi
>> IIT Patna
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com .
>> To post to this group, send email to 
>> django-d...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/c1d75c1f-f6a7-4d9e-b633-ea467a80aa9c%40googlegroups.com<https://groups.google.com/d/msgid/django-developers/c1d75c1f-f6a7-4d9e-b633-ea467a80aa9c%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ee61cf8d-c3b4-4ede-82ff-c6f60c44f09f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-10 Thread anubhav joshi
I do keep updating gist upon getting feedback/reviews on IRC as well.
Please keep a track.
https://gist.github.com/coder9042/c505dfba9514a6e52fdc

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c1d75c1f-f6a7-4d9e-b633-ea467a80aa9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-10 Thread anubhav joshi
Done the required.
https://gist.github.com/coder9042/c505dfba9514a6e52fdc

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ea6c35cb-c1a4-42ae-bb79-3a94eb260e9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-08 Thread anubhav joshi
Just realized that the proposal name is : Improving error reporting and 
fixing up related issues. 
Missed 'reporting' in the thread topic.

Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6be77cca-27ec-4530-80bd-307eb81ef8b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-08 Thread anubhav joshi
OK, will do.

Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2047283f-7033-483a-b928-064aa8fe6c08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-08 Thread anubhav joshi
Please refer to the thread : 
https://groups.google.com/forum/#!topic/django-developers/PDY8EEYaHao for 
tickets...

Actually, all of a sudden there has been some problem in my laptop since 
this morning and I can't open my hard disk currently. So, I request you all 
to please view the proposal and leave your reviews and comments. I am 
posting this using a friend's computer, I will be back as soon as I fix up 
my laptop. Probably not more than a day.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/02376c5b-cc0a-43e0-a744-6e1ce4b84d33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[GSoC 2014 Proposal] Improving Error and Fixing up related issues.

2014-03-07 Thread anubhav joshi
Hi all,
   My previous thread: 
https://groups.google.com/forum/#!topic/django-developers/PDY8EEYaHao , 
where I was told by Tim Graham to make all analysis and discussion on 
tickets itself and then present here.

I did what I was told, I discussed issues and strategies on Trac and IRC 
both. My proposal is available as a gist : 
https://gist.github.com/coder9042/c505dfba9514a6e52fdc .

Please have a look and help me in improving it.
If there are any questions, I will be happy to answer.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f8ddff60-7f07-4db2-92e2-9e1899b2ea7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: requiring login to perform Trac actions?

2014-03-03 Thread anubhav joshi

>
> If you believe the "create an account" barrier is a problem, do you think 
> adding something like GitHub auth to Trac would lower the barrier to an 
> acceptable level?
>

 I am in favour of this, as while I was going through tickets, I have found 
many tickets where people have anonymously posted replies and never 
replied.

Regards,
Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5510e93c-95f2-4bfe-bec6-2d963a6f6bd8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: index_together should also have the same convinience as unique_together

2014-03-01 Thread anubhav joshi
This is now fixed in 
bb2ca9f<https://github.com/django/django/commit/bb2ca9fe6cdd490526b44b30f207c8f743bfaa84>
.
PR : #2381 <https://github.com/django/django/pull/2381>

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6b139b71-6459-4055-b0cd-4c18aadcc751%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


index_together should also have the same convinience as unique_together

2014-03-01 Thread anubhav joshi


"For convenience, unique_together can be a single tuple when dealing with a 
single set of fields"

This convinience is missing in index_together:
I have opened a PR, please see: https://github.com/django/django/pull/2381

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c83809ea-f6c4-47b1-8d5d-4f8d2d7131e5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: index_together should also have the same convinience as unique_together

2014-03-01 Thread anubhav joshi
Related : https://code.djangoproject.com/ticket/22172

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2fdeba91-ee5f-48b4-a06c-e520a372bd62%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-27 Thread anubhav joshi
As suggested by Tim Graham, I am going to post my analysis on respective 
tickets.
But there are some issues where I need help in analysing, I have mentioned 
those in my above posts. Also there may be issues for which ticket have not 
been opened, they are only mentioned in the wiki page.
Hence, it is my humble request to please go through the issues here as well 
once for the above mentioned reasons.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9a60e1fa-574b-4ad1-8f06-0b6dec500480%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-27 Thread anubhav joshi
As suggested by Tim Graham, I am going to put my analysis on respective 
tickets.
Also it is possible that some issues are directly mentioned on wiki 
page(there is no ticket for them), so its a humble request to please go 
through it once here.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fb56799c-8dcb-4837-9f6b-53fb9a312cd0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-27 Thread anubhav joshi


On Friday, February 28, 2014 2:03:10 AM UTC+5:30, Tim Graham wrote:
>
> I think it'll be better to put your analysis of each ticket on the ticket 
> itself. Then when you're finished with that, put together a more high level 
> overview of the analysis you've done. I think it will be easier to give 
> feedback if you structure your thoughts in this way. Thanks!
>
>
> If I put my analysis on all the tickets that I have studied and analysed, 
and then if someone on studying that analysis, fixes the issue then what 
will I put in my proposal? I mean I have to ensure that I have sufficient 
work for GSoC. How do I that ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/cb499d9a-7646-44bd-9994-c723f7758110%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-27 Thread anubhav joshi
Here is another issue that I have analysed.

*When the autogenerated field name is too long, there is no proper 
displaying of errors, many a time silent failures for some database.*
Written a fix, although some thinking is required in writing the tests.

@classmethod
def _check_long_column_name(cls):
errors = []
allowed_len = None
db_alias = None

for db in settings.DATABASES.keys():
# skip databases where the model won't be created
if not router.allow_migrate(db, cls):
continue
connection = connections[db]
allowed_len = connection.ops.max_name_length()
db_alias = db

if allowed_len is not None:
for f in cls._meta.local_fields:
_, column_name = f.get_attname_column()
"""
Check if auto-generated name for the field is too long
for the database.
"""
if f.db_column is None:
if len(column_name) > allowed_len:
errors.append(
checks.Error(
'Autogenerated column name too long for field 
"%s".'
'Maximum length is "%s" for "%s".' % 
(column_name, allowed_len, db_alias),
hint='Set the column name manually using 
db_column',
obj=cls,
)
)

return errors

Also it is seen, that *model name truncation is not done properly.*
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length()) is done.

But, something like the following would be more correct:

db = router.db_for_read(self.model)
self.db_table = truncate_name(self.db_table, 
connections[db].ops.max_name_length())

We could also use router.allow_migrate as above.

Also when *db_table name truncation is done, we get a weird message*:

#models.py
class 
(models.Model):
name = models.CharField(max_length=40)

python manage.py syncdb

Creating table 
probs_aa36a3
Warning: Data truncated for column 'name' at row 13

Instead of reporting about the truncated name of the model table, it seems 
to tell about the first field of that table.
This is something done by the backend I believe.*(Correct me if I am 
wrong.)*
Assuming if above is correct, then what we can do is create a warning using 
warning.warn(...) about the correct issue.
Then we can remove the false warning arising from the db.

A mention of similar problem at #18959 is there, but as far as I have 
understood it worksforme or else if someone can help me reproduce the 
problem/error if I am wrong, then it would be very helpful.

Regards,
Anubhav Joshi
IIT Patna


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/588db101-7dd8-49dd-9f55-8dfdd0e98873%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-27 Thread anubhav joshi


On Wednesday, February 26, 2014 7:43:49 PM UTC-8, Russell Keith-Magee wrote:
>
> Hi Anubhav,
>
> Please keep in mind that this is a global mailing list, and if you want 
> considered feedback, it's going to take time. Posting two "Please give me 
> feedback" pings in 6 hours isn't especially helpful. There will be people 
> who have been asleep for that entire period.
>
> Yours,
> Russ Magee %-)
>
>
Apologies for being over eager.

Regards,
Anubhav Joshi
IIT Patna 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5918083d-b428-4f4b-babc-afd0e831549c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-26 Thread anubhav joshi
Please give me any reviews and suggestions regarding the issues, as and 
when I am posting about them.
So that when I my studying and analysis of the issues is done, then I can 
chalk out a proper timeline for the required work as well.

Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/1ca9ce43-5b59-4601-b6d2-5be43b28d740%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-26 Thread anubhav joshi
Please have a look at all the issues mentioned, correct me where I am wrong 
and there are places where I need help(I have mentioned in those places.)
I need feedback and reviews.
Will be posting back again very soon with further analysis of other issues.

Regards,
Anubhav Joshi
IIT Patna



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0f809b68-90d5-43d0-a792-ace05f97ffb0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-26 Thread anubhav joshi
Here is some more analysis:

django.db


1.)
There is a problem with ForeignKey, which when given only blank=True causes 
ValidationError as they do not allow null values. If blank=True, null=True 
is specified then, there is no problem.

The operation of ModelForms is such so as to construct instances at 
validation time, not at save-time, Null and wrong-model assignments to 
ForeignKey fields are disallowed prior to save-time. Therefore, there is 
problem when we try to call is_valid() or save().
Currently if blank=True and null is not True, ValueError is raised. The 
check being in related.py #399 for ForeignKey.
a.) I think we can display a correct message depicting the problem that in 
ForeignKey with null=True can only be left blank.
b.) We can stop the usage of blank=True with ForeignKey, because alone 
without null=True defined it has no significance and give suitable error 
message instead of raising an error. null=True alone works perfectly
Related: #13776


2.)
Unpickling Models and QuerySet from incompatible version.

A patch was submitted in regard for this, but it breaks the tests. So, some 
work needs to be done to fix that.Probably it s because of some fault in 
django/utils/version.py as far as I have apprehended.
Also 'akaariai on github' suggested that we can think of extending this 
behaviour to do cross-version conversions in case of model unpickling. Upon 
doing some study and having a discussion on irc with 'apollo13', I have 
understood how the pickling works and what protocol does django uses. 
Further I have understood that to do the required, we would need to convert 
internal data-structures between versions. This could be achived by first 
finding out the version of the current installation and pickled data. We 
can store the differences in _meta for models for different versions in a 
separate file e.g pickle_ver.py. Then accordingly we can define 
__setstate__() on its basis. We can create a new model instance from the 
unpickled data, using pickle_ver.py,  and then use its state for __dict__.
Related: #21430


3.)
In certain situations with PostgreSQL, a bogus error message about SET TIME 
ZONE may be returned. See #3179 (which is closed, but has a description of 
the problem). The real error message can probably be found in the postgres 
log file.
Till now I have only understood what the problem is. I would need some 
guidance here, coz I have no knowledge of PostgreSQL as of now. I myself am 
also trying to consult someone whom I know for this.
Although as mentioned for the shell part, we can do the same for views 
also, we need to figure out how to catch that previous error(due to which 
we get this behaviour) and then perform cursor rollback with appropriate 
warning.


4.)
#10811

I had written a patch for this but it got stuck at a place leading to 
failure of two tests. I didn't got the time to look into it much then,
I will do that and sort this out. 
https://github.com/django/django/pull/2162

5.)
There has been strange errors being reported because of lack of date[time] 
CAST conversions in backends.
This has been extensively discussed in #7074.
Only Oracle implements this correctly. A sample workaround as suggested in 
the ticket:

django/db/models/sql/where.py in make_atom

def datetime_cast_sql(self):
return 'CAST(%s AS DATETIME)'

def rhs_cast_sql(self, db_type):
if db_type in ['date', 'datetime']:
return 'CAST(%%s AS %s)' % db_type
return '%s'

In where.py make_atom

if value_annot is datetime.datetime:
cast_sql = connection.ops.datetime_cast_sql()
else
cast_sql = connection.ops.rhs_cast_sql(db_type)

But the thing is that, we are putting the fix in two different places.
What is required here is a single general right hand casting hook so that 
when values when are
passed as strings instead of datetime.datetime objects then we can CAST 
them appropriately for different backends.

For this I am not sure whether this CASTING should be done only for 
date[time] objects or it might be required in some other cases as well.
I need some review here. Only then can I proceed towards writing that 
single casting function.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/deee2141-9db2-468b-9567-1dc9ca34d963%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-25 Thread anubhav joshi
Regarding the 'improving error reporting' part, I have started with some 
issues which may be comparatively easier:

Improving error reporting

django.forms

#15069

In forms.py:
self._errors[name] = self.error_class(e.messages)

When the list of errors is created, the value of the wrong/invalid field 
can be shown.

Some extra information could be shown, based upon the type of error.
eg. In FileField : In case of invalid, the encoding-type problem could be 
explained with better message/suggestion
In DateTimeField : Format/Example of correct datetime object or errors 
could be pointed out more explicitly.
Also such cases in other Field subclasses

Also some more type of errors could be added.

#13091

A patch was written for a part of this(which was decided to be dealt in 
another ticket) which was merged. But the major problem remained unsolved. 
Later a patch was written for this too, but as summarized by a core-dev, 
that will lead to another set of bugs.
I did go through the patch and realized the situation, there were some 
suggesstions that I too believe will work well:

Just fix this in the particular case of the admin. This could possibly be 
done by adding a manual call to full_clean once the instance is fully 
populated (might be a bit ugly getting any ValidationErrors back into the 
not-valid code path).
Add a warning to the above section of the docs (on partial ModelForms) 
about this issue and how to work around it in your own forms.


django.http

If Http404 is returned instead of raised(because it is in the same file 
where other response classes have been defined i.e. 
django/http/response.py), then there is a problem of AttributeError.
One solution is renaming it to more clear name like Http404Exception, but 
we would have to replace it at several places.
Ithink a better solution could be to check this error in 
django/core/handlers/base.py .We can check the called response object for 
this, and then do something which is appropriate. I think we can check for 
Http404, if it is returned and convert the response to HttpResponseNotFound.


Feedback Needed.
Working on other issues, will be posting soon.


Regards,
Anubhav Joshi
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8526ac55-76cb-426f-ba70-b7d918f70a07%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-25 Thread anubhav joshi


On Tuesday, February 25, 2014 5:02:26 AM UTC+5:30, Tim Graham wrote:
>
> "Now I would like to know whether it would be suitable for GSoC?"
>
> Maybe! As these tickets touch many different aspects of Django, I'm 
> guessing you'll need to do quite a bit of research in order to convince us 
> you have the breadth of experience to tackle them all. Some of those 
> tickets also have existing patches -- you'll need to review them to see if 
> additional work needs to be done (or if not, please bump the ticket to 
> ready for checkin). If I were you, I'd map out more than 12 weeks worth of 
> tickets in case some of the ones you choose initially are completed by 
> community members in the meantime. Presumably if your proposal were 
> accepted, you could assign them to yourself at that time.
>

In order to chalk out work enough for 12 weeks, I think I will extend my 
proposal to 'improving error reporting and fixing related bugs/issues.' 
because while I am going through the issues, I have found many tickets 
which need work to be done regarding some strange thing happening, but they 
are not related to 'improving error reporting' but are worth fixing and 
AAMOF they interest me as well.


Regards,
Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b54ce376-7c6c-4cfc-845a-a7edad5a211b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-25 Thread anubhav joshi


On Tuesday, February 25, 2014 5:02:26 AM UTC+5:30, Tim Graham wrote:
>
> "Now I would like to know whether it would be suitable for GSoC?"
>
> Maybe! As these tickets touch many different aspects of Django, I'm 
> guessing you'll need to do quite a bit of research in order to convince us 
> you have the breadth of experience to tackle them all.
>

Yes I have already started looking into those issues and will be posting 
soon as and when I reach somewhere.
 

> Some of those tickets also have existing patches -- you'll need to review 
> them to see if additional work needs to be done (or if not, please bump the 
> ticket to ready for checkin). If I were you, I'd map out more than 12 weeks 
> worth of tickets in case some of the ones you choose initially are 
> completed by community members in the meantime. Presumably if your proposal 
> were accepted, you could assign them to yourself at that time.
>

Ok will keep that in mind


Regards,
Anubhav Joshi
IIT Patna 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8b073b7b-a8ce-41c2-94f3-91e290abe6ce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-24 Thread anubhav joshi
Also there were many links to those tickets which were closed because 
either they were "fixed" or they "wontfix". So I have removed those as they 
were unnecessary on that wiki.

2.) There it says: "Import errors discovered during application loading 
> during can be masked under certain circumstances."
> If I could get a better explanation of this, it would be very helpful.
>

Also If I could get an answer to the above.

Regards,
Anubhav Joshi
IIT Patna 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/46b57784-8b50-483f-a438-419b91a671c8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC 2014 proposal [Improving error reporting]

2014-02-24 Thread anubhav joshi


On Monday, February 24, 2014 9:45:30 PM UTC+5:30, Tim Graham wrote:
>
> A starting place for this would be to bring the BetterErrorMessages wiki 
> page up-to-date by removing items that have been fixed or "won't fixed". 
> Then it'll be easier to see what's left and whether or not there is enough 
> to fill 12 weeks.
>
> I have done some work and have updated the wiki: 
https://code.djangoproject.com/wiki/BetterErrorMessages

The following have been added:

django.contrib.auth
https://code.djangoproject.com/ticket/18959

django.core
https://code.djangoproject.com/ticket/22055
https://code.djangoproject.com/ticket/22058
https://code.djangoproject.com/ticket/21668

django.core.urlresolvers
https://code.djangoproject.com/ticket/8809

django.db
https://code.djangoproject.com/ticket/20752
https://code.djangoproject.com/ticket/21430
https://code.djangoproject.com/ticket/10811
https://code.djangoproject.com/ticket/7074

django.forms
https://code.djangoproject.com/ticket/15069
https://code.djangoproject.com/ticket/13091

django.template
https://code.djangoproject.com/ticket/16383

Now I would like to know whether it would be suitable for GSoC?

Regards,
Anubhav Joshi 
IIT Patna

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5b20a583-2c16-4f56-8565-21b8dca36ac3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


GSoC 2014 proposal [Improving error reporting]

2014-02-24 Thread anubhav joshi
Hi all,
I had submitted a proposal earlier also related to 
aggregation/annotation but since almost major things had been implemented 
by him, I am thinking to switch to 'improving error reporting'.

I am going through the errors mentioned. I have some questions for now.

1.) The two problematic errors related to forms have been fixed by small 
patches, so I would like to know if there are any other similar cases.

2.) There it says: "Import errors discovered during application loading 
during can be masked under certain circumstances."
If I could get a better explanation of this, it would be very helpful.

3.) There are some tickets marked as 'wontfix' so I want to know whether I 
am being expected to somehow fix those if possible.

Thanks,

Anubhav Joshi
IIT Patna

Github: https://github.com/coder9042

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9c6db10e-65d8-494f-9681-48f42292bad8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC Project Idea

2014-02-24 Thread anubhav joshi


On Monday, February 24, 2014 4:21:15 PM UTC+5:30, Josh Smeaton wrote:
>
> As I mentioned in the last thread, I've already made some progress on 
> improving aggregates and annotations. I've submitted this PR for review 
> https://github.com/django/django/pull/2184 and discussion here: 
> https://groups.google.com/forum/#!topic/django-developers/8vEAwSwJGMc
>
> Again, I'm unsure if the work I've done will eventually be committed 
> because everyone is quite busy at the moment, though I'm hopeful. I've 
> already completed arithmetic/F() expressions, and integration with 
> .filter() etc. I've also done a Proof of Concept branch on Conditional 
> Aggregates that is linked to the pull request above. I'm unsure what you 
> mean when you say adding datetime grouping to aggregation though, would you 
> mind expanding on that?
>
> From my point of view, it'd be a waste to spend a full GSoC project on 
> aggregates unless you came up with a significantly different implementation 
> and could explain the relative benefits. That said, my PR hasn't been 
> reviewed yet, so there may be an opportunity there.
>
> Regards,
>
> Josh
>
> That is the very thing I want to ask whether is there a opportunity for me 
there or I should consider 'improving error reporting' for GSoC. I want to 
make that choice and knowing well about the work done by you, I want an 
opinion of the core-dev as soon as possible. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e808ebd5-a43b-4a44-a7c6-357671b07f44%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC Project Idea

2014-02-24 Thread anubhav joshi
I want to know whether this will make up a good GSoC project as I am also 
interested in 'improving the error messages part', therefore I want to make 
a final choice between the two topics.
Awaiting replies and suggestions.

Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c781698b-724d-494f-bfab-c1bd64b6f0c6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


GSoC Project Idea

2014-02-24 Thread anubhav joshi
Earlier I posted this on as a reply on the query conversation that I had 
started earlier but then I didn't get any response there so I am reposting 
this here.
I originally wanted to work on aggregates/annotation improvement in GSoC 
and still wish the same. The issues that I want to consider are:

Implementing arithmetic operations on aggregation/annotation.
Implementing conditional aggregates.
Fixing the errors related to the working eg. default values for 
aggregations/annotations, problem in using nested statements like filter() 
with them, etc
Adding datetime grouping to aggregation.

I have started working on the above issues. Regarding the errors part I 
have been able to figure out the problems.

Also I did some surfing the net regarding implementing arithmetic 
operations on aggregation.. I have found few ways:
1.)Adding it directly.
2.)Changing the complete implementation to f() or q() objects.

I have yet to work on the remaining issues which I surely will.

I want to know whether this will make up a good GSoC project.


Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ff0a38c7-75f1-4a7f-bea9-5513d7dc7299%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-23 Thread anubhav joshi
I originally wanted to work on aggregates/annotation improvement in GSoC 
and still wish the same. The issues that I want to consider are:

Implementing arithmetic operations on aggregation/annotation.
Implementing conditional aggregates.
Fixing the errors related to the working eg. default values for 
aggregations/annotations, problem in using nested statements like filter() 
with them, etc
Adding datetime grouping to aggregation.

I have started working on the above issues. Regarding the errors part I 
have been able to figure out the problems.

Also I did some surfing the net regarding implementing arithmetic 
operations on aggregation.. I have found few ways:
1.)Adding it directly.
2.)Changing the complete implementation to f() or q() objects.

I have yet to work on the remaining issues which I surely will.

I want to know whether this will make up a good GSoC project.


Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2306717d-fbe8-4b4a-88e0-ba8fba7d5c17%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-17 Thread anubhav joshi
Ok, actually my college exams are going on, as soon as they get over I will 
definitely take some action towards drafting the proposal and posting it 
here for review.

Thanks
Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/bf0fb93d-4332-463c-bfe9-7509adcebbc2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-17 Thread anubhav joshi
I need some suggestions related to improving the error message. I have gone 
through some tickets but I would like to know the existing issues that need 
to be resolved first than others, I mean those issues which need more 
attention.

Thanking You
Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/dedfe427-76e1-42dd-a816-4c2beb2c6926%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-15 Thread anubhav joshi


On Sunday, February 16, 2014 4:35:05 AM UTC+5:30, Florian Apolloner wrote:
>
> On Saturday, February 15, 2014 5:01:09 PM UTC+1, anubhav joshi wrote:
>>
>> Well I will see what I put in my proposal..it will be based on 
>> aggregation/annotation as well as improving the error message part as 
>> before...I might now look to other things as well like improving tests as 
>> well.
>>
>
> That sounds a little bit to much, the topics themselves are all in all 
> probably three GSoC projects, covering two or more in one will most likely 
> not lead to any success. If I were you (speaking as student), I'd hash out 
> one in all the details and show us that you are actually up to solve one. 
> Trying to tell us that you can solve more than one will most likely meet a 
> bit of scepticism,  especially since noone knows you personally.
>
> Regards,
> Florian
>


I am not trying to say that I can solve all the issues myself, that is no 
way possible. But I had wanted to base my work on aggregation part but I 
think quite has been done so I just said that I would now explore other 
areas as well. I have no intention of telling that I could do all, I merely 
posted the reply to get suggesstions for those topics.

Apologies if what I wrote made you think that way.

Anubhav 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/07bd60a1-bc4e-41aa-b99b-fdb071983902%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-15 Thread anubhav joshi
I am not trying to say that I can solve all the issues myself, that is no 
way possible. But I had wanted to base my work on aggregation part but I 
think quite has been done so I just said that I would now explore other 
areas as well. I have no intention of telling that I could do all, I merely 
posted the reply to get suggesstions for those topics.

Apologies if what I wrote made you think that way.

Anubhav

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/402b20bd-9d29-4c47-9978-604f1a7161b7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-15 Thread anubhav joshi
Well I will see what I put in my proposal..it will be based on 
aggregation/annotation as well as improving the error message part as 
before...I might now look to other things as well like improving tests as 
well.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8be2174c-99f0-4ce7-ad26-691ac17fb319%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GSoC query

2014-02-14 Thread anubhav joshi
Apart from the issues and tickets mentioned in the idea pages and some 
other tickets/issues which I have found is there anything that anyone would 
suggest for working on the aggregation/annotation part, like if there  is 
any issue which hasn't been picked up in tickets or anything else,if 
something new has occurred to anyone.

Anubhav Joshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fe90893c-b6c6-4cea-944c-74f64e1afbd1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


GSoC query

2014-02-08 Thread anubhav joshi
Well I am thinking to work on aggregates and annotation, and improving the 
error messages part.
I just want to know if these are still open.
And what is the procedure if more than one student submit similar proposals 
or what if one submits it before then whether it remains open for another?
Can we start submitting proposals before March 10 or do we have to wait 
till then?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/896f1206-dc91-49f7-b2a5-c5601f40dc5a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


GSoC Project Ideas

2014-02-08 Thread anubhav joshi
Well I am thinking to work on aggregates and annotation, and improving the 
error messages part.
I just want to know if these are still open.
And what is the procedure if more than one student submit similar proposals 
or what if one submits it before then whether it remains open for another?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a6367a46-8a8b-4cba-81a1-013d9e714c73%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Fixing #10811 Prevet assigning of unsaved model to Foreign Key

2014-01-24 Thread anubhav joshi
I have tried fixiing #10811 https://code.djangoproject.com/ticket/10811

Earlier there were several errors popping up while running the test suite, 
but now I have fixed most of them.
Although there are 2 errors which  I am unable to fix some of them as I am 
unable to understand what the code is doing there.
Need help here..

https://github.com/django/django/pull/2162

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ad8f57f5-4365-417d-b783-66c6392df4d4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.