Re: new to open source contribution

2019-11-29 Thread Abhijeet Viswa
Hey,

Checkout Django's "Contributing to Django" documentation here:
https://docs.djangoproject.com/en/2.2/internals/contributing/
You can find a list of reported bugs and request feature updates on
Django Trac here: https://code.djangoproject.com/

Django uses Git as a VCS. If you haven't used Django (and aren't
familiar with), I'd personally recommend you go through Django's
tutorials. This will make it more easier to understand how Django's
MVC works and will help you get started with contribution.

On Fri, 29 Nov 2019 at 18:11, Shruti Satish  wrote:
>
> i am new to open source and would like to contribute.
>
> how do i setup for Django development?
>
> also can i be pointed towards easy and relativey easy bug fixes/issues and 
> the corresponding repos?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/6589b6f8-83ce-46f3-a498-892980f1b12a%40googlegroups.com.



-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrpCD2i4K3v1uANUv_5kHeHh8o2uwBGV7LjCEvCX8LBWyA%40mail.gmail.com.


Re: [new contributor] Where to find resources to make changes to djangoproject.com ?

2019-12-20 Thread Abhijeet Viswa
Hey,

You can find the tutorial for Writing documentation here:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-documentation/

The raw document files are basically text files written using
reStructuredText syntax. You can find the inside the docs folder. Just
edit the text files and then build the docs and see preview your
changes. Commit the changes to the text files and make a PR.

Cheers.

On Fri, 20 Dec 2019 at 18:03, Gabriel Augendre  wrote:
>
> Hello there !
>
> I'm not a beginner in software development but I'm a new contributor to 
> Django and I took this ticket from Trac : 
> https://code.djangoproject.com/ticket/30780
>
> I made some progress creating a floating button to link to the FAQ but I'm 
> having trouble finding where to edit the documentation pages themselves.
> After running ./manage.py update_docs, I had some content that looked like 
> documentation pages.
> In data/djangodocs/sources/dev/docs/index.txt, I found some text that looked 
> nearly exactly like the index page of the documentation, with the exception 
> that in this file there is already a section about where to get help and it 
> doesn't appear on the website served by ./manage.py runserver.
>
> Could someone show me around, explaining the build process, where to edit the 
> pages and what to do in order to see the results ?
>
> Thanks in advance for any help :)
>
> Cheers,
> Gabriel
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/60bf0ace-48aa-42aa-be31-208b200d7d4e%40googlegroups.com.



-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrp%2BW-HZZKLhCYGJvXBR_zX%3DnNWsAAXM%3DBNmVVn_R7hm2w%40mail.gmail.com.


Re: GSoC 2020

2019-12-23 Thread Abhijeet Viswa
Hey,

Checkout Django's contribution guidelines here:
https://docs.djangoproject.com/en/dev/internals/contributing/
It details everything you need to know, from triaging of tickets to
unit testing.

On Mon, 23 Dec 2019 at 20:28, Nishchal Gupta  wrote:
>
> Hello everyone,
>
> This is Nishchal Gupta and I am current studying in KCNIT under (AKTU). I 
> have just completed my third semester.
>
> I want to participate in Google Summer of Code 2020. I am familiar with 
> Django framework and don't know the steps to be taken.
>
> Also I don't have any idea whether the Organisation Django will participate 
> in 2020 or not.  Also I am not familiar with ticketing and unit testing.
>
> Can anybody guide me the step by step process in order to get selected in for 
> GSoC 2020?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/d61bcd25-daa5-4116-96e8-82c0a9ef8849%40googlegroups.com.



-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrodAGjU1ViB4Xacn%3DPiCwRRx_7sN4YdQRzVxr0i_WaC%2BQ%40mail.gmail.com.


Sphinx AutoSectionLabel Extension Setting

2019-12-26 Thread Abhijeet Viswa
Hey,


Ticket #28290  has been lying
in the easy pickings for too long now. I don't believe a patch has been
submitted.

It was suggested in n the issue
 raised by the reporter,
Tony Narlock, on the Sphinx project, to use the AutoSectionLabel extension
to automatically label sections, and hence solve the issue.

A label with the same name as the section is generated automatically. If
the section name is repeated anywhere else in the whole document, one of
the possiblities is chosen as the default. (Ref:
https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html)
There exists an setting autosectionlabel_prefix_document that appends the
name of the document the section is in.

