Hacker Newsnew | past | comments | ask | show | jobs | submit | icn2's commentslogin

Is Django restful in current version? Or I still need these if request.GET and if request.POST ?


So, there are a few ways to handle it. DRF gives you a REST-oriented paradigm to work with, but in standard Django, you can do class-based views with either get, post, etc methods, or you can use generics like "ListView" and just provide some stock methods like get_queryset to flesh it out.


http://bidwars.net buy and sell with neighbors you trust


Location: Vancouver,BC, Canada Remote: Yes looking for remote position Willing to relocate: NO Technologies: rails/ruby/python/reactjs/elixir/phoenix/mysql/postgresql/mongodb/javascript Résumé/CV:On Request Email: online.service.com@gmail.com


I am not using parse's backend services. I am using its push services. Has anyone had experience with Amazon Simple Notification Service? I am thinking switch to aws sns (https://aws.amazon.com/sns/).


Lots of people just don't get it :).


Thanks for hardworking! Chris has been very active on answering questions on slack as well!


Could some company support phoenix framework as well? Phoenix's channel feature is already there :)


I'm learning Phoenix so I've been on their website a bit lately. I believe Dockyard (the company with an ad on the bottom of Phoenix's site) is supporting the project.


DockYard indeed supports the project. I work there full-time, primarily on Phoenix development (I'm the creator). We wouldn't be able to do what we're doing without their support, so I welcome the trend of companies supporting the OSS projects they use.


I was wondering why Django was the choice anyway... Am I out of the loop here? What about Rails, or anything else?


MDN is written in Django: https://github.com/mozilla/kuma. The add-ons site also uses Django. http://reinout.vanrees.org/weblog/2011/06/06/large-mozilla-s...

They have around 15 django libraries on GitHub as well https://github.com/mozilla?utf8=%E2%9C%93&query=django


Got it. Thanks.


Django is a popular server-side Web development framework, used in many Mozilla websites. Their award will be used to make Django suitable to be a back end for Web apps which use WebSockets.

Probably because they use it at mozilla.


I haven't followed django for a while. Could someone explain a bit more about django' model association part. Is it currently comparable to rails's model associations? Looking at these two pages http://guides.rubyonrails.org/association_basics.html https://docs.djangoproject.com/en/dev/ref/models/relations/

It seems there are a bit more on rails model associations.


You want this page:

https://docs.djangoproject.com/en/1.7/ref/models/fields/#mod...

In general:

Django's ForeignKey is equivalent to Rails' belongs_to.

Django's OneToOneField is equivalent to Rails' has_one.

Django's ManyToManyField is equivalent to Rails' has_and_belongs_to_many.

Also, in Django one generally only declares the relationship from one "side", unlike Rails where the relationship is declared on both "sides" (i.e., in Django one simply sets up a ForeignKey on A pointing to B, rather than placing relationship identifiers on both A and B).

The equivalent of ":through" is also available.

Django has GenericForeignKey as an equivalent to Rails' polymorphic associations.


Just to clarify a little:

> Also, in Django one generally only declares the relationship from one "side", unlike Rails where the relationship is declared on both "sides" (i.e., in Django one simply sets up a ForeignKey on A pointing to B, rather than placing relationship identifiers on both A and B).

That's because django will automatically add the reverse of the relation to B, so that you can access A through B. You can disable that functionality optionally though.


Isn't Rails getting real foreign keys only in yet to release 4.2?


Not using proper foreign keys doesn't mean you can't have associations, it just means that the database won't enforce their integrity. (If you wanted that enforcement in rails, the traditional solution was the Foreigner gem[0]).

(My guess is Rails didn't use proper FKs by default because the default development db (SQLite) originally didn't support foreign keys (though it has for a while now, since 3.9.16), and they presumably wanted to minimise the differences in the way they use different databases).

[0] https://github.com/matthuhiggins/foreigner


It is not just language. It is the platform behind language. You choose python/ruby your stack probably is opensource/linux stack. If you choose c# you probably is stuck with windows stack, (in which you don't have a lot options like open source stack).


> probably is stuck with windows stack

You're also stuck with licenses for everything from your development environment to your web server, database and not to mention operating system.

Compared to Python/Ruby where development cost can be $0.


You are also stuck with the costs of managing those licenses, and the risk of not being in compliance (howerever well you manage them). Both get bigger than the licensing costs when you get big.

There is also the cost hidden in "new developer? Wait a bit while I'll get another license", "what kind of replication? We don't have enough licenses", "no, you can't just create a small project (that can get huge) for solving this small problem, it can't justify the cost in licenses", and other very common situations.


Mono's also free, and works well on unixes, and I've had no problem with components for various FOSS databases. There are some differences between the ms clr and the mono clr, but then again, there are differences between jython and cpython as well.


I am just curious if he makes $65/hour how come he didn't save up 300 hundred ? It is just 5 hours his time.


Because someone hasn't hired him (recently)?


It's a great marketing ploy.


Not sure why you were downvoted - this is a brilliant way for him to get his name out there. Before this, we never would've heard of him, and now he's at the top of HN.


Right, it also shows that simple personalized honesty is probably better than marketing stunts that portray something incredible. This reminds me of those tear-jerker google ads, like the "Dear Sophie" one.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: