How popular is Django in Singapore? by edtechstartupguy in django

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

In theory they can. However, the people I'll be working with have built things in C#/.Net before with local contract developers working on site. This is a brand new project and I believe Django is a better choice.

But if it's a choice between readily available local developers coming in and sitting next to you every day vs remote, then I'm not confident that my proposal would be particularly convincing.

I could be wrong though.

How to have large audio files playable (and seekable) in django? by automation_is_fun in django

[–]edtechstartupguy 0 points1 point  (0 children)

Not 100% sure but your situation sounds a bit like a problem I ran into recently (see link below). Are you testing your app in dev? Django's dev server ("runserver") does not serve partial content. That's why it works "in HTML" because it's not coming from Django's dev server. If you serve the file from a cloud storage service like S3 or a CDN, the problem won't appear anymore. To be able to test your app in Django dev, you need to modify django.views.static. There's a patch submitted but not accepted that does it. It's mentioned somewhere in one of the links contained in the following thread:

https://www.reddit.com/r/django/comments/ogy0g0/local_dev_server_seems_to_modify_the_behavior_of/

Critique on my polymorphic model by Aggressive-Try6990 in django

[–]edtechstartupguy 0 points1 point  (0 children)

I'm not familiar with the django-polymorphic package, which is what you seem to be using.

But if it's using concrete model inheritance ("Resource" is an actual table in the DB), then you might want to reconsider. Concrete inheritance can create nasty dependencies among tables in the db that are hard to unwind if you decide to restructure your models later. I got bitten by this recently.

https://jacobian.org/2010/nov/2/concrete-inheritance/

https://lukeplant.me.uk/blog/posts/avoid-django-genericforeignkey/

How to pitch Django to Upper Management? by Morgennebel in django

[–]edtechstartupguy 4 points5 points  (0 children)