I'm personally more inclined to appending the document name. However, I'd
like to get the opinion of the community before proceeding. Whatever option
be chosen, it would have to be documented in the documentation itself.

Thanks,
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrrKBWZzMPs8Snek_rBN%2B1N0o5gFy2%2BKhQ_H%2BV6Qk24X%3DQ%40mail.gmail.com.


Re: Sphinx AutoSectionLabel Extension Setting

2019-12-26 Thread Abhijeet Viswa
Here is my patch with the aforementioned setting set to true:
https://github.com/django/django/pull/12251

On Thu, 26 Dec 2019 at 15:36, Abhijeet Viswa 
wrote:

> Hey,
>
> <https://code.djangoproject.com/ticket/28290>
> Ticket #28290 <https://code.djangoproject.com/ticket/28290> has been
> lying in the easy pickings for too long now. I don't believe a patch has
> been submitted.
>
> It was suggested in n the issue
> <https://github.com/sphinx-doc/sphinx/issues/3856> raised by the
> reporter, Tony Narlock, on the Sphinx project, to use the AutoSectionLabel
> extension to automatically label sections, and hence solve the issue.
>
> A label with the same name as the section is generated automatically. If
> the section name is repeated anywhere else in the whole document, one of
> the possiblities is chosen as the default. (Ref:
> https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html)
> There exists an setting autosectionlabel_prefix_document that appends the
> name of the document the section is in.
>
> I'm personally more inclined to appending the document name. However, I'd
> like to get the opinion of the community before proceeding. Whatever option
> be chosen, it would have to be documented in the documentation itself.
>
> Thanks,
> Abhijeet
>


-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrrrQ09BpooZOQyfDT%2B0pWY6bhAjxfT3Y2v2EwzsgfhkMA%40mail.gmail.com.


Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
How would the fields in HRFleetEmployee be persistent and linked to a
particular Employee or Vehicle without being saved in the database? Or did
I understand your code and request wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrrSo06-gxD1ZdzN0CCPQCm-shdah24H_ZVyLh_rGkU4%3DA%40mail.gmail.com.


Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
I think this would needlessly complicate the entire migration process. Two
different app migrations (and possibly even more) would have be considered
and executed in sequence to prevent anything breaking on the database.

On Thu, 30 Jan 2020 at 22:00, LBris  wrote:

> I've never said it isn't saved in database. It is saved but in the table
> of the employee since hrfleetemployee inherits from employee. It simply
> adds this field to the table of Employee
>
> Le jeu. 30 janv. 2020 à 5:24 PM, Abhijeet Viswa 
> a écrit :
>
>> How would the fields in HRFleetEmployee be persistent and linked to a
>> particular Employee or Vehicle without being saved in the database? Or did
>> I understand your code and request wrong?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CAP1-YrrSo06-gxD1ZdzN0CCPQCm-shdah24H_ZVyLh_rGkU4%3DA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-developers/CAP1-YrrSo06-gxD1ZdzN0CCPQCm-shdah24H_ZVyLh_rGkU4%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAJi3W9g2qa%2Bd1cXJNO2NJWfDpFTUHrqX2e%2B%2BS71KH2Wv9BeUuw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAJi3W9g2qa%2Bd1cXJNO2NJWfDpFTUHrqX2e%2B%2BS71KH2Wv9BeUuw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrpr7%2B_6j5i7MYZa8CykzUjBP%2BDMtwr%2B_Jfa0E6txUErhw%40mail.gmail.com.


Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
Each model represents one table on the DB. Modifying it in two different
apps (hence creating two different sets of migrations) might result in
breaking changes. What if one migration affects something that is directly
referenced by the other app, but wasn't updated?

