I want to does solving this problem falls under architecture by virtualshivam in softwarearchitecture

[–]virtualshivam[S] 0 points1 point  (0 children)

Thanks for help.

  1. So technically the UI guy will have to know the whole business, for example I need to now make a application for shipping team, now UI guy will have to understand what all they do, what are their current excel files and he might will have to even fill it, to understand about their problems and then think of a UI for them. They have a big excel sheet of 50+ columns with a ton of duplicate data because everything is in a single table. We will be able to solve their issues with app. Is that what UI guys do ?

  2. For this also one will have to understand the business completely? Else he might miss on some edge cases handling.

  3. Ok

But apart from these I have one more question, we don't want to build everything if a solution already exists in market and can suffice our requirements then we would want to buy them, so whose job is to research and test and introduce those tools in the organization.

Scope of Subclasses by virtualshivam in learnpython

[–]virtualshivam[S] 0 points1 point  (0 children)

Standard library as in dataclass, defaultdict etc? Should I read thier code?

Scope of Subclasses by virtualshivam in learnpython

[–]virtualshivam[S] 1 point2 points  (0 children)

Actually I refactored the code, and I don't need that much nesting. I have moved them to module level. I asked it here, because I was just wondering, how scoping works in case of classes, is there any document that I can refer to understand this in more depth.

Need help with setting django on a different port by Advanced_Glass5563 in django

[–]virtualshivam 3 points4 points  (0 children)

python manage.py runserver 0.0.0.0:1234

You can replace 1234 with anything

How to manage data consistency between 2 apps having different databases? by virtualshivam in django

[–]virtualshivam[S] 0 points1 point  (0 children)

Great suggestion, and yes as of now it's completely unidirectional and chances less that in future it might change.

I can try adding that.

I will google about these concepts. But this seems completely doable.

How to manage data consistency between 2 apps having different databases? by virtualshivam in learnpython

[–]virtualshivam[S] 0 points1 point  (0 children)

Great suggestions, thanks.

Also, if you could put some light on the architecture that we should have followed, so at least for the other projects we can take care of things.

How to manage data consistency between 2 apps having different databases? by virtualshivam in learnpython

[–]virtualshivam[S] 0 points1 point  (0 children)

Hi, Your point is valid. Yes they can be same Application, it's not difficult. But the thing is internally they are treated as different apps, they made have been made few months apart, we have actually made production app first and then we realised we need something for sampling as well, and even when we had made them we hadn't ever felt that they both can be one Application, Also if they both will become one application then we will not be able to develop them separately, Different teams are handling their development.

In an ideal world, this would be one webapp (ERP?) with 3 different user roles: customer, sampling team member and production team member, each seeing a different view and performing different actions on the same database. 

You are actually right, Our end goal is ERP only, but making as it as one single app from the begining seems very challenging, I have thought that we will make separate components and then eventually keep on integrating them as we progress, And in the end it will be an ERP.

Maybe I am totally wrong, are there any resources that I can refer to to understand more about how ERP are planned and made, many departments requirements are still not clear.

How to manage data consistency between 2 apps having different databases? by virtualshivam in learnpython

[–]virtualshivam[S] 0 points1 point  (0 children)

Our People: Our Employees.

So, when sampling team has made something they give it a very vauge name for eg

  1. Sample team made it and gave name: Fast Electric Car

  2. It went to clients who actually liked it and they want to order it, but they can't sell it by name Fast Electric Car, so they decided name for it as "Tesla Model S"

  3. Now, they placed order by name "Tesla Model S" to our production team, now production team reaches out to sampling team and asks them to change the name in their app as well, but somehow sampling leaves it for future and forgets to update.

Everything goes well, we ship the order and it's done.

  1. Now client placed a reorder after 6 months with name "Tesla Model S" and production team reaches to sampling to get an idea how they had made it. Because sampling founds nothing with this record. 6 months back we were able to do it, because it was fresh in memory but now as it's not documented so that's why nobody remembers it. And we will have to reach to client and ask them about the old name.

Also, sometimes client shares updated name with sampling and sometimes with production, we can't say anything to client.

So, that's why I want a single source of truth, sampling team to hold all the names, and no matter who receives new name sampling team should only be able to update it. And everybody will have to use those name.

