Re: New to Django question about using it without ORM

2014-11-07 Thread Krishnakant Mane

On 11/08/2014 01:44 AM, Andreas Kuhne wrote:
A couple of your questions answered: 1. You don't need to use Django's 
ORM, but you will not be able to use certain features, for example the 
model based class based views (ListView, DetailView, UpdateView). 2. To 
use djangos views and templates, you should really first understand 
Djangos MVC philosophy. In the view you should get all of the items you 
want to show to the user and make the template as "dumb" as possible. It 
should ideally not have any advanced logic in it (think of dumb HTML).
Yes I am aware of this philosophy.  Infact I have all my core business 
logic in my xmlrpc service based engine which is actually the real software.
Thus my views will only query the APIS (getters and setters etc) and 
either send data to the templates or get data from templates and send to 
the core rpc engine.
SO I wonder for such a minimalistic  middle layer logic, do I need a lot 
of special features of views?
3. No comment on the forms (haven't used them), but it shouldn't be that 
hard to implement. 4. The difference between Python 2 and Python 3 has 
been easier from version 3 to version 2. I don't think you will have 
that much problems using python 2 instead of python 3 in the tutorials. 
And if you do, it shouldn't be that hard to fix. Django 1.7 requires at 
least version 2.7 though.

yes I do work with only Python 2.7.
The only thing I am not understanding is that in the tutorial it says 
"if you are still using Python 2.7 you will need some changes in the 
code, for more details see the comments ".

I did not say any special comments so far.
Can you please tell me which things should I look out as pitfalls.
And except the migrate system instead of syncdb, do we have some other 
things which are fundamentally different from Django 1.6?

happy hacking.
Krishnakant.

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


Re: New to Django question about using it without ORM

2014-11-07 Thread Krishnakant Mane

On 11/08/2014 01:46 AM, Aliane Abdelouahab wrote:

- Django 1.7 has the features people always waited it, the the 'migrate'
which allows you to change your schema and let Django rédapate it :)
In my project, all the core logic and database queries (using sqlalchemy 
) are in a different rpc based service written in twisted.
I don't need the model part of Django, just the views to get or send 
data to the rpc service called the core_engine and get data from there 
and send to dum html templates.



- the orm is independant, you can directly write raw sql if you want, the
orm has been made for people who are not made to learn sql again, and to
stay in object programming.
Again as I mentioned, I don't need to think about databses or models at 
all, I just need to do the frontend logic here, it will have very 
minimal processing in views and of course templates will make good use 
of AJAX and JSON.



- for python 2.7 i think all tutorials make it to work on 2.x because not
all the packages have migrated to python 3 (i talk about third parties),
the difference in tutorials, is about using the unicode .



Can you give me one example where the difference will be obvious?
If the syntax from the official 1.7 tutorial can work with Python 2.7 
out of the box, then I will hav no issues lerning directly with version 1.7.
I just wish to only elaborate the fact that I only need to use the views 
as the middle layer between the templates on one side (the client facing 
side ) and the logic in a Python based core_engine written in xmlrpc.


If I am not loosing out the ease by which templates can be built using 
Django and some libraries like krispy-forms then I am more than happy.
I would ideally love to have integrated libraries generate good deal of 
css for me to make forms look good and be accessible.

Happy hacking.
Krishnakant.

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


Re: Issue in Django 1.7.1 with __unicode__ and admin site?

2014-11-11 Thread Krishnakant Mane


That brings me to another related question.
I had asked this before but let's put it in a different way.
With the official Django tutorial for 1.7, they say it is ment for 
Python 3X.
Do we have any plan to have some appendix on using the same tutorial for 
Python 2.7x?

Like to have this code working with 2.7 do XYZ instead of ABC.
Happy hacking.
Krishnakant.On 11/12/2014 01:56 AM, Jorge Andrés Vergara Ebratt wrote:

When you are in Python3 you don't use __unicode__ you use __str__

On Tue, Nov 11, 2014, 3:14 PM Arjan de Knegt 
wrote:


I am using Django 1.7.1 with python 3.4.0 for my latest project.
I am working on a model called Song. In the admin site all object that I
add show as "Song object" where I would expect the title of the Song. I
have added __unicode__ to the model. is there something I miss or are
things changed in Django 1.7? Below the model and what is shown in the
admin site