Also, what would the potential benefits be (other than reduction of number
of tables) to such a type of inheritance? Couldn't the same be done with
another table and a select related? The only difference would be a in
prefetch_related call (your inheritance wouldn't require one). However,
doing something that like that means the Employee app knows about (and
relies upon) this backward relation to the Vehicle model (and hence the 2nd
app itself).

On Thu, 30 Jan 2020 at 23:07, LBris  wrote:

> I do not understand. Could you explain to me what it would break the
> database and how ?
>
> Le jeudi 30 janvier 2020 17:37:22 UTC+1, Abhijeet Viswa a écrit :
>>
>> I think this would needlessly complicate the entire migration process.
>> Two different app migrations (and possibly even more) would have be
>> considered and executed in sequence to prevent anything breaking on the
>> database.
>>
>> On Thu, 30 Jan 2020 at 22:00, LBris  wrote:
>>
>>> I've never said it isn't saved in database. It is saved but in the table
>>> of the employee since hrfleetemployee inherits from employee. It simply
>>> adds this field to the table of Employee
>>>
>>> Le jeu. 30 janv. 2020 à 5:24 PM, Abhijeet Viswa  a
>>> écrit :
>>>
>>>> How would the fields in HRFleetEmployee be persistent and linked to a
>>>> particular Employee or Vehicle without being saved in the database? Or did
>>>> I understand your code and request wrong?
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django developers (Contributions to Django itself)" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-d...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-developers/CAP1-YrrSo06-gxD1ZdzN0CCPQCm-shdah24H_ZVyLh_rGkU4%3DA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-developers/CAP1-YrrSo06-gxD1ZdzN0CCPQCm-shdah24H_ZVyLh_rGkU4%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-d...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/CAJi3W9g2qa%2Bd1cXJNO2NJWfDpFTUHrqX2e%2B%2BS71KH2Wv9BeUuw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-developers/CAJi3W9g2qa%2Bd1cXJNO2NJWfDpFTUHrqX2e%2B%2BS71KH2Wv9BeUuw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Abhijeet
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/f58e79a0-6494-4a0a-ace8-e2cc31c799da%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/f58e79a0-6494-4a0a-ace8-e2cc31c799da%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrq7%3DVjqxh644-eJB%2BbPAonZyUv%2BSeGz79fEm51tAafm%3DQ%40mail.gmail.com.


Re: IRC Chat

2020-03-10 Thread Abhijeet Viswa
Hello,

The IRC channel is still there. You can try using Riot.im with Matrix to
bridge free node.

On Tue, 10 Mar, 2020, 20:18 José Manuel Valdivia Romero, <
josevaldiviarom...@gmail.com> wrote:

> Hi Guys,
>
> I'm completely new trying to contribute to the Django project (But was
> working on applications with Django for many years).
>
> I was checking the README.rst and saw that there is the Django IRC
> channel... is this used? because accessing to irc.freenode.net is not
> available anymore, should this be changed to https://webchat.freenode.net/?
> or there is no more support of Django in an IRC channel?
>
> Best regards,
>
> José Manuel Valdivia
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CABSqBgHDzXnnzAYzGThnE3WaANTZega%2B_ahZZeQzX6p%2BMGTCFg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrr0QKO3rVj%2B5dN9PTSRAoDzdvu%2BYTmnZv7T8onci-9KSQ%40mail.gmail.com.


Re: [Feature Request] Having an middleware to be able to force authentication on views by default

2020-03-13 Thread Abhijeet Viswa
Hello,

If I'm not mistaken, middlewares are not aware of decorators, mixins
applied on the request handlers. Therefore, if the middleware is turned on,
there wouldn't be a way to selectively not enforce it. At least not with
decorators/mixins.

The rest framework uses a global setting that applies default
Authentication and Permissions classes on all views. something like that
could be possible in core Django.

On Sat, 14 Mar, 2020, 02:18 Mehmet Ince,  wrote:

