Re: Integrate a microphone in the Django app

2021-05-24 Thread Nick Sarbicki
Hi, This isn't really a Django problem to solve, it's more general than that. First you need the client to record and send an audio file of their mic recording. This is likely something you want to do in JavaScript, as it is something that they will have to do on their machine - the server does

Re: hosting django app on app engine

2020-04-23 Thread Nick Sarbicki
I've set Django up on app engine a few times and every time it's a massive struggle. App engine wasn't really designed to work well with Cloud SQL as it's not a dynamically scalable data store, it is expected that you use google datastore (or firestore nowadays) - which isn't ideal for django as

Re: Django IRC...Is it Active?

2020-03-20 Thread Nick Sarbicki
If you are just looking for help the #django channel on the python developers slack workspace (pyslackers.com) is pretty active. Full disclosure - I'm an admin of the slack workspace. - Nick On Fri, Mar 20, 2020 at 2:14 PM Andréas Kühne wrote: > Currently the django project recommends using

Re: Running 2.7 python project with python 3.7

2020-02-13 Thread Nick Sarbicki
There is no natural reason as to why the project wouldn't run in python 3.7 unless you have written it in a way that is incompatible with 3.7 I would suggest simply trying to run it in python3.7 and seeing if you have any errors. Do you have a test suite with high coverage? Run that in 3.7 - it

Re: Getting the first item in a dict

2020-01-27 Thread Nick Sarbicki
I think the real question here is why you have a dict with one item in it? If you can construct it so that this isn't the case that would be ideal. If you really can't construct it any other way then you can do something simple like my_dict.popitem()[1] to get the value of the only item in the

Re: Hosting a django website

2020-01-26 Thread Nick Sarbicki
It depends on the shared host. Shared hosts generally only have installed a set of standard tools which they decide on. This may or may not include things like python (2 or 3) and other requirements you need. A lot of the time as a result it does not prove possible to run a Django site on shared

Re: Best Django Deployment

2020-01-25 Thread Nick Sarbicki
i user Nginx/Gunicorn or Nginx/uwsgi ?? are there any > performance gain ? > > What about running Django in an Asynchronous way , i mean using django > with Asgi rather than Usgi ?? any performance gain too ?? > > On Sat, Jan 25, 2020 at 1:09 PM Nick Sarbicki > wrote: > >> I'v

Re: Best Django Deployment

2020-01-25 Thread Nick Sarbicki
I've used nginx+gunicorn/uwsgi, Apache+modwsgi, Google app engine flex, Google app engine standard, heroku, kubernetes on various cloud platforms, elastic beanstalk deployments and various others. Realistically I don't think there is a "best" way. It all depends on your environment, what you're

Re: djangorestframework vs GraphQL

2019-11-12 Thread Nick Sarbicki
GraphQL strikes me as very similar to NoSQL. Useful in niches but the older standard is better in general. I've tried both and the added complexity (designing a system to generate all required data from a single request) of GraphQL for the, seemingly minor, gain (a single request for all your

Re: How t do Login using Gmail, twtter or facebook

2019-11-11 Thread Nick Sarbicki
I generally like to implement things like Google auth myself, as it's not too complex and down the line it often makes things easier (e.g. you can easily use a single backend for both a web login and an API login). Google provide plenty of guides on this for their setup e.g:

Re: Microservice with django

2019-11-08 Thread Nick Sarbicki
There is not really anything that requires doing to make Django work with microservices or as a microservice. It is completely agnostic to your overall architecture. Just simply create a new django project for each microservice you want to create. There honestly is nothing else to it. - Nick

Re: Django Rest Framework and Django allauth

2019-10-15 Thread Nick Sarbicki
There is https://django-rest-auth.readthedocs.io/en/latest/introduction.html which goes some way to integrating the two. Depending on how your authenticating - e.g. if you are using OAuth2, I generally found allauth and rest auth got in the way more often then they were helpful and building some

Re: Docker

2019-10-14 Thread Nick Sarbicki
gards > Vineet Daniel > Cell : +918527565696 > Websites : Blog <http://vineetdaniel.blogspot.com> | Linkedin > <http://in.linkedin.com/in/vineetdaniel> | Twitter > <https://twitter.com/vineetdaniel> > > > > > On Mon, Oct 14, 2019 at 2:40

Re: Docker

2019-10-14 Thread Nick Sarbicki
om> | Linkedin > <http://in.linkedin.com/in/vineetdaniel> | Twitter > <https://twitter.com/vineetdaniel> > > > > > On Thu, Oct 10, 2019 at 10:13 PM Nick Sarbicki > wrote: > >> Don't use git inside the container, this is not the standard way of doi

Re: Docker

2019-10-10 Thread Nick Sarbicki
Don't use git inside the container, this is not the standard way of doing things. Docker has its own guide for using django with compose. This works fine for a single server setup: https://docs.docker.com/compose/django/ - Nick On Thu, Oct 10, 2019 at 5:09 PM vineet daniel wrote: > Use git

Can Django support chunked file uploads without a Content-Length header?