*Model:*
class Song(models.Model):
 title = models.CharField(max_length=100, verbose_name = 'Titel')
 author = models.CharField(max_length=100, verbose_name = 'Auteur')
 genre = models.ForeignKey('Genre', to_field='genre')
 featured = models.BooleanField(default = False, verbose_name =
'featured')
 song_order = models.IntegerField()

 class Meta:
 verbose_name = _('Song')
 verbose_name_plural = _('Songs')
 ordering = ['song_order']

 def __unicode__(self):
 return self.title

*Shown in Admin site:*
  Song
   Song object  Song object
 Song object
 Song object


--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/01cc75ba-302c-4066-9e4a-fbdc4f3504ea%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.



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


Re: Issue in Django 1.7.1 with __unicode__ and admin site?

2014-11-11 Thread Krishnakant Mane

On 11/12/2014 03:21 AM, donarb wrote:

On Tuesday, November 11, 2014 1:26:53 PM UTC-8, krmane wrote:


That brings me to another related question.
I had asked this before but let's put it in a different way.
With the official Django tutorial for 1.7, they say it is ment for
Python 3X.
Do we have any plan to have some appendix on using the same tutorial for
Python 2.7x?
Like to have this code working with 2.7 do XYZ instead of ABC.
Happy hacking.
Krishnakant.On 11/12/2014 01:56 AM, Jorge Andrés Vergara Ebratt wrote:

When you are in Python3 you don't use __unicode__ you use __str__

On Tue, Nov 11, 2014, 3:14 PM Arjan de Knegt 
>

wrote:


I am using Django 1.7.1 with python 3.4.0 for my latest project.
I am working on a model called Song. In the admin site all object that

I

add show as "Song object" where I would expect the title of the Song. I
have added __unicode__ to the model. is there something I miss or are
things changed in Django 1.7? Below the model and what is shown in the
admin site

*Model:*
class Song(models.Model):
  title = models.CharField(max_length=100, verbose_name = 'Titel')
  author = models.CharField(max_length=100, verbose_name = 'Auteur')
  genre = models.ForeignKey('Genre', to_field='genre')
  featured = models.BooleanField(default = False, verbose_name =
'featured')
  song_order = models.IntegerField()

  class Meta:
  verbose_name = _('Song')
  verbose_name_plural = _('Songs')
  ordering = ['song_order']

  def __unicode__(self):
  return self.title

*Shown in Admin site:*
   Song
Song object  Song

object

 Song object
 Song object


--
You received this message because you are subscribed to the Google

Groups

"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send

an

email to django-users...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com

.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit


https://groups.google.com/d/msgid/django-users/01cc75ba-302c-4066-9e4a-fbdc4f3504ea%40googlegroups.com

<

https://groups.google.com/d/msgid/django-users/01cc75ba-302c-4066-9e4a-fbdc4f3504ea%40googlegroups.com?utm_medium=email&utm_source=footer>


.
For more options, visit https://groups.google.com/d/optout.




It's better to start another thread rather than hijacking a thread.
Otherwise, people who have the same question as you can't tell by looking
at the title of this post. But to answer your question, the comments at the
start of the tutorial read as follows:

*If you are still using Python 2.7, you will need to adjust the code
samples slightly, as described in comments.*



And  where are the comments?
 am sorry if I am seriously missing some text.
happy hacking.
Krishnakant.

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


Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Krishnakant Mane


I will recommend Django as the best for this kind of work.
There is Meta studio which does exactly that and it is developed in Django.
I suggest you go to www.gnowledge.org and see if you can find a link to 
the said project.

happy hacking.
Krishnakant. On 11/12/2014 07:42 PM, Avraham Serour wrote:

what kind of answer do you expect asking if django is better than X on a
django list?

If you are already familiar with python it is worth to use a python based
framework over something else you are not familiar with.
But this is only one piece of the puzzle, you still need a deployment
server, database and client side to worry about at least

On Wed, Nov 12, 2014 at 9:20 AM, Pradip Shahi 
wrote:


Hi everyone, I am new to Django web framework but familiar with python
programming.
I am planning to develop an online Learning Management system for a
college(client).
LMS covers online course and learning system.
So, is it worth choosing django rather than other like Ruby on Rails or
asp.net?

Thanks.

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



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


need precise advice before final decision on Django

2014-11-13 Thread Krishnakant Mane

Hello all,
I did look at a few good tutorials and also did some hands-on with what 
ever those tutorials had to offer.

Also did some of my own inovations with the tutorials/
I feel Django has greatly impressed me so far.
Now I think I can rightly ask my question and in a more specific way.
I would like to have all the bennifits of one particular aspect of 
Django, namely it's ability to create very good looking forms, playing 
with divs in templates.
All in all, I think if it is going to be more Python and less writing of 
HTML and CSS I love it.