> Hi everyone,
>
> I've been working as a security researcher for a long time. Common mistake
> that I've seen is forgotten decorator and/or Mixin usage on controllers,
> which leads to OWASP A5 Broken_Access_Control[1]. I believe one of the most
> important, as well as most used, decorator and/or Mixing in Django world is
> @login_required.
>
> Instead of calling that decorator on every single function-based-view is
> kind a against the DRY. Also even sometimes it's possible to forgot to call
> decorator, which is scary. For class-based-view it's usually requires to
> define an abstract controller class, where you call login_required
> decorator with method_decorator on dispatch method[2]. Of course that
> approach makes sense and looks like a proper design decision but it still
> leaves some open doors. For instance, what would happen if new
> contributor/developer in the team inherits TemplateView directly instead of
> ProtectedView class ? etc etc etc.
>
> Since almost %90 of the endpoint of todays web application requires an
> authentication -I'm not talking about authorization-, I believe we should
> be writing code in order to make endpoint accessible by unauthenticated
> request.
>
> So my proposal is very simple:
>
> - We must forcefully enable session validation for every endpoint.
> - Developers must do something to make the unauthenticated endpoint
> instead of making it authentication protected !
> - We should do this in middlewares. Because for my opinion, such as
> validation and check should be done way before execution reaches to the
> views.
>
> Technical implementation can be as follow:
>
> - You can enable it by adding 'forceauth.ForceAuthenticationMiddleware'
> middleware. Otherwise Django can work as it.
> - If you have a FBV, and it requires to be accessible for unauthenticated
> users, call *@publicly_accessible_endpoint* decorator.
> - If you have CBV,  and it requires to be accessible for unauthenticated
> users, inherit *PubliclyAccessibleEndpointMixin* along side other classes
> that you need like TemplateView,ListView etc.
> - All the other endpoints will be protected by authentication validation
> on middleware.
>
> You can see my initial implementation at
> https://github.com/mmetince/django-forceauth and read my all thoughts
> regarding to the approach to the session validation at blog post [3].
>
> [1]
> https://owasp.org/www-project-top-ten/OWASP_Top_Ten_2017/Top_10-2017_A5-Broken_Access_Control
> [2]
> https://docs.djangoproject.com/en/3.0/topics/class-based-views/intro/#decorating-the-class
> [3]
> https://pentest.blog/why-secure-design-matters-secure-approach-to-session-validation-on-modern-frameworks-django-solution/
>
> PS: This is my first mail to Django mailing list, if it’s wrong place to
> discuss such a ideas please let know where to do it properly :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/F6FB68F9-9287-45BD-B3AD-F59C2B4E23F0%40mehmetince.net
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrprcKUmLYd3CJUVWJD22jOLHWR1rO3pVZGe601Bg9%2Bd8g%40mail.gmail.com.


Re: GSoC Proposal to extend the parallel test runner to Windows and macOS and to support Oracle parallel test running

2020-03-26 Thread Abhijeet Viswa
Hey,

Since Python 3.8, the default method for the multiprocessing module is
spawn for Mac OS.

On Thu, 26 Mar 2020 at 17:05, Tom Forbes  wrote:

> > incompatible in macOS due to a recent update
>
> Can you elaborate on this a bit? How has a recent update made forking
> incompatible on MacOS?
>
> Tom
>
> On 23 Mar 2020, at 19:22, Ahmad A. Hussein 
> wrote:
>
> Django's parallel test runner works through forking processes, making it
> incompatible on Windows by default and incompatible in macOS due to a
> recent update. Windows and macOS both support spawn and have it enabled by
> default. Databases are cloned for each worker.
>
> To switch from fork to spawn, state setup will be handled by spawned
> processes instead of through inheritance via fork. Worker’s connections to
> databases can still be done through get_test_db_clone_settings which
> changes the names of databases assigned to a specific worker_id; however,
> SQLite's cloning method is incompatible with spawn.
>
>
> SQLite’s cloning method relies on it both being in-memory and fork as when
> we fork the main process, we retain SQLite's in-memory database in the
> child process. The solution is to get a SQL dump of the database and throw
> it into the target cloned databases. This is also the established standard
> in handling MySQL’s cloning process. Both Postgresql's and MySQL's cloning
> methods are independent of fork or spawn and won't require any modification.
>
> Oracle has not been implemented in the parallel test runner originally
> even on Linux and I propose to extend support to Oracle as well in my
> proposal. I want to confirm if there is significant support behind this as
> a feature or not before I commit to writing a specification, but as a
> summary it is definitely possible as the work collaborated on by Aymeric
> Augustin and Shai Berger show that cloning CAN be done through multiple
> ideas. The reason why it's a headache is that Oracle does not support
> separate databases under a single user- unlike our other supported
> databases, so we can't clone databases without introducing another user.
> Some methods may also need to be rewritten to accommodate for the Oracle
> backend, but that isn't an issue. I've glossed over writing out a schedule
> or a more detailed abstract as I I'm mainly posting here to see if there is
> indeed support for the Oracle proposal and to make sure I am not missing
> any details in regards to adapting the current parallel test runner to work
> through spawn. Let me know what you think.
>
> Regards,
> Ahmad
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/317f67c6-4b23-483f-ada5-9bdbb45d0997%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/322804F5-F44F-4EF8-AF33-C460EC509915%40tomforb.es
> 
> .
>