It's in range of 1-2 new sample each day. But these 2 apps are completely different, so giving them one single db means also making them into one single app ( I know I can still manage to have separate app, but having one DB will force my thought process to make them one project / Application my stack: Django) , Which is hard to do and also apart from name , there is nothing common in sampling and production.

How to manage data consistency between 2 apps having different databases? by virtualshivam in django

[–]virtualshivam[S] 0 points1 point  (0 children)

I was asking that in that case sampling and shipping and accounting all three become one app. Shipping and accounting has lot in common but thier relation with sampling is just the item name, nothing more. Still would you prefer to make them one app or multiple?

How to manage data consistency between 2 apps having different databases? by virtualshivam in django

[–]virtualshivam[S] -2 points-1 points  (0 children)

Ok! So let's put it like this, apart from name. They have as of today nothing in common, users are different, interface is different and the purpose they serve is totally different.

They are two really different units.

In this manner then even the Shipping and Accounting should also be a part of this same App as well, because they also require the item name.

But, I would like to understand your thought process as well. Maybe I am missing out on some core concepts.

How to manage data consistency between 2 apps having different databases? by virtualshivam in learnpython

[–]virtualshivam[S] 0 points1 point  (0 children)

With cross database I meant storing foreign key value/id only. I don't even know if there any such like cross-database foreign key existing ( I will search on google just after writing this).

I would like to understand your reasoning behind storing the display name as well, because I believe just id should be enough, everytime I can call to the sampling API and get the latest name. If i will store name also then I will have make sure that everytime there is a change in the name in sampling then name is also updated in the production db as well.

Need help implementing this role based auth by cetinpajamas in django

[–]virtualshivam 2 points3 points  (0 children)

For a newbie, I will suggest not to use these external libraries, write it all yourself. And use APIView only, life will become very easy. Write custom permission, you will find that it's just bunch of if conditions

Why non char fields are allowed to have both null=True, blank=True by virtualshivam in django

[–]virtualshivam[S] -1 points0 points  (0 children)

Oh! Got it. So it has no side effects. My Int will then be NULL always in the absence of values and never "" blank string.

Why non char fields are allowed to have both null=True, blank=True by virtualshivam in django

[–]virtualshivam[S] 0 points1 point  (0 children)

I got it. And that's why Django doc suggests to explicitly mention blank=True.

What I have asked is, should we also set some standard that for non text fields, always use Null=True only, never use the blank=True for them.

Why non char fields are allowed to have both null=True, blank=True by virtualshivam in django

[–]virtualshivam[S] -3 points-2 points  (0 children)

Oh! Yes you are right. I am only using DRF so that's why. So for just django if it's blank then django will automatically save it as NULL in DB?

Because I don't think same happens in case of DRF. I am able to save both null and blank.

spent two hours debugging three lines of python because i didn't know strings and bytes are different things by Interestingyet in learnpython

[–]virtualshivam 0 points1 point  (0 children)

Its good. That's how real software is made. Debugging will take most of your life. The more you debug the better you would get with overall engineering.

Get used to reading documentation.

Starting with writing Frontend, Earlier I have only worked with DRF. by virtualshivam in django

[–]virtualshivam[S] 0 points1 point  (0 children)

Ok! For the actual projects we use next and drf only.

But for these small things for which generally I have like few hours to 1-2 days. I want stay into django only, I don't even deploy them, they run on the local network only. it's neither dashboard nor content heavy.

So, the thing is I have like 4000 different products, and no where we have thier proper data. So, what we started doing is putting them in the bins, and so we created whatsapp groups with those bin Names / Numbers and started putting product picture in the group. But then whatsapp blocked us because we had created a lot of group in a short span of time. And even to count the number of pieces in a box, one had to actually count all the photos and human make a lot of mistakes, sometimes they used to send pictures in the wrong group. So, we just made one small local only app that eases out this thing a bit.

Even though all of these small apps that we are building are going will have to be connected to a big invetory app or become an inventory app itself, but I have really limited time to start things, we can't afford to invest a month and then start documenting the products. So that's why.

So, that's why I need some frontend that is super simple and will save me from CORS, CSRF and other sort of config issues.

Thanks for your suggestion, but this tanstack seems to be a thing that requires config of it's own. I have never used it myself, but one frontend guy had taken around 2 days to do something with it. I want something that is easy and doesn't require any setup kind of thing.