My Specific question is about this very aspect.
I am developing a accounting. book keeping software.
As I had previously emailed to this list, I have the complete logic 
written in an xmlrpc package coded using Twisted.
Now, I wish to know, if I can use the template's capacity of generating 
good forms and add good css without having a compulsion of using the 
model part of Django?

I guess it is obvious that I only need the view and template part here.
I feel if Python can hellp me with writing good looking forms and if 
there are ways I can easily use AJAX then I am going with it.

So this is the only doubt remaining in my mind.
And yes, I really don't need the admin part, so far as I can see it.
Regards.
Krishnaaknt.

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


Re: need precise advice before final decision on Django

2014-11-13 Thread Krishnakant Mane


Hi Javier,
On 11/14/2014 12:21 AM, Javier Guerra Giraldez wrote:

On Thu, Nov 13, 2014 at 1:32 PM, Krishnakant Mane  wrote:

I guess it is obvious that I only need the view and template part here.


and forms.   they're often used with models (i.e. subclassing
ModelForm), but that's not a requirement.

Yes correct, I just found this thread on stackoverflow
http://stackoverflow.com/questions/17754295/can-i-have-a-django-form-without-model
I see this is a wonderful thing.
I had thought of a similar idea and was just looking for the right 
direction.





also note that doing XMLRPC calls in view code will block the
request/response cycle.  in principle that would mean you need a good
multithreading WSGI container, but maybe some good
event-driven-monkeypatching platform can work too.


Well, I had used Pylons for some time and I did make xmlrpc calls 
correctly and I used to have no problems in having multiple requests 
going to the rpc server at one point from different clients.

So I don't think the Django views may be so stupid either.
Happy hacking.
Krishnakant.

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


Re: need precise advice before final decision on Django

2014-11-13 Thread Krishnakant Mane

On 11/14/2014 12:07 AM, Avraham Serour wrote:

Now, I wish to know, if I can use the template's capacity of generating

good forms and add good css without having a compulsion of using the model
part of Django?
yes.

Any good article, blog or tutorial for this?

Happy hacking.
Krishnakant.

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


Re: Is django framework feasible for developing online LMS?

2014-11-14 Thread Krishnakant Mane


Look at this.
http://www.metastudio.org/home/On 11/14/2014 12:50 PM, Pradip Shahi wrote
It might interest you and perhaps u will also learn how they did it in 
Jango.

Happy hacking.
Krishnakant.
:

*Avraham Serour,*

Sorry man, I mean to heart django guys..
I am pretty much sure with mysql as a backend and javascript on client.
Would you help me decide on web server.. I had some research on Apache with
mod wsgi, gnuicorn and nginx.
Thank you.

*Ari Davidow,*
I really appreciate your suggestion and had a look at edX. It's a cool open
source LMS. But what i wanna do is, It's my FYP project, I wanna built
simple system with online course delivery and its administration. My main
motto is to learn django rather than just complete the system. OpenedX is a
cool thing to think in real time implementation. Hope more other suggestion
from you.
Thank you!

Scot Hacker,
Thanks man.

Krmane,
No man gnowledge is something different from my project nyways thank you.
will look at it for more.











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


is it worth going for version 1.6 for commertial project

2014-11-22 Thread Krishnakant Mane

Hello all,
I have been looking for some good discussion on this issue.
i see there is not much difference between 1.7 and 1.6 as far as my 
requirement goes.
I have gone through the official docs for both in a kind of rappid 
specific way.

As it is I am not going to use ORM at all.
I am mainly intrested in views which will talk to an already existing 
core logic written as an xmlrpc server.

The code is stable and works excelent on commertial projects.
My main interest is to just build the web front end (I would be using 
views and templates ) for the said project.

I like the templating system and the forms are handled very well.
I would be further interested in the way Django helps write css or 
integrate javascript libraries like Bootstrap using Python code itself.
So I don't see any great difference in 1.6 vs 1.7, provided I have not 
missed some thing.
The question is now, given that support for 1.6 could be over soon, is 
it worth while to stick with it?
on the other hand, 1.7 will also loose out support some tiem or the 
other, although later as compared to version 1.6?  Again, 1.6 I guess 
will receive updates at least for a year if I am not mistaken?


I use Python 2.7 so no problems on that department.
Kindly let me know your views so that I can take  a decision at the earlist.
happy hacking.
Krishnakant.
Are theredevelopers on this list who still vouch by 1.6 and would 
recommend me to go with that version?


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