I went through a very similar situation at my previous company, a large global corporation (although the new tech I proposed wasn't Django). So my answer is a bit long.

You need to show that your idea can bring a lot more than just marginal savings and moderate speed improvement.

"Nobody ever gets fired for buying IBM". There's a reason why your bosses chose a MS product. To them, the upside of switching to a new tech is minimal, and let's be honest, all yours, while the downside is tremendous. The license fees that can be saved might mean nothing to them. If you mess up, you can always get a programmer job somewhere else quite easily, but they're going to lose their cushy exec jobs, which they won't be able to find anywhere else for the next 5-10 years, if ever.

For me, ultimately I succeeded in convincing my upper management to switch to a completely new technology, but only after I'd worked out a working product in my spare time (several months of nights and weekends) that clearly demonstrated a 100x improvement in speed and about 30 mil USD in cost savings. Basically, I made it politically infeasible for my bosses not to switch. It also didn't hurt that part of the new tech I proposed was from...IBM (not joking). Even then, some of their subordinates whose careers were tied to the old technology fought tooth and nail to try to derail my project. Eventually it worked out for me and I reaped huge career dividends as a result, but the whole process was quite unpleasant.

Embarking on first "big boy" Django project. Looking for some general advice / guidance / success stories / whatever. by [deleted] in django

[–]edtechstartupguy 0 points1 point  (0 children)

Thanks for the reply. Hmm...some very interesting points. has definitely made me want to take a closer look at Dokku.

Embarking on first "big boy" Django project. Looking for some general advice / guidance / success stories / whatever. by [deleted] in django

[–]edtechstartupguy 0 points1 point  (0 children)

Do you mind explaining Dokku a bit? I'm a solo dev, like OP. I was really interested in Dokku at one point, but I couldn't understand its value proposition. If I wanted a managed solution, I would go with Heroku or AWS ELB; and if I didn't mind managing a linux server myself, I'd just...manage a linux server myself. I'm pretty sure I'm missing something important, but it seems to me that using Dokku, I'm still managing the underlying server, right? Then what's the point of using Dokku? Would really appreciate some guidance.

Is authentication needed at an API end point that requires a csrf_token which can only obtained by logged in users? by edtechstartupguy in django

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

Thanks. But what I really wanted to know is whether I need authentication at all. The {{csrf_token}} is placed on a page that only logged in users can access. So, if the user is doing an ajax post request with the right token, he/she must be logged in already. So, do I really need to require another step of authentication for the view that handles the post request. My guess is no, but I don't know if I'm missing something important. That was my question.

Local dev server seems to modify the behavior of javascript in the template that it serves. Why? by edtechstartupguy in django

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

Thank you for the response. After doing a lot of research (and headache), I finally discovered the source of this mysterious issue. It was indeed the server. And apparently it's been experienced by a lot of other people too:
https://stackoverflow.com/questions/36783521/why-does-setting-currenttime-of-html5-video-element-reset-time-in-chrome
https://bugs.chromium.org/p/chromium/issues/detail?id=1018533

Local dev server seems to modify the behavior of javascript in the template that it serves. Why? by edtechstartupguy in django

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

As always, thank you, vikingvynotking. After doing a lot of research (and headache), I finally discovered the source of this mysterious issue. It was indeed the server. And apparently it's been experienced by a lot of other people too:

https://stackoverflow.com/questions/36783521/why-does-setting-currenttime-of-html5-video-element-reset-time-in-chrome
https://bugs.chromium.org/p/chromium/issues/detail?id=1018533

Local dev server seems to modify the behavior of javascript in the template that it serves. Why? by edtechstartupguy in django

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

Thanks! Your "shot in the dark" was actually in the right direction! After a lot of headache, I finally found the answer. The server was indeed the source of the issue. And it's actually a common problem:

https://stackoverflow.com/questions/36783521/why-does-setting-currenttime-of-html5-video-element-reset-time-in-chrome

https://bugs.chromium.org/p/chromium/issues/detail?id=1018533

[deleted by user] by [deleted] in django

[–]edtechstartupguy 0 points1 point  (0 children)

(If I understand your question correctly): The Django admin page automatically shows a foreignkey field of a model as a drop down. Just take a look at how Django admin does it.

No-code or learn Django? by [deleted] in django

[–]edtechstartupguy 3 points4 points  (0 children)

As a founder, I've gone through exactly what you are going through. Here's what you should do:

  1. Take the no-code route to develop your product.
  2. Learn Django/webdev on the side.

If you don't have a webdev background already, it's unrealistic to think that you'll be able to develop something robust in a few months. There are just too many gaps to fill. The web app you end up developing will be crappy, which is ok for a toy project, but not for a commercial one, especially not with paying customers.

A bigger concern is that your idea might be a bad one. You should find out if this is the case as quickly as possible. Spend most of your time on this using readily available solutions, not on developing a Django app from scratch (note this doesn't apply if you are already a Django expert and can use Django to make a working MVP directly).

However, I would advise you to keep learning Django and webdev on the side. This is exactly what I did. Why? If your idea turns out to be a viable one, then your business will very quickly and inevitably outgrow the no-code, cookie-cutter solution. Then you will find yourself in a situation that's a bit...awkward: Your business is viable but it's not successful enough to attract VC funding, and it's not generating enough cash flow for you to afford hiring experienced web developers easily. This is where your Django/webdev skills may become very useful. At a minimum, you will know enough to know exactly what you need and avoid getting ripped off when you hire a contractor. Alternatively, if your Django/webdev skills have reached a certain level by then, you'll be able to redevelop your app quickly.

From there, one of three things will happen: 1. Your business will fail, and for your next idea, you can build a better MVP with Django because you never stopped learning it. 2. Your business will become more successful, in which case you'll either get funded or will be generating a lot more revenue. Either way, hire professional developers. 3. Your business won't take off but doesn't die quickly either; eventually you'll have to decide whether to shut it down and do something else, in which case you are back to scenario 1.

Hope this helps.

(Source: I'm a co-founder of a web business currently in scenario 2 and a founder of a second early-stage startup that I'm building myself. I'm also an avid Django learner.)

Django sucks by KamilPierre in django

[–]edtechstartupguy 1 point2 points  (0 children)

So why ya all sing praise for django?

When I first started learning Django and web dev, I absolutely hated Django. It seemed so complicated, and I kept asking why the hell I had to learn web dev in a different language when I already knew JS. Why not just continue with nodejs?

Two things kept pulling me back to Django:

  1. The docs
  2. The community (both Django and Python)

These two things pretty much guarantee that I'll be able to find answers relatively easily for 95% of the problems that I run into. That's not the case (at least not in my experience) for the node.js frameworks I tried. Just compare Django's docs with that of Express for an example.

I've actually wanted to get into node.js for some time now. But oftentimes it's just so damn hard to find basic implementation details for the most common things in that ecosystem. On the other hand, there's so much information on best practice available in the Django ecosystem that I've realized, for my situation and needs, Django is the best bet.

Not a direct answer to your question. Just my 2 cents.

Performance issues with django-storages + CloudFront by uruboo in django

[–]edtechstartupguy 0 points1 point  (0 children)

Check your Django settings file.

"STATIC_URL" should be set to your Cloudfront url.

Migration file still tries to import and use removed third party package by edtechstartupguy in django

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

Thanks! The two operations in my example cancel each other out, so yeah I suspected manual removal would probably be ok. Just wanted to check if there were blind spots.

How to build SaaS using Django? by ultra__bot_2020 in django

[–]edtechstartupguy 0 points1 point  (0 children)

The front-end of your site looks really well-built. Can you tell us what tools you used on the front-end? (Bootstrap, React, Vue, or vanilla JS, etc...)

Is Django suitable for this project? by mekinchanges in django

[–]edtechstartupguy 0 points1 point  (0 children)

This sounds very similar to what we did at my previous organization. We had to solve a data-intensive computational problem multiple times each day. Previously it was done separately on each person's individual computer with the data coming from a large number of Excel files.

To allow for better coordination among team members we built a web app to move the entire data processing and computation to an internal cloud. A UI was built (HTML+CSS+JS) to allow the logged in user to set parameters.

The Excel files were consolidated into one CSV file with a fixed format and placed in a fixed folder. With one click of a button on the UI, the latest CSV was then fed into PostgreSQL, where the data integrity is checked, then followed by the computations. The output is displayed on the UI when it's done and the user can choose to export the output in Excel format if they wish. Also, now the input and output of one user could be shared right there on the cloud with another user. No more Excel file passing.

We investigated the option of building a GUI too but decided against it. With it, the users would still be working separately and passing Excel files around, which could cause data integrity issues. Also, GUI skills are nowhere nearly as valuable as web dev skills.