Live data from Hacker News

Django 2.1 released

docs.djangoproject.com

121–129 of 129 posts

Re: Django 2.1 released

#121
post #44

For anyone thinking about picking up Django and is worried about the framework being obsolete I encourage you to take a look. Django is fantastic. I've worked with it for a number of years now and it can really help in the early stages of prototyping. Things I especially like about Django: * The built in admin letting you edit and view objects easily. * Being able to use it without using the views. Add django rest fr…

At work because I have lately needed to roll web server/api/admin/client apps (embellished CRUD situations with some other serverside processing to generate user output) and for those my go to for dev speed, platform speed, familiarity, and a few other concerns I generally go with Node/Express/TypeScript and it's great to work with. However for my personal site I used Django to give it a shot. Once I wrapped my head…

I develop many content-driven solutions using Django and the conclusion I've come to is that everything is trash and if it's something for your use, stick to MD.

I've gone with CKEditor (https://github.com/django-ckeditor/django-ckeditor) for all my new stuff, for what it's worth.

Re: Django 2.1 released

#122
post #7

I've been working with Django for almost my whole career, since 1.1. It's a joy to use, and blows any other web framework I've used out of the water when it comes to actually just building stuff. Django is a fantastic boring[1] tool, and seeing boring updates like this is great. 1: http://mcfunley.com/choose-boring-technology

I have been using symfony since the 2-3 years because the product is build on symfony. Now i like symfony, because i’m not a big fan of PHP. Anybody knows how Django compares to Symfony. I have glanced through Django documentation few times and it look a little similiar. If somebody has used both frameworks, what are the main advantages of Django over Symfony?

I understand that it's played out (both as a general discussion, and as replies to your post) but PHP's shortcomings as a language are so blatant when working with any other okay general purpose language.

Community also goes a long way. Back when I dealt in PHP (+whatever framework) and switched to Django, the average competence of people I interacted with in conversations regarding the language / frameworks jumped up considerably. I like standing on the shoulders of giants.

Re: Django 2.1 released

#123
post #7

I've been working with Django for almost my whole career, since 1.1. It's a joy to use, and blows any other web framework I've used out of the water when it comes to actually just building stuff. Django is a fantastic boring[1] tool, and seeing boring updates like this is great. 1: http://mcfunley.com/choose-boring-technology

Totally agree. I've been using Django since 0.96 and it's is so mature now. Earlier they introduced so many new features... but it's now a very mature framework that doesn't really need any new features.

Re: Django 2.1 released

#124
post #78

Earlier quoted context omitted.

> an older web paradigm of constructing elaborate html pages on the server side and pushing it out and letting some basic extra js stuff augment it. Sounds like an awesome idea. > That's what lead to things like server side HTML form definition and form handling code. You make these sound like bad things. > those types of things conflict and overlap with things like React So why presume the thing to abandon isn't Rea…

The world needs more people like you. Thank you. I have a very varied workload which includes both complex web applications and content driven sites (very basic, accomplishable-by-WordPress marketing sites). I had a client move their very basic portfolio + blog site to a new developer who rewrote it from scratch. The new site has a loading / splash page before the real site displays. It's entirely JS driven and ticks…

What we have is basically worse than flash. At least nothing serious except video was strictly dependent on Flash.

Re: Django 2.1 released

#125

Earlier quoted context omitted.

I maintain a Django ecommerce site that's been running constantly since July 12, 2007 (at launch it was running against r4984, basically 0.96). Just upgraded it to 2.1 today.

Any struggle with the upgrade?

No struggle. I regularly develop and test it against Django master with loud warnings so I fix compatibility issues one at a time as they appear in Django master. I also don't use any 3rd party libraries which means I can upgrade right away.

In this cycle all I needed to tweak was something related to `use_required_attribute` on a form, and I did that back in March. I needed to add `renderer=None` to to my form field render() method, but I did that back when it was a warning in March 2017.

Re: Django 2.1 released

#126

Earlier quoted context omitted.

At work because I have lately needed to roll web server/api/admin/client apps (embellished CRUD situations with some other serverside processing to generate user output) and for those my go to for dev speed, platform speed, familiarity, and a few other concerns I generally go with Node/Express/TypeScript and it's great to work with. However for my personal site I used Django to give it a shot. Once I wrapped my head…

I develop many content-driven solutions using Django and the conclusion I've come to is that everything is trash and if it's something for your use, stick to MD. I've gone with CKEditor ( https://github.com/django-ckeditor/django-ckeditor ) for all my new stuff, for what it's worth.

Yeah that's what I ended up going with, too.

I might yet switch it out for a plain text editor and just draft all my HTML by hand like scardine has done.

But I don't exactly write a lot these days, so maybe it doesn't matter too much!

Re: Django 2.1 released

#127
post #111

Open question re: django: https://docs.djangoproject.com/en/2.1/ref/models/fields/#nul... I've got a colleague who has been using django for a couple of years (and has 15+ years experience with python outside of web, as well as java, php, arduino hacking, 3d printing, etc). He pointed me to the link above re: nulls - I can't figure out why the default would be to convert a null to an empty string. All major databases…

> An empty string is "no user supplied data" and a null is "no value has been given at all" I assume you meant "an empty string is user supplied an empty string as data". That aside, you wouldn't normally switch that option on for a field (notice the default is false). However, Oracle DB stores empty strings as indistinguishable from NULLs[0], so an ORM supporting Oracle DB may want to have some support for convertin…

> I assume you meant "an empty string is user supplied an empty string as data".

I think so - it was a bit late. But it's the diff between intentional empty value and unknown/initial value.

I still don't grok why django seems to want, by default, to ignore the concept of storing "null" in the database, and makes you jump to non-default configuration to do something which has value (seeing nulls vs empty strings means different things).

Re: Django 2.1 released

#128

Can anyone recommend a framework like Django except for a static language? I tried Django and really liked what I saw, but I can't see myself using Python for a large project.

Gobuffallo.io the guy who wrote gave a talk which you can find on youtube.

Re: Django 2.1 released

#129
post #73

Earlier quoted context omitted.

I'm a very happy ist of Pyramid. Using it professionally for various larger applications as well as for pet projects. It's very well thought through. We're providing a GraphQL and integrating it was a breeze.

I would be interested to hear about how you did pyramid and graphql, ive been following graphene but are there specific tie ins for pyramid? books? articles?

The integration is actually straight forward if you use the "graphene" library which you already looked in to. If you use SQLAlchemy, there's even a graphene-sqlalchemy binding which makes it really really easy.

Simply add a /graphql view to your Pyramid app such as:

  from cornice import Service
  from pyramid.exceptions import HTTPBadRequest

  from ..schemas import schema


  graphql = Service(
      name='graphql',
      path='/graphql',
      description="GraphQL",
      accept='application/json',
      renderer='json',
  )


  @graphql.post(permission='readwrite')
  def post_graphql(request):
      query = request.json_body.get('query')
      variables = request.json_body.get('variables', None)
      if not query:
          raise HTTPBadRequest
      return schema.execute(query, variable_values=variables, context_value={
          'dbsession': request.dbsession,
          'user_id': request.authenticated_userid,
      })
Post reply on HN