Re: is it worth going for version 1.6 for commertial project

2014-11-25 Thread Krishnakant Mane


Well then I would go with 1.7.
Thanks for all the advise.
Happy hacking.
Krishnakant.On 11/25/2014 06:54 PM, Collin Anderson wrote:

Hi All,

If it helps, at work we have upgraded all of our websites to django 1.7,
and are only now starting to think about using migrations.

It's totally possible to use 1.7 without migrations.

It's also worth noting that although Django supports 1.6 for another 4-5
months, that's only for security fixes and data-loss bugs, whereas 1.7 gets
more bug fixes.

Collin


On Saturday, November 22, 2014 7:56:47 PM UTC-5, Thomas wrote:


On Nov 22, 2014, at 4:53 AM, Krishnakant Mane > wrote:


Hello all,
I have been looking for some good discussion on this issue.
i see there is not much difference between 1.7 and 1.6 as far as my

requirement goes.

I have gone through the official docs for both in a kind of rappid

specific way.

As it is I am not going to use ORM at all.

I am sticking with 1.6.x in case the new migration system needs a bit of
extra time to iron out.

But since you are not using the ORM then you will not notice one way or
the other. I’d probably go with 1.7.x…

hth

- Tom




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


is there a Django library for AJAX support

2015-01-04 Thread Krishnakant Mane

Hello all,
I am realy impressed with the Django forms and some additional 
enhancements with CrispyForms 

Specially that additional library does a great job with css management 
making it possible to make the forms look good and accessible using only 
Python code.

Is there some thing similar for AJAX support?
I wish some thing like this.
Make a form using Crispy forms or even simple Django forms.
If a submit is required for sending an AJAX request and getting response 
either in JSOn or otherwise, some Python code which exploites the 
functionality of Jquery or any JS library is available.
The entire AJAX code is written using Python, just like the way css is 
managed with the above mentioned library, so that one does not have to 
go back to the template and write the javascript code, then come back to 
the view to check the form for IDs of fields etc.
This moving back and forth for either css or javascript could be avoided 
(Crispy forms already does it for css as I said before ).

Kindly let me know if such a thing exists.
Happy hacking.
Krishnakant.

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


Re: is there a Django library for AJAX support

2015-01-05 Thread Krishnakant Mane
I see, it is a great library, yet I still have to write some javascript 
code.
I was looking for some library wich let's say integrates with Jquery and 
gives access to it's AJAX functionality through Python code, just like 
crispy-forms does for CSS.

Happy hacking.
Krishnakant.
On 01/05/2015 08:08 PM, Daniel França wrote:

Have you tried Dajax/Dajaxice? http://www.dajaxproject.com/

Em Sun Jan 04 2015 at 2:15:16 PM, Krishnakant Mane 
escreveu:


Hello all,
I am realy impressed with the Django forms and some additional
enhancements with CrispyForms
<http://django-crispy-forms.readthedocs.org/en/latest/index.html>
Specially that additional library does a great job with css management
making it possible to make the forms look good and accessible using only
Python code.
Is there some thing similar for AJAX support?
I wish some thing like this.
Make a form using Crispy forms or even simple Django forms.
If a submit is required for sending an AJAX request and getting response
either in JSOn or otherwise, some Python code which exploites the
functionality of Jquery or any JS library is available.
The entire AJAX code is written using Python, just like the way css is
managed with the above mentioned library, so that one does not have to
go back to the template and write the javascript code, then come back to
the view to check the form for IDs of fields etc.
This moving back and forth for either css or javascript could be avoided
(Crispy forms already does it for css as I said before ).
Kindly let me know if such a thing exists.
Happy hacking.
Krishnakant.

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



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


Help deciding ORM VS raw SQL trade-off in Complex scenario

2024-07-13 Thread Krishnakant Mane

Hello.

I am seasoned SQLAlchemy user and quite good in node's sequelise ORM.

But I am new to the one with Django.So here's my situation.

I am developing an accounting (book keeping ) automation software service.

So there are accounting rules (Debit = Dr and credit = Cr) for double 
entry book keeping.


Every transaction will have 2 or more amounts, at least 1 each for dr or 
Cr.


These entries are called vouchers.

We also store retail bills, receipts and payments again all in different 
tables.


But the bills and receipt&payment tables are connected to the voucher 
table.


The software generates reports such as cash flow, meaning day's opening 
balance, total Drs, total crs, and final closing balance (DRs - Crs).