-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrp47LJrFxcfp_-ZDQAJiAmvR8SecjTPN-Vc%2B4vwhz%3DkeA%40mail.gmail.com.


[GSOC 2020] Proposal for supporting the parallel test runner on Windows, and Oracle

2020-03-26 Thread Abhijeet Viswa
Hey folks,

I'd highly appreciate it if you guys could go through my GSoC prposal for 
adding supporting the parallel test runner on Windows, and Oracle.
Django Forum Post: 
https://forum.djangoproject.com/t/gsoc-2020-my-proposal-for-a-parallel-test-runner/1518/3
GitHub Gist:  
https://gist.github.com/abhijeetviswa/08c23388ae3d317621e23b947594b9f3

Thanks. :) 


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4da18b6d-4e9c-4035-a0f6-33e68c69aa12%40googlegroups.com.


Re: GSoC Proposal to extend the parallel test runner to Windows and macOS and to support Oracle parallel test running

2020-03-30 Thread Abhijeet Viswa
Hi,

I'd like to point out that the MySQL backend uses the mysqld utility to
create a database dump which is then imported. So, as far as implementation
complexity goes, I believe migration once again during setup of the child
process might complicate it further. It might just be easier to use on-disk
database for the child processes. That being said, benchmarking is never a
bad thing.

Also, I would highly appreciate it if y'all could check out my proposal on
the same topic. I had put it up on the Django Forums last week and on the
mailing list a couple of days ago. Only Carlton had replied. I know there's
less than 24 hours left to submit the proposal, but any feedback will help.

Link to the proposal:
https://gist.github.com/abhijeetviswa/08c23388ae3d317621e23b947594b9f3
Link to the forum post:
https://forum.djangoproject.com/t/gsoc-2020-my-proposal-for-a-parallel-test-runner/1518

Thanks.

On Tue, 31 Mar 2020 at 01:31, Tom Forbes  wrote:

> You’re both most likely correct, but I think it’s good to get some numbers
> and compare implementation complexity.
>
> It’s also worth considering that often as a project grows in complexity
> the time it takes to do a full test run grows with it, so perhaps the
> overhead would be in a fairly constant (and reasonable) percentage of
> overall runtime.
>
> Or maybe not! I just think we should benchmark the naive implementation
> along with the others.
>
> Tom
>
> On 30 Mar 2020, at 19:41, charettes  wrote:
>
> 
> I agree with Adam here, it not just about running the SQL itself; the
> current migration framework require models to be (re-)rerendered before a
> lot of schema operations which slows down dramatically as project grows.
>
> The dump/restore approach will undeniably be faster than running
> migrations for each test process.
>
> Simon
>
> Le lundi 30 mars 2020 14:25:05 UTC-4, Adam Johnson a écrit :
>>
>> I just finished rewriting it to re-run migrations and setup in each
>>> worker. I didn't bench mark it so I'll do that again later, but as a gut
>>> reaction it isn't significantly slower; but of course the numbers will tell
>>> the real story.
>>
>>
>> I'm a little concerned about rerunning migrations in each worker in case
>> they are not deterministic (for some maybe slightly odd projects).
>>
>> Also I'd expect in many projects a dump and restore will be faster than
>> running migrations.
>>
>> On Mon, 30 Mar 2020 at 13:13, Ahmad A. Hussein 
>> wrote:
>>
>>> You're definitely right!
>>>
>>> I just finished rewriting it to re-run migrations and setup in each
>>> worker. I didn't bench mark it so I'll do that again later, but as a gut
>>> reaction it isn't significantly slower; but of course the numbers will tell
>>> the real story.
>>>
>>> Passing the dump string through shared memory or converting in-memory to
>>> on disk seems way too overkill now. The performance drop probably won't be
>>> significant especially since this is SQLite.
>>>
>>> I'll update you here with the exact benchmarks later. I'm busy now with
>>> school work, but I'll get back to it again later today.
>>>
>>> It is definitely exciting to find out!
>>>
>>> Regards,
>>> Ahmad
>>>
>>> On Mon, Mar 30, 2020 at 11:46 AM Tom Forbes  wrote:
>>>
 Awesome! However there is always a tradeoff between speed and code
 complexity - it might not be worth a more complex system involving shared
 memory or copying SQLite files in other ways if it only saves ~5 seconds at
 the start of a test run compared to re-running the migrations in each
 worker. I guess this might be unique to SQLite where things are generally
 faster.

 Just something to keep in mind, I’m excited to see the results though!

 Tom

 On 30 Mar 2020, at 10:34, Ahmad A. Hussein 
 wrote:

  I did stumble upon shared memory when I originally wanted to pass the
 database connection itself into shared memory. Your idea of passing the
 query string is MUCH more reasonable, can be done using shared memory, and
 will ultimately be much more cleanly written.

 i'll definitely test out if it has significant performance boost and
 see how it compares to other methods.

 I did consider copying the SQLite database file itself. That's
 essentially what's happening with VACUUM INTO. It's a SQLite command that
 lets you clone a source database whether in-memory or on disk into a
 database file. I got the parallel test runner to work with these database
 files, creating a database file for each worker. I think there's a
 performance boost to have if we make the databases for workers in-memory,
 especially if the test suite and tables grow in number; however, we also
 need to consider the time it takes to make the databases in-memory.

 Re-running migrations and recreating the SQLite database from scratch
 for every worker might be a time-sink, but it could actually prove quicker
 than other methods. I'll try it out 