2019-10-02 Thread Nick Sarbicki
I'm working on a Django API which receives audio files and some extra POST data and then processes the file. This was initially in Flask, but Django suits the overall project better so we're migrating. However we've run into a snag. Currently the audio file is sent via node.js, with the

Re: best option for Front End Design in Django

2019-09-26 Thread Nick Sarbicki
Honestly whilst everyone is recommending react/angular etc. I'd argue these are probably the worst places to start. It assumed a lot of up front knowledge and ability in web design. Balaji has strongly suggested that they don't have a good grasp of the basics yet, HTML, CSS and vanilla

Re: convert python 3 to python2

2019-09-24 Thread Nick Sarbicki
I'm not convinced anyone could pay me enough to go back to Python 1... On Tue, Sep 24, 2019 at 1:32 PM Larry Martell wrote: > You can get anyone to do anything for enough money. > > On Tue, Sep 24, 2019 at 8:30 AM Deep Sukhwani > wrote: > > > > Thanks for the prompt reply. Did a quick cursory

Re: Slack community for Django

2019-07-17 Thread Nick Sarbicki
Cheers for the feedback Deep, Sadly given the scale of the current community it would cost up to around 1.6 million USD per year to use enterprise slack. I know some OSS communities have this enabled for free, slack has been approached about this but have sadly declined to give pyslackers the

Re: Slack community for Django

2019-07-17 Thread Nick Sarbicki
Hi Deep, I'm not sure if there is currently a dedicated django community (there was an unofficial one but I believe it was converted into the yellow ant community). We do however have a dedicated python community with a very active Django channel. It's linked on the PSF site here:

Re: Deploying a static website

2019-07-04 Thread Nick Sarbicki
The best way to deploy a static website is certainly on a bucket like s3. Heroku is massive overkill for this. Django is also unnecessary to host a static website. I do have a CMS that generates and uploads static websites built with Django, but not django actually hosting the site. On Thu, 4

Re: advantage of angular js with django??

2019-06-01 Thread Nick Sarbicki
> The biggest advantage is you can create, change or have multiple frontend systems on different platforms without having to make changes to your Django backend. For example you can create an AngularJS web app and a React Native app for iOS using the same Django backend. It's worth noting that

Re: how i can become django master ?

2019-05-31 Thread Nick Sarbicki
https://docs.djangoproject.com/en/2.2/intro/overview/ - Nick On Fri, May 31, 2019 at 12:10 PM soroush safari wrote: > hello guys. where I need to start reading Django and her reference? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group.

Re: set python 3.6.8 default in my ubuntu

2019-05-22 Thread Nick Sarbicki
Hi Omar, It is generally recommended to _not_ set python3 as your system default. This is stated in PEP 394 . The reasoning being there may be internal and third party processes which still expect the default python

Re: How to make Django Project Mobile Compatible

2019-05-11 Thread Nick Sarbicki
Hi, Django is completely naive to whether a frontend is mobile friendly or not. You can use react or angular, you can also use many other frontend frameworks. Django can work with all frontend frameworks. The choice is entirely up to you. On Sat, 11 May 2019, 08:04 Balaji Shetty, wrote: > Hi

Re: Website slowed down drasticaly

2019-05-06 Thread Nick Sarbicki
Hi Saurabh, If the diminishing support was a cause of the dramatic slowdown then this would have had to be intentionally put into the codebase. I'm almost certain this isn't the case. All losing support really means is that the developers no longer provide updates and security patches. There

Re: Website slowed down drasticaly

2019-05-03 Thread Nick Sarbicki
Saurabh what do you use for the WSGI HTTP Server (gunicorn etc.)? Worth checking that as well to make sure it has enough workers. In general performance problems are rarely version related. Usually it's either a bad setup or inefficient code. Django toolbar and most of the other suggestions will

Re: Which Cloud Service Provider should be chosen to host Django Application

2019-05-02 Thread Nick Sarbicki
Hi Balaji, I've used many cloud providers to host Django applications, they all work fine. They all have varying feature sets, pricing, levels of ease and documentation. So it really isn't for any of us to tell you which provider to use. They all work, you just have to research them and find

Re: Django with Docker

2019-04-29 Thread Nick Sarbicki
Hi Omer, Docker actually has docs on this itself: https://docs.docker.com/compose/django/ - Nick On Mon, Apr 29, 2019 at 4:19 PM Omer Ozsakarya wrote: > Hello all, > > How are you deploying your Django applications with Docker? > 1- Which packages, libraries are you writing into docker

Re: help

2019-04-29 Thread Nick Sarbicki
Hi Tosin, The assignment tag was deprecated in 1.9 and removed in 2.0. The details for this are here: https://docs.djangoproject.com/en/2.0/releases/1.9/#assignment-tag Basically it has been replaced with simple_tag. You should read the docs for that here:

Re: Converting django app to iPhone app