then there are Profit and Loss as well as balance sheet reports.

All this needs a lot of aggregations (sum and counts ) and also joining 
of invoice + voucher and recept&payment + voucher tables.


so here are my questions.

1: given the fact that I have created materialised views in Postgresql, 
should I even care to model them and use the ORM syntax instead of raw 
query?  What would perform better?


2: datasets are going to be huge some times in terms of shear rows (all 
transactions aka vouchers ) or some times sum and count will be used in 
complex queries on a huge dataset.


Again, should I rely on raw queries or will ORM plan the queries for me 
better?  Should I instead create stored procedures and call them from my 
REST API?


talking of which,

3: I am using Django REST Framework and serialising records is an option 
to get json output.


Should I use it or just go with raw queries and convert output to JSON 
as required?


Again performance is a question.

Tip, My team is very proficient in SQL and yours truely can modestly 
call himself an expert in the same, so maintenance is not an issue here.


Regards.

Krishnakant.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/097a6e55-c30e-491e-bf43-86e4c672faa4%40gmail.com.


Re: Help deciding ORM VS raw SQL trade-off in Complex scenario

2024-07-14 Thread Krishnakant Mane

I am looking into ninja too.

I guess I may be able to use SQLAlchemy seamlessly with it.

Regards.

On 7/14/24 21:35, Sam Brown wrote:
Im sure there are performance metrics out there to prove the ORM will 
not be the bottleneck. But I’ve never seen it slow things down when 
I’ve employed a timer on operation


Also, ive recently ran into some of the limitations of drf and am 
looking into moving to an api that can be less coupled with orm. 
Django-ninja looks promising.


On Sat, Jul 13, 2024 at 9:15 PM Krishnakant Mane  
wrote:


Hello.

I am seasoned SQLAlchemy user and quite good in node's sequelise ORM.

But I am new to the one with Django.So here's my situation.

I am developing an accounting (book keeping ) automation software
service.

So there are accounting rules (Debit = Dr and credit = Cr) for double
entry book keeping.

Every transaction will have 2 or more amounts, at least 1 each for
dr or
Cr.

These entries are called vouchers.

We also store retail bills, receipts and payments again all in
different
tables.

But the bills and receipt&payment tables are connected to the voucher
table.

The software generates reports such as cash flow, meaning day's
opening
balance, total Drs, total crs, and final closing balance (DRs - Crs).

then there are Profit and Loss as well as balance sheet reports.

All this needs a lot of aggregations (sum and counts ) and also
joining
of invoice + voucher and recept&payment + voucher tables.

so here are my questions.

1: given the fact that I have created materialised views in
Postgresql,
should I even care to model them and use the ORM syntax instead of
raw
query?  What would perform better?

2: datasets are going to be huge some times in terms of shear rows
(all
transactions aka vouchers ) or some times sum and count will be
used in
complex queries on a huge dataset.

Again, should I rely on raw queries or will ORM plan the queries
for me
better?  Should I instead create stored procedures and call them
from my
REST API?

talking of which,

3: I am using Django REST Framework and serialising records is an
option
to get json output.

Should I use it or just go with raw queries and convert output to
JSON
as required?

Again performance is a question.

Tip, My team is very proficient in SQL and yours truely can modestly
call himself an expert in the same, so maintenance is not an issue
here.

Regards.

Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users%2bunsubscr...@googlegroups.com>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/097a6e55-c30e-491e-bf43-86e4c672faa4%40gmail.com.

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALmEK1sEN%2BLjwcrT-7eYbQkrdkU2bynGehBo4BjvkW1NEBVUjQ%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CALmEK1sEN%2BLjwcrT-7eYbQkrdkU2bynGehBo4BjvkW1NEBVUjQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f1a8a082-61c9-449c-9361-d1c8d77c0b07%40gmail.com.


how to keep django ninja APIs distributed in modules in an apis package?

2024-07-26 Thread Krishnakant Mane

Hello.

I have decided to use django ninja for its simplicity and performance.

However I have one specific confusion.

Suppose I have an app with a models.py, schemas.py and all my APIs in 
one package called apis.


    Suppose in the apis package along with __init__.py I have 
api_accounts.py, api_parties.py and api_bills.py with crud functions 
decorated with respective get, post ... etc.


Now How all these APIs can be bound together in such a way that they can 
be imported in my project's urls.py?


or will there be a differnt way of doing this?

Regards.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b5f215f2-3a5a-4daf-93c7-ca1f44058fe3%40gmail.com.