Re: Error while creating an API

2020-04-09 Thread Abhijeet Viswa

Hey,

This mailing list is meant the development of Django itself and not for 
problems faced by users when developing a Django app. 
dja...@googlegroups.com is in fact related to that latter.


Also checkout the "Getting Help" page: 
https://docs.djangoproject.com/en/3.0/faq/help/ 



Regards and all the best,
Abhijeet

PS: All that being said, I think your problem is because the tableOrder 
module/app doesn't exist.



On 09/04/20 9:20 pm, Kushal Neupane wrote:

Dear all, i got error while making an API. Help me
C:\Users\Kushal Neupane\Desktop\1. Project Folder - [SMART RESTAURANT 
POINT OF SALE] - [KUSHAL NEUPANE]\1. Project Artefact\5. 
Development\restro_app>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python36-32\lib\threading.py", line 
916, in _bootstrap_inner

    self.run()
  File "C:\Program Files (x86)\Python36-32\lib\threading.py", line 
864, in run

    self._target(*self._args, **self._kwargs)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\utils\autoreload.py", line 
53, in wrapper

    fn(*args, **kwargs)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", 
line 117, in inner_run

    self.check(display_num_errors=True)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\management\base.py", 
line 395, in check

    include_deployment_checks=include_deployment_checks,
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\management\base.py", 
line 382, in _run_checks

    return checks.run_checks(**kwargs)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\checks\registry.py", 
line 72, in run_checks

    new_errors = check(app_configs=app_configs)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\checks\urls.py", line 
13, in check_url_config

    return check_resolver(resolver)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\checks\urls.py", line 
23, in check_resolver

    return check_method()
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\urls\resolvers.py", line 
406, in check

    for pattern in self.url_patterns:
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\utils\functional.py", line 
48, in __get__

    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\urls\resolvers.py", line 
587, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\utils\functional.py", line 
48, in __get__

    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\urls\resolvers.py", line 
580, in urlconf_module

    return import_module(self.urlconf_name)
  File "C:\Program Files (x86)\Python36-32\lib\importlib\__init__.py", 
line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in 
_find_and_load_unlocked

  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "C:\Users\Kushal Neupane\Desktop\1. Project Folder - [SMART 
RESTAURANT POINT OF SALE] - [KUSHAL NEUPANE]\1. Project Artefact\5. 
Development\restro_app\restro_app\urls.py", line 26, i

n 
    path('api/', include('tableOrder.urls')),
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\urls\conf.py", line 34, in 
include

    urlconf_module = import_module(urlconf_module)
  File "C:\Program Files (x86)\Python36-32\lib\importlib\__init__.py", 
line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 941, in 
_find_and_load_unlocked
  File "", line 219, in 
_call_with_frames_removed

  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 953, in 
_find_and_load_unlocked

ModuleNotFoundError: No module named 'tableOrder'

Traceback (most recent call last):
  File "manage.py", line 21, in 
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\management\__init__.py", 
line 401, in execute_from_command_line

    utility.execute()
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\django\core\management\__init__.py", 
line 395, in execute

    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Program Files 
(x86)\Python36-32\lib\site-packages\

Re: Generate JWTs with Django

2020-04-15 Thread Abhijeet Viswa
Hi,