2019-04-22 Thread Nick Sarbicki
22 Apr 2019, 17:28 Larry Martell, wrote: > Yes, it only renders HTML and also has a lot of javascript. > > On Mon, Apr 22, 2019 at 12:25 PM Nick Sarbicki > wrote: > > > > That's the point, you don't. Assuming your backend has an effective way > of delivering data (e.g

Re: Converting django app to iPhone app

2019-04-22 Thread Nick Sarbicki
swift or rewrite > the entire app in objective C or swift. Why would you need to rewrite > the python back end that runs on the server? > > On Mon, Apr 22, 2019 at 10:27 AM Nick Sarbicki > wrote: > > > > Kind of... > > > > I've worked with several Django APIs

Re: Converting django app to iPhone app

2019-04-22 Thread Nick Sarbicki
Kind of... I've worked with several Django APIs that we use to back apps on Android and iOS as well as web apps. I generally find that's the key, make sure you can pass all the data along as an API and the rest is just understanding how to build a frontend on the platform. Django doesn't really

Re: Nullable vs empty strings

2018-05-03 Thread Nick Sarbicki
eering.stackexchange.com/questions/32578/sql-empty-string-vs-null-value >> >> Ken >> >> >> On Thursday, May 3, 2018 at 5:17:35 AM UTC-4, Nick Sarbicki wrote: >>> >>> I just saw this in the docs: >>> https://docs.djangoproject.com/en/2.0/ref/models

Nullable vs empty strings

2018-05-03 Thread Nick Sarbicki
I just saw this in the docs: https://docs.djangoproject.com/en/2.0/ref/models/fields/#null Suggesting that you should never set a CharField to null unless using a unique index. Is this generally accepted? Historically I've always nulled a CharField because using empty strings, as opposed to

Re: javascript transpilers

2018-01-29 Thread Nick Sarbicki
>> Jani asked what problem I need to solve. Without going into analytical >> detail, all the code is serverside and now the project needs to move >> towards AJAX for user experience reasons. >> >> M >> >> On 29/01/2018 5:44 AM, Nick Sarbicki wrote: >>

Re: javascript transpilers

2018-01-28 Thread Nick Sarbicki
Agree with everything already said. Only thing I want to add is that while js has historically been a horrible language, the modern standards have helped rectify this. Modern js can be almost pleasant to work with nowadays. I wouldn't spend time transpiling python to js. Just try to learn js and

Re: django 2 under python 2

2018-01-25 Thread Nick Sarbicki
Looks like a pypi "feature". You should pin your dependencies. On Fri, 26 Jan 2018, 00:08 Mirek Zvolsky, wrote: > Isn't the question a little oposite, Avraham ?? > > > > Dne čtvrtek 25. ledna 2018 22:42:37 UTC+1 Avraham Serour napsal(a): >> >> > I wonder why this is

Re: [python-uk] Setting up Django on Google Cloud (basic server)

2018-01-25 Thread Nick Sarbicki
There was a discussion on a slack channel a few days ago with someone who, suspiciously, had the same name and problem. They'd tried to set up firewall rules (not sure they worked) and was trying to get it running via port 80 with gunicorn. Haven't heard anything else so assuming fixed. On Thu,

Re: Will django include a simpler way to change username to email for registration in the future ?

2018-01-24 Thread Nick Sarbicki
django allauth (http://django-allauth.readthedocs.io/en/latest/overview.html) also has a pretty good setup for this as well as a lot of other functionality. As suggested it just takes a change in settings.py to move to email as username (although it isn't stored that way in the DB that is how it

Re: Setting up Django on Google Cloud (basic server)

2018-01-20 Thread Nick Sarbicki
Hi Samuel, You probably haven't opened access to port 8000 to the public Try run server on port 80. Nick. On Sat, 20 Jan 2018, 14:53 Samuel Muiruri, wrote: > I had this issue before with AWS i remember it was just as stressful then > and actually can't remember what

Possible bug with UploadedFile and form validation?

2016-06-13 Thread Nick Sarbicki
I've got an odd bug in my system, and while I'm not 100% convinced it is a Django bug, I don't think it is due to me either so thought I'd ask here for some clarification. Essentially if you upload a file to a form. If that forms clean() method reads that file (in my case it gathers data and

Re: how to create a project in django in windows 7

2015-09-15 Thread Nick Sarbicki
> > I am a fresher to django... can any one explain me how to install django. > and what all are the requirement needed. I tried by searching google still > am not able to do it. So any one please help me. > Tank you. Hi Santhosh, Have you installed Python? (2.7 or 3.4 is best right now - 3.5

Re: Debugging Django using Pycharm

2015-09-15 Thread Nick Sarbicki
> > Hi Team, > > This is Prabhu just started using Django. > > I would like to know how to debug the code by attaching django application > which is running on server. > > Please share the Pycharm Setting and Steps to be followed. > > If you are recommend any other debug tool that too ok for me. >

Re: Best Django Open Source Project for Intermediate Django Learners

2015-09-01 Thread Nick Sarbicki
You could make a project yourself. I always found the best way to learn a new skill was to jump in after the basic tutorials and start building something. Do you not have any ideas for things you'd like to make? Even if they're copies of something else. You could do something simple like a blog,