Re: Help deciding ORM VS raw SQL trade-off in Complex scenario

2024-07-27 Thread Krishnakant Mane

Talking about Ninja.

I am actually trying to figure out how I can distribute my crud APIs in 
seperate python modules (one per model ) and make a package in my app.


Then How all the routs can be imported in the project urls.py at once.

Any suggestions?

Regards.

On 7/14/24 21:35, Sam Brown wrote:
Im sure there are performance metrics out there to prove the ORM will 
not be the bottleneck. But I’ve never seen it slow things down when 
I’ve employed a timer on operation


Also, ive recently ran into some of the limitations of drf and am 
looking into moving to an api that can be less coupled with orm. 
Django-ninja looks promising.


On Sat, Jul 13, 2024 at 9:15 PM Krishnakant Mane  
wrote:


Hello.

I am seasoned SQLAlchemy user and quite good in node's sequelise ORM.

But I am new to the one with Django.So here's my situation.

I am developing an accounting (book keeping ) automation software
service.

So there are accounting rules (Debit = Dr and credit = Cr) for double
entry book keeping.

Every transaction will have 2 or more amounts, at least 1 each for
dr or
Cr.

These entries are called vouchers.

We also store retail bills, receipts and payments again all in
different
tables.

But the bills and receipt&payment tables are connected to the voucher
table.

The software generates reports such as cash flow, meaning day's
opening
balance, total Drs, total crs, and final closing balance (DRs - Crs).

then there are Profit and Loss as well as balance sheet reports.

All this needs a lot of aggregations (sum and counts ) and also
joining
of invoice + voucher and recept&payment + voucher tables.

so here are my questions.

1: given the fact that I have created materialised views in
Postgresql,
should I even care to model them and use the ORM syntax instead of
raw
query?  What would perform better?

2: datasets are going to be huge some times in terms of shear rows
(all
transactions aka vouchers ) or some times sum and count will be
used in
complex queries on a huge dataset.

Again, should I rely on raw queries or will ORM plan the queries
for me
better?  Should I instead create stored procedures and call them
from my
REST API?

talking of which,

3: I am using Django REST Framework and serialising records is an
option
to get json output.

Should I use it or just go with raw queries and convert output to
JSON
as required?

Again performance is a question.

Tip, My team is very proficient in SQL and yours truely can modestly
call himself an expert in the same, so maintenance is not an issue
here.

Regards.

Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users%2bunsubscr...@googlegroups.com>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/097a6e55-c30e-491e-bf43-86e4c672faa4%40gmail.com.

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALmEK1sEN%2BLjwcrT-7eYbQkrdkU2bynGehBo4BjvkW1NEBVUjQ%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CALmEK1sEN%2BLjwcrT-7eYbQkrdkU2bynGehBo4BjvkW1NEBVUjQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8db1044f-c443-48ef-85d5-62d668f2420a%40gmail.com.


how to represent postgresql json field in ninja schema?

2024-08-17 Thread Krishnakant Mane

Helo.

I guess the question is obvious.

I have json field in my postgresql table and django orm has no issues 
with it.


But I am not able to find out oa way to use it in my schema in ninja.

classorgin(Schema):
orgname: str
orgaddr: str
orgdetails: json
This does not work.
Any hint?
Regards.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f7a1f6a0-af73-4c6a-b5cb-50d2e08baf1a%40gmail.com.


jwt authentication in ninja without django user

2024-10-11 Thread Krishnakant Mane

Hello.

This seems very complex to me.

I have previously used other Python and non-Python frameworks and one 
thing I always did is to create my own user table and respective model.


I wish to do the same thing in django with ninja.

I also find the jwt authentication articles/ blogs online very complex.

Can some one guide me to a simple explanation?

My requirement is very simple.

I have an accounts table with all user data including username and password.

The user creates this during registration, I don't want to use the 
django user model.


Now every time the user logs in, I wish to generate the token and with 
every request I need to authentication.


I know that in the router.get or router.post decorator I will have to 
inject the authentication function.


But no tutorial gives a clear indication of where to create this class 
and no simple code to just authenticate and go ahead.


I am trying to use simplejwt from rest_framework.

If this is not the correct way please guide.

Regards.

--
Email Signature
*Krishnakant Mane*
Software Architecture Design & Implementation Specialist


Mobile: 
+91 8424039903

https://www.linkedin.com/in/krishnakant-r-mane/

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9326d678-fefd-4176-8a61-d24c86c6bc1c%40gmail.com.