You might want check out django-restframework-simplejwt. It requires the
Django Rest Framework. But, then again, if you are making an API, you'd
already be using it.

Regards,
Abhijeet

On Thu, 16 Apr, 2020, 00:39 Claude Paroz,  wrote:

> Hi all,
>
> With the recent addition of the algorithm parameter to the signing.Signer
> class, it's now rather straightforward for Django to generate HS256
> (non-encrypted) JSON Web Tokens.
> With a growing popularity of JS-client/Django server communications (DRF
> and al.), I think there might be some interest for Django to be able to
> generate and decode such tokens. For any other types of JWTs which
> generally require access to a cryptography module, we can point users to
> third-party libs like PyJWT (the docs should be clear about that).
>
> I made a proof-of-concept PR (docs missing) here:
>  - https://github.com/django/django/pull/12728
>
> What people here think about that proposal?
>
> Claude
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/5f67fefb-d158-4722-b704-6c34d72692a8%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrqiryo%2BuapQHkLjebwP7aaOQ8igSx3_cr6Q1Q16bKgaRw%40mail.gmail.com.


Re: Uwsgi not sending parallel all(except one) tasks to celery

2020-04-22 Thread Abhijeet Viswa
Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for discussing the development of Django itself, not for support
using Django. This means the discussions of bugs and features in Django
itself, rather than in your code using it. People on this list are unlikely
to answer your support query with their limited time and energy.

For support, please follow the "Getting Help" page:
https://docs.djangoproject.com/en/3.0/faq/help/. This will help you find
people who are willing to support you, and to ask your question in a way
that makes it easy for them to answer.

Thanks for your understanding and all the best.

On Wed, 22 Apr, 2020, 18:51 sandeep,  wrote:

> Hi, Im facing issue like I'm trying to send 30 parallel tasks to the
> celery and trying to get back the result using apply_async() but uwsgi is
> sending only one task to celery and
> not giving back the result to python code. Thing is it is working fine
> with flask development server but when i uwsgi and nginx I'm getting stuck.
> Please suggest solution.
>
> After 60 seconds it is getting time out as nginx timeout is 60s.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/b9e0f23c-f6b1-4613-aa7e-2454f5cd592f%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YrrTK3Grybys7PiB9ojjEBAd8t7SuEUWkFUm8S41cNb6vw%40mail.gmail.com.


Re: Django for beginners

2020-04-25 Thread Abhijeet Viswa
Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for discussing the development of Django itself, not for support
using Django. This means the discussions of bugs and features in Django
itself, rather than in your code using it. People on this list are unlikely
to answer your support query with their limited time and energy.

For support, please follow the "Getting Help" page:
https://docs.djangoproject.com/en/3.0/faq/help/. This will help you find
people who are willing to support you, and to ask your question in a way
that makes it easy for them to answer.

Thanks for your understanding and all the best.

PS: The Django docs has tutorials for beginners:
https://docs.djangoproject.com/en/3.0/intro/tutorial01/


On Sat, 25 Apr, 2020, 18:54 elisabetta fierro, 
wrote:

> Is it available a Django roadmap for beginners?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2be20c62-c0e2-4abd-8964-78c44b016d40%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-YroNrF7ZZyiZn_u%2Bb3UBiGNQ2To0ENheGp9%2B-nDZD1pqtA%40mail.gmail.com.


Re: GSoC 2020

2020-05-04 Thread Abhijeet Viswa
Hi guys,

I'd like to say the same. It was a wonderful opportunity. Thanks everyone.

Regards.

On Mon, 4 May 2020 at 23:41, Sanskar Jaiswal 
wrote:

> Hey everyone,
>
> I didn’t get selected for GSoC, but I would like to sincerely thank this
> community for guiding me and helping me get involved in open source.
> Especially, Simon and Carlton for solving my doubts about the ORM.
>
> I hope to improve myself and will definitely try again next year. I still
> aim to work on refactoring ORM to work with ModelState.
>
> Thanks
> Sanskar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CACzaa%3DEWW83WkxkSREcGowwB4ne5Qen%3DLee5iV__6hP2a%3DkqjQ%40mail.gmail.com
> 
> .
>


-- 
Abhijeet

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAP1-Yrq%3DY_%2BbM7cKYvhJWLtfEFoFFUknEo0txf6rgF8q5rnJ7Q%40mail.gmail.com.