Re: E-comm live project

2024-03-18 Thread Andrew Daud Hutahaean
Please add me also, i am interested. my whatsapp: +6282216185302 On Mon, Mar 18, 2024 at 6:34 PM Sang wrote: > Looks interesting. I'm on WhatsApp @ 9937826218. Please let's catch up > there. > > On Mon, Mar 18, 2024, 22:56 1001_prabhjot Singh > wrote: > >> so i am working on a full stack

Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-19 Thread Andrew Tola
I am interested On Mon, Feb 19, 2024, 9:33 AM Theresa Taye wrote: > I am interested > > On Sun, Feb 18, 2024, 5:48 PM SURAJ TIWARI wrote: > >>  Join Our Django WhatsApp Bulk Messaging Project! >> >>  Hello everyone, >> >> Are you looking for an exciting opportunity to gain hands-on

Looking to help recruiters and job candidates

2023-06-26 Thread Andrew Wang
Hey Djangonaughts! I'm looking to build a tool for recruiters to get candidates interviews faster by streamlining recruiters' processes. Would greatly appreciate any connects. Also, if you're looking for a software engineering role (with at least 1 prior company experience for validation),

Re: Seeking Django Unpaid Internship Opportunity in the USA

2023-06-26 Thread Andrew Wang
Happy to chat: and...@lazify.ai On Wednesday, June 21, 2023 at 4:16:58 PM UTC-4 Karthik wrote: > Hello > > I hope this email finds you well. My name is Karthik Hosur, and I am > writing to express my interest in securing an unpaid internship opportunity > in Django development. I have been an

Re: Add single object(most recent) from foreign key relationship to django queryset

2023-05-13 Thread Andrew Kos
Could you do a separate query or use select_related() to retrieve the most recent comment then combine the two in your table building logic? You're going to be constrained by the structure of the models anyways and so will probably have to make a couple queries to the DB. On Friday, May 12,

Re: Django Admin

2023-03-13 Thread Andrew Romany
It's very simple you should add it in the login/register html page but inside the tag after & to be specific after this above line. On Mon, 13 Mar 2023, 11:15 a.m. James Hunt, wrote: > I have yet to create a HTML page so I'm not sure that the inclusion of {% > csrf_token %} is required. I

how to initialize input form fields using URL parameters

2023-01-22 Thread Andrew Brown
I am trying to pass initial values to my form set via URL Query ex) Localhost:8000?/First_name_id_0=Samuel [image: forms.py.png] I was told to use the initial parameter and not the instance in my view first "An inline formset is related to one instance of the parent model. You identify

Re: missing field after makemigrations

2022-06-20 Thread andrew snyder
Thanks, that did the trick. Should I make a feature request that django throw an error whenever a field type has no real type? >>> type(models.SmallIntegerField()) >>> type(models.SmallIntegerField) On Monday, June 20, 2022 at 10:53:37 AM UTC-4 moheb@gmail.com wrote: > Hi, > The reason

Re: i am facing problem with my project to update data in mysql using django

2022-06-20 Thread andrew snyder
can you conform that database user has permissions to update data in all three databases using a mysql client? On Thursday, June 16, 2022 at 12:02:00 PM UTC-4 rafiurra...@gmail.com wrote: > here is my problem description link in stackoverflow > if anyone can help me, i will be gratefull > >

missing field after makemigrations

2022-06-20 Thread andrew snyder
There is something in my models.py that breaks makemigrations. The field "rank" is missing from "CharacterSkill". Also, if I uncomment any of the three classes that refer to "Character" the "game" and "player" fields become separate items in the migrations file. -- You received this message

OperationalError at /admin/login database or disk is full

2022-05-27 Thread Andrew Rea
or disk is full Is this because my SQLite database is full from other projects? Or possibly because I have too many virtual envs from those same other projects? *Or* is it due to my personal computer's disk being too full? Thank you in advance, Andrew S. Rea -- You received this message because you

Re: Async Help Needed

2021-08-12 Thread Andrew Godwin
The example you presented should Just Work - that error generally only occurs if you return an un-awaited coroutine, which if you're just returning a response, should be impossible. What version of Python and Django are you running? Andrew On Thu, Aug 12, 2021, at 11:03 AM, Steven Mapes wrote

Re: register_converter doesn't work with ASGI

2021-06-20 Thread Andrew Godwin
ult in you blocking the async thread while the ORM query runs, which would be disastrous in production. My apologies for not getting this in for the original async view patch - I had forgotten converters ran in the URL resolver. Andrew On Sat, Jun 19, 2021, at 12:31 AM, konstanti...

Re: Daphne raises Internal Server Error when accessing static files from development server

2021-04-06 Thread Andrew Godwin
This is probably this error: https://github.com/django/asgiref/issues/251#issuecomment-814337170 - I'm going to switch the error to a warning and we'll see if that helps, then Daphne can have a fix added at a non-emergency pace. Andrew On Tue, Apr 6, 2021, at 12:19 PM, kradem wrote

Re: Daphne raises Internal Server Error when accessing static files from development server

2021-04-06 Thread Andrew Godwin
The tracebacks are there somewhere, you might have to look at the raw HTTP response in the browser to see them. Andrew On Tue, Apr 6, 2021, at 10:18 AM, kradem wrote: > I'm afraid a "success" was caused by the browser cache or something similar, > the 3.3.3 version doesn'

Re: Daphne raises Internal Server Error when accessing static files from development server

2021-04-06 Thread Andrew Godwin
Aha, glad to hear it! My apologies that we didn't catch that one before release yesterday. Andrew On Tue, Apr 6, 2021, at 10:01 AM, kradem wrote: > Stop the press!! The 3.3.3 version is published in PyPi and after installing > it it all works well! :) > > Thank you! > Dana uto

Re: Daphne raises Internal Server Error when accessing static files from development server

2021-04-06 Thread Andrew Godwin
? Andrew On Tue, Apr 6, 2021, at 9:56 AM, kradem wrote: > Thank you very much for a quick response. > > Yes, that's the problem: > > asgiref 3.3.2 > > When I downgrade it to 3.3.1 Django complains ("django 3.2 requires > asgiref<4,>=3.3.

Re: Daphne raises Internal Server Error when accessing static files from development server

2021-04-06 Thread Andrew Godwin
This may be related to https://github.com/django/asgiref/issues/251 - what version of asgiref are you running? Andrew On Tue, Apr 6, 2021, at 9:43 AM, kradem wrote: > > 500 Internal Server Error > > Exception inside application. > > Daphne > > This error raises every

Re: Patreon and Django-AllAuth Integration

2020-10-30 Thread Andrew Stringfield
You guys are awesome! I will try these solutions later this evening. On Wednesday, October 28, 2020 at 11:30:56 PM UTC-4 oladipo...@gmail.com wrote: > Hello Sir, > You need to set the LOGIN_REDIRECT_URL in your settings.py file. > > On Mon, Oct 26, 2020, 8:47 PM Andrew Stringfie

Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
I would not be shocked. On Wednesday, October 28, 2020 at 9:55:15 AM UTC-4 Ryan Nowakowski wrote: > The patreon error you're seeing might be a different redirect URL than the > login redirect URL. i.e. these may be two different problems. > > > > > On October 28, 2020 6

Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
I almost forgot. I have checked my settings in Django and Patreon and the URL redirect matches for all that I can see. I have an idea to try and use the testing framework to see what values I am passing to Patreon. On Wednesday, October 28, 2020 at 7:53:42 AM UTC-4 Andrew Stringfield wrote

Re: Patreon and Django-AllAuth Integration

2020-10-28 Thread Andrew Stringfield
Ryan Nowakowski wrote: > On Mon, Oct 26, 2020 at 12:16:03PM -0700, Andrew Stringfield wrote: > > Hello all, > > > > I am trying to use Patreon's API Version 2 with Django 3.1. I > > read: https://docs.patreon.com/#third-party-libraries and found that >

Re: Patreon and Django-AllAuth Integration

2020-10-26 Thread Andrew Stringfield
; Do you want to use Patreon as a login account provider or do you want to > do something else? > > Regards, > > Andréas > > > Den mån 26 okt. 2020 kl 20:47 skrev Andrew Stringfield < > thefund...@gmail.com>: > >> Hello all, >> >> I am trying to

Patreon and Django-AllAuth Integration

2020-10-26 Thread Andrew Stringfield
Hello all, I am trying to use Patreon's API Version 2 with Django 3.1. I read: https://docs.patreon.com/#third-party-libraries and found that Patreon supported the django-allauth library. I installed the library by following the instructions of:

Shouldn't there be a library already for how to render your JS Frontend code into HTML and then insert your Django templates with jinja2 very easily?

2020-06-18 Thread Andrew
d make it happen... If enough attention comes by for a better idea, I'd love to help collaborate! My GitHub page: https://github.com/Andrew-Chen-Wang -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Channels/Daphne offloading SSL Certs to AWS ELB fails to establish socket

2020-04-21 Thread Andrew C.
I’m about to create a PR (or not, not sure) with an AWS ALB setup for cookiecutter django. The gist of it really is that there’s an article my msaizar that has a good nginx configuration setup. Remove traefik and add nginx. Your target group in AWS should have all machines registered on port 80

Re: i want to change database sqllite to mysql but show error

2020-04-12 Thread Andrew Fetting
Have you tried pip3 install mysqlclient On Sun, Apr 12, 2020, 7:36 AM Arun Sharma wrote: > python manage.py runserver > > > > Watching for file changes with StatReloader > Exception in thread django-main-thread: > Traceback (most recent call last): > File >

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-11 Thread Andrew C.
What’s the HTTP status code? Does the nginx page even show anything? Try: sudo systemctl stop nginx && sudo systemctl disable nginx && sudo systemctl enable nginx && sudo systemctl start nginx This command could also be in the wrong order... it’s been awhile. It could be a symbolic link error.

Re: In pycharm errror

2020-04-10 Thread Andrew Fetting
Sounds like you are on file too deep. manage.py should be in {project name}\manage.py, not {project name}\{project name}\manage.py. Hope that helps. On Fri, Apr 10, 2020 at 5:23 PM Jatin Agrawal wrote: > Can you please post an image of your directory structure? Maybe then I or > someone else

Re: How to Setup DjangoRestFrameWork with Mongo DB

2020-03-28 Thread Andrew C.
I highly recommend not using MongoDB. Sure, they can plaster a banner saying “Google supports us” but many industry leaders have tried and failed using it. It can’t store data that easily once you grow, making it unlikely for usage in the future for employment by any startup or corporation and for

Re: Online money transfer

2020-03-27 Thread Andrew C.
Stripe is the best imo On Fri, Mar 27, 2020 at 12:49 PM Motaz Hejaze wrote: > Any ideas guys > > On Fri, 27 Mar 2020, 3:07 pm Motaz Hejaze, wrote: > >> Hi friends , >> What is the best and easiest way to implement money transfer from visa to >> visa and from visa to bank account ?? >> And how

Re: AWS API or EC2 for chat?

2020-03-24 Thread Andrew C.
Hejaze wrote: > That was unexpected , i thaught about using python module socketio > > On Wed, 25 Mar 2020, 5:08 am Andrew C., wrote: > >> The only hint I can freely provide is to use celery tasks. They let you >> do taskname.delay(pk_user1, for_chat_pk). You can look

Re: AWS API or EC2 for chat?

2020-03-24 Thread Andrew C.
The only hint I can freely provide is to use celery tasks. They let you do taskname.delay(pk_user1, for_chat_pk). You can look online for an article with the url dev.to to setup your asgi.py file. That’s all I can freely give out, though. Good luck! On Tue, Mar 24, 2020 at 10:40 PM Motaz Hejaze

Re: write a new app

2020-03-19 Thread Andrew C.
If you want to avoid web frontend, then stick to mobile app development. DRF as someone else mentioned helps. I recommend front end development because they have guidelines and make thing easier to implement (iOS is much much easier). You can’t make a usable app without doing both frontend and

Re: Django channel and gunicorn

2020-03-19 Thread Andrew C.
Install uvicorn. Easy integration with gunicorn. There’s a good article about how to setup your Djsngo 3.0 async websocket app online too now. On Thu, Mar 19, 2020 at 3:32 AM Suraj Thapa FC wrote: > You can't use gunicorn with django channels... > Use Daphne or uwsgi etc > > On Wed, 18 Mar

drop image in div and add path to db

2020-03-12 Thread Andrew Fry
Hi all... newbie here. I have jQuery drag 'n drop working for a web app but cannot seem to figure out how to get the path of the dropped image uploaded to my db.sqlite3 database. What do I need to provide to get some help. Thanks in advance. -Andrew -- You received this message because you

Re: Channels, daphne, and asgiref, oh my!

2020-02-21 Thread Andrew Godwin
Hi Larry, Your problem is the Python version - 3.5 is somewhat old (but most importantly, was still a very rough release for asyncio) and isn't supported by any current release of asgiref/channels for that reason. If you are able to upgrade that, I very much recommend it. Andrew On Sat, Feb 22

Re: is there a WYSIWYG for Django

2020-02-08 Thread Andrew C.
Try Quill.js. If you google Quill.js and Quill.js Django, I believe you'll find the Django package that goes along with that text editor. Really, you only need the Quill.js code for your template. WYSIWYG is just a user typing in HTML without realizing it. Just save the HTML (because the rest is

Re: JSONField() ordering and removing latest

2020-02-04 Thread Andrew C.
Usually, something that has multiple versions could be in an autoincrement field as the primary key. Then, in a JSONB field with GIN index (since you’re using PostgreSQL), you would have a dict of each version, like this: { “1”: { # beginning of article 1 “versions”: { “1”: { “title”: “Blah1”,

Re: DjangoEveryDay. My practice website!

2020-01-29 Thread Andrew C.
n > workflow or stack — of learning in CS. “ > "tying in what you know, how you behave," You mean like do some projects > for my own area? > > > 在 2020年1月21日 於 上午12:47:09, Andrew C. (andreke12...@gmail.com) 寫下: > > What is your major? Usually tying in what you know, h

Re: DjangoEveryDay. My practice website!

2020-01-29 Thread Andrew C.
ow you think contributes to a certain type — or even > workflow or stack — of learning in CS. “ > "tying in what you know, how you behave," You mean like do some projects > for my own area? > > > 在 2020年1月21日 於 上午12:47:09, Andrew C. (andreke12...@gmail.com) 寫下: > >

Re: open source advice needed

2020-01-29 Thread Andrew C.
Hi Kimberly, I’ve taken a look at your preschool and school program, SNACS. Early in my teen years, I helped set up [certain state in US] for an educational bounce-back from zero funding to minimal, but the kid’s passions returned. Django is a website framework, and I don’t think that’s what

Re: open source advice needed

2020-01-28 Thread Andrew C.
Hi Kimberly, Django is mostly for website development. If you can tell us a little bit about your model and some plans, that would be great. I’d love to help another Harvard student in their endeavors since many give up after graduating grad school (especially those undergrads...). Again, let us

Re: DjangoEveryDay. My practice website!

2020-01-20 Thread Andrew C.
What is your major? Usually tying in what you know, how you behave, and importantly how you think contributes to a certain type — or even workflow or stack — of learning in CS. On Mon, Jan 20, 2020 at 1:52 AM Jack Lin wrote: > I’m not sure what this gonna be in the future. I think I’m just

Re: Correct Design: one app depending on another app

2019-11-20 Thread Andrew C.
I’m not sure what you mean by content management, so I’m gonna take a guess: website builder like Weebly or Wix. You need a NoSQL database, completely unstructured data. Kind of like a crime file drawer with folders dedicated to each case and all its evidence. Some folders only have one piece of

Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
I have not! I did see something about that on a website. Would it go something like: dictionary_name.fieldname.0 ? I will try it out later today. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
Okie-dokie. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit

Re: Directly Accessing Dictionary Values

2019-11-20 Thread Andrew Stringfield
}} {% endfor %} and just have: {{ unique_key_object.filename }} On Tuesday, November 19, 2019 at 10:59:07 PM UTC-5, Suraj Thapa FC wrote: > > Return the unique key object... Like > return render(request, 'abc.html',unique_key) > > On Wed, 20 Nov 2019, 9:18 am Andrew String

Directly Accessing Dictionary Values

2019-11-19 Thread Andrew Stringfield
Hello all, I am trying to access Dictionary values directly. Here is my view: def unique_key_query(request, unique_key): unique_key_object = simpleformmodel.objects.all().filter(id=unique_key) context = {'unique_key_object': unique_key_object} return

Re: Channels 2 using asyncio run_in_executor

2019-10-18 Thread Andrew Godwin
It should be fine, but you will need to be careful - there's a lot of side-effects with run_in_executor you should be aware of like the way exceptions propagate (Django won't handle them right for you) and the possibility of deadlock. Andrew On Fri, Oct 18, 2019 at 11:27 AM BR wrote: > Sho

Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-15 Thread Andrew Godwin
SyncConsumer isn't async - it runs inside a separate synchronous thread. You'll need to get the event loop from the other thread and use call_soon_threadsafe instead! Andrew On Wed, Aug 14, 2019 at 6:59 PM Dan Merillat wrote: > > I have an application that's 99% using the ORM and databas

Re:

2019-08-10 Thread Andrew C.
I suppose in a view, you can write something along these lines: import json from os import path from django.conf import settings def index(request): if request.method == ‘POST’: form = YourForm(request.POST) if form.is_valid(): field1 =

Re: How to build users tagging system in my comment textarea.

2019-08-10 Thread Andrew C.
You would probably need AJAX calls. I think there’s a package called Django-autocompletelite which can help you with this. So, in your HTML, you can use use AJAX to see when a user types the @ character with a single letter and then show a box with some usernames with that. On Sat, Aug 10, 2019

Re: Django models and json integration

2019-08-10 Thread Andrew C.
Two options: 1) Save the JSON files and link it with a FileField 2) Use PostgreSQL’s Django-specific JSONField. On Sat, Aug 10, 2019 at 9:46 AM Suraj Thapa FC wrote: > How can I linked a JSON file with my db... Json files contains the key > value pair of the user data.. > If the id in the db

Re: Only for specific region

2019-07-29 Thread Andrew C.
https://pypi.org/project/django-ip-restriction/ Try just searching up “Django ip restrict” or “django ip restriction” or “django ip block” There are plenty of options out there. As for why this might be needed, you can blame China with all these bot attacks on websites :P It can also be for other

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-08 Thread Andrew Godwin
The bug was only on Python 3.5. It's possible the other system was 3.6 or 3.7? Andrew On Sun, Jul 7, 2019 at 9:48 AM Rohit Chopra wrote: > Hi Andrew, > > Just a small doubt, why same code is working on my local system. > Both local and server have same version of requiremen

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Andrew Godwin
Hi Rohit, This is my fault - we made a change in the "asgiref" library that inadvertently removed Python 3.5 support. Channels still needs to support it (even though Django doesn't). If you update to asgiref 3.1.4, which I've just released, that should fix the issue. Andrew On Sun, J

Re: Django User model

2019-06-24 Thread Andrew C.
Like a profile? Try this: https://simpleisbetterthancomplex.com/tutorial/2016/11/23/how-to-add-user-profile-to-django-admin.html On Mon, Jun 24, 2019 at 9:13 AM AMOUSSOU Kenneth wrote: > Hi everyone, > > Is it possible to create different class that will extend the `User` base > class with

Re: Internal Ranking System Application

2019-06-24 Thread Andrew C.
Np! https://docs.djangoproject.com/en/2.2/ref/models/fields/#floatfield Just refer to the docs. There’s FloatField and DecimalField for models. When you show the numbers in views, just use python to round the numbers. There are plenty of tutorials and SO (stackoverflow) questions that’ll help.

Re: Internal Ranking System Application

2019-06-24 Thread Andrew C.
Gotcha. I’ll try my best to explain what you could try. And if this looks sloppy, then I’ll make a public gist. So, firstly, let’s set some things straight. A database is a collection of tables. Models in Django represent one table with multiple columns. Tables do not need to have the same

Re: Can we create a Rest Api in Django which can able to communicate with multiple databases(Relational, Non relational) dynamically. If yes please recommend me a way to do that

2019-06-23 Thread Andrew C.
There really isn’t any point in doing that. 1) You should just use one of the two. Django officially supports Postgres. 2) You’d want to keep your users all jumbled in one database. If you have a foreign key to the username field, and the db can’t find a specific user because it’s in the other db,

Re: How to use permissions on a CreateView class?

2019-05-30 Thread Andrew C.
Sorry. Info ISN’T saved on private browser On Thu, May 30, 2019 at 7:25 PM Andrew C. wrote: > Try clearing your browser history and info. Should also test in Incognito > or Private browser so info is saved. I have a suspicion that your browser > is saving login info and yo

Re: How to use permissions on a CreateView class?

2019-05-30 Thread Andrew C.
Try clearing your browser history and info. Should also test in Incognito or Private browser so info is saved. I have a suspicion that your browser is saving login info and you’re just not realizing this. On Tue, May 28, 2019 at 5:54 PM Fellipe Henrique wrote: > Hi Jim, > > Tried that, as you

Re: deploy to Heroku " collectstatic --noinput "

2019-05-27 Thread Andrew C.
Follow a tutorial. 1) Hide your secret key and everything secretive in an environment variable. Or use Django-environ 2) Try python manage.py check —deploy 3) Debug is set to True... it should not be True if you’re publishing (deploying) On Mon, May 27, 2019 at 3:46 PM omar ahmed wrote: > i

Re: AutoField

2019-05-26 Thread Andrew C.
Probably because you have two AutoFields. You can’t have two in the same model. Set this to eid=models.AutoField(primary_key=True) This is because Django models automatically makes an id autofield primary key if nothing else is set as pk. On Sun, May 26, 2019 at 9:05 PM Bob Gailer wrote: > On

Re: Run Daphne as non-root on low ports

2019-05-02 Thread Andrew Godwin
In this case "reference server" merely refers to it being the place where new features and specs are implemented and tested first, rather than being the best production-capable one. I would say uvicorn is probably the best ASGI server out there right now for performance. Andrew On

Re: Run Daphne as non-root on low ports

2019-05-02 Thread Andrew Godwin
a reverse proxy to terminate SSL, which is what Daphne is built assuming (the SSL support in there is because it comes for free with Twisted, rather than being specifically added). Andrew On Thu, May 2, 2019 at 6:32 AM BR wrote: > I'm running a simple Django/Channels website using Daphne. Traf

Re: how handle high incoming data and sending throttled data to web sockets in django-channels

2019-01-14 Thread Andrew Godwin
coming in from multiple sources, or do your own work queue if it's a single source and you can't process them fast enough. Andrew On Mon, Jan 14, 2019 at 7:31 AM Sahil Mangotra < sahil.mango...@utradesolutions.com> wrote: > I am facing a problem in my django web server. > > We ar

Re: channels and https

2018-12-28 Thread Andrew Godwin
You should use an ASGI server (uvicorn/daphne) with an SSL-terminating server (e.g. nginx) in front of it and proxying to it. Django-sslserver is a WSGI-based server and so can't support WebSockets. Andrew On Tue, Dec 25, 2018 at 4:44 PM wrote: > How can I use channels with ht

Re: Django channels communication not asynchronous

2018-12-28 Thread Andrew Godwin
. If you don't want to deal with all of this, use the SyncConsumer variants of everything and/or normal django views which will safely run stuff in threads for you. Andrew On Mon, Dec 24, 2018 at 7:24 PM Akshay Surya wrote: > Sorry for that Actually in my code I did use await before s

Re: Django channels communication not asynchronous

2018-12-24 Thread Andrew Godwin
You appear to have missed an "await" before "self.send" - could that be the cause? In general, the best thing to do if things seem to "block" is to set the environment variable PYTHONASYNCIODEBUG=1 and Python will warn you if anything blocks for too long and seem

Re: Error when installing channels

2018-12-24 Thread Andrew Godwin
This is a general problem with installing compiled Python packages on Windows. You'll need to install the compiler as outlined here: https://wiki.python.org/moin/WindowsCompilers (or search for "python visual c++ 14") Andrew On Sat, Dec 22, 2018 at 11:23 AM shiva kumar wrote: > H

Re: Error of channels

2018-12-17 Thread Andrew Godwin
I've seen a lot of people have a similar error but I'm never sure what causes it - that said, I generally advise them to check their Redis logs to see if Redis is OK, as that could cause this? Andrew On Mon, Dec 17, 2018 at 11:36 AM wrote: > I had an error while build a chatroom useing dja

Re: Channels: development issue with multiple daphne workers

2018-11-27 Thread Andrew Godwin
there. I suggest you remove fd=0 and see if that then works with multiple processes. Andrew On Mon, Nov 26, 2018 at 3:10 PM Zhiyu (Drew) Li wrote: > Hi there, > > I am trying to migrate a tornado project to django channel2. I have moved > all essential parts and wired them u

Re: difference between class based view and function based view

2018-11-21 Thread Andrew Pinkham
view decorators!). If you're not sure, start with a FV, and then switch to a CBV or GCBV if appropriate (as complexity goes up or when you realize you can use a GCBV). Hope that helps, Andrew https://jambonsw.com https://django-unleashed.com -- You received this message because you are subscribed

Re: Django with Channels 2.1.1 Error During WebSocket handshake 404

2018-11-16 Thread Andrew Godwin
You cannot use gunicorn to run WebSockets or other async code - you need an ASGI server, like Daphne or uvicorn. Switch to one of those and it should start working. Andrew On Fri, Nov 16, 2018 at 8:11 PM Robert Fox wrote: > I am working on a project using Django and Channels 2.1.1. Everyth

Re: Channels + django-tenants

2018-11-14 Thread Andrew Godwin
is currently only one maintainer, any increase in surface area is unlikely unless there's a very good reason. Channels' auth stuff is just standard Django code + settings for the most part, so there's already bits you can reuse to do most of the work. Andrew On Tue, Nov 13, 2018 at 3:00 PM wrote

Re: Channels + django-tenants

2018-11-13 Thread Andrew Godwin
What sort of hook would you be imagining? The DB connection stuff is deep inside Django itself, rather than in Channels, so I'm not sure what sensible top-level thing we could provide that would make sense. Andrew On Tue, Nov 13, 2018 at 2:16 PM wrote: > Django-tenants is a package to prov

Re: Channels group_send hangs in extrenal process

2018-11-13 Thread Andrew Godwin
I've never tried using the async-to-sync stuff with multiprocessing - first, I'd try removing that and see if it still works (just run from a management command or script directly). If it still fails, I'd suggest running a redis MONITOR to see if any traffic makes it to Redis at all. Andrew

Re: Channels: Test case fails on async.sleep(X>0)

2018-11-13 Thread Andrew Godwin
and it'd hang forever! Andrew On Mon, Nov 12, 2018 at 3:43 PM Zhiyu (Drew) Li wrote: > Hi there, > > I was trying to write a test for a consumer. It is just a very simply > AsyncHttpConsumer subclass that awaits on asyncio.sleep(3) and returns a > "OK" in plai

Re: Django channels worker loses some messages

2018-11-11 Thread Andrew Godwin
Are you using Channels 1 or Channels 2? And which channel layer are you using? Andrew On Sun, Nov 11, 2018 at 5:05 AM Parsa Banihashemi < parsa.banihash...@gmail.com> wrote: > Hi, > I have a simple sync consumer which receives websocket messages from the > client, and each

Library not loaded: libssl.1.0.0.dylib New Mac on Mohave

2018-11-10 Thread Andrew Troiano
Hey, I am trying to get my app running on a new Mac. It's on Mohave, python 2.7, here is the stack trace. https://dpaste.de/m9WO . We are getting Library not loaded: libssl.1.0.0.dylib when trying to connect to remote mysql database. Thanks! -- You received this message because you are

Re: Channel: Migrate regular Django project to Channels2

2018-11-07 Thread Andrew Godwin
Channels doesn't take over at all unless you configure an async consumer. To make sure it's working I'd recommend writing a single async consumer, and running a test against that to ensure it works. Andrew On Wed, Nov 7, 2018 at 1:11 PM Zhiyu (Drew) Li wrote: > Hi there, > > I

Re: Adding Channels to and Existing Django Application

2018-11-06 Thread Andrew Godwin
I'm afraid I don't have an easy example to hand - maybe someone else does. It sounds like you might have something odd in your settings, models.py, or other files that load at startup. Andrew On Tue, Nov 6, 2018 at 5:31 AM wrote: > even down to running two different servers for that proj

Re: Channels: event loop and thread

2018-11-06 Thread Andrew Godwin
Your assumptions are correct. The only extra thing to be aware of is that some Django interactions (like the Channels Auth middleware) need to do database connections and thus have to launch into a subthread for that, but that's also managed. Andrew On Tue, Nov 6, 2018 at 4:41 AM Zhiyu (Drew) Li

Re: Adding Channels to and Existing Django Application

2018-11-05 Thread Andrew Godwin
it and then use it for the new bits you need it for, basically. Andrew On Sun, Nov 4, 2018 at 1:16 PM wrote: > Greetings y'all! > > I'm looking for recommendations regarding adding Channels to an existing > Django 1.11 application. > > Every guide I've followed assumes

Re: Use Email to Login With Django Auth

2018-11-01 Thread Andrew Pinkham
You may be interested in django-improved-user, as it provides an email-based User model. https://pypi.org/project/django-improved-user/ Full disclosure: I am one of the original authors. If you have any trouble with the package or documentation, please open an issue! Andrew https

Re: How to subclass AsyncHttpConsumer for a GET request?

2018-10-30 Thread Andrew Godwin
You need to route by URL - see the example in the docs here, including how to fallback to Django views: https://channels.readthedocs.io/en/latest/topics/routing.html#urlrouter Andrew On Tue, Oct 30, 2018 at 5:05 AM Zhiyu (Drew) Li wrote: > Thanks! Another question it seems once I manually

Re: How to subclass AsyncHttpConsumer for a GET request?

2018-10-29 Thread Andrew Godwin
Yup, that's the right way - subclass the async consumer class and then write a handle method. You have to do your own post/get distinctions, like in a Django view, but with the scope rather than the request. Andrew On Mon, Oct 29, 2018 at 4:37 PM Zhiyu/Drew Li wrote: > Not s

Re: Channels -- a question about how ProtocolTypeRouter works

2018-10-26 Thread Andrew Godwin
I would instead think of the object that ends up there as a factory that makes the final objects that end up per-scope. It's slightly confusing, I will grant you, but in Python anything can make a new class instance, not just a class constructor, which is what's happening here. Andrew On Fri

Re: Channels -- a question about how ProtocolTypeRouter works

2018-10-26 Thread Andrew Godwin
Hi Drew, The return value is indeed an object, but if you look closely at it you'll see it defines a __call__ method - meaning that when it's called as an ASGI application, it then returns a further object to act inside the scope. Andrew On Fri, Oct 26, 2018 at 2:55 PM Zhiyu/Drew Li wrote

Re: Channels: about max message size

2018-10-23 Thread Andrew Godwin
with a request timeout or something. Andrew On Tue, Oct 23, 2018 at 5:38 AM Chris wrote: > I use Channels & websockets for my webapp's "export data" functionality, > since it can take a long time to generate the file (more than 30 seconds). > In general this works fine, e

Re: Trigger actions independently of url request

2018-10-22 Thread Andrew Pinkham
//docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html If it is tightly coupled and Celery is too powerful for your needs, you could use an AWS Lambda (or Azure Function, etc) to send a request to your Django API on a regular basis. Andrew https://jambonsw.com https://django-unleashed.

Re: Need help with CDN on Django App using heroku

2018-10-22 Thread Andrew Pinkham
https://www.caktusgroup.com/blog/2014/11/10/Using-Amazon-S3-to-store-your-Django-sites-static-and-media-files/ Andrew https://jambonsw.com https://django-unleashed.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

Re: Creating seperate unique ids within the same table

2018-10-22 Thread Andrew Pinkham
On Oct 22, 2018, at 12:29, Matthew Pava wrote: > I am curious why you think it is anti-practice to expose primary keys for > user-visible purposes. > My URLs all have the PK to the object in them, and any advanced user would be > able to “reverse engineer” a URL if they guess the PK of an

Re: Need help with CDN on Django App using heroku

2018-10-22 Thread Andrew Pinkham
https://devcenter.heroku.com/articles/django-assets http://whitenoise.evans.io/en/stable/django.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: generate username and password

2018-10-22 Thread Andrew Pinkham
://docs.djangoproject.com/en/2.1/topics/auth/customizing/#django.contrib.auth.models.BaseUserManager Andrew https://jambonsw.com <https://jambonsw.com/> https://django-unleashed.com <https://django-unleashed.com/> -- You received this message because you are subscribed to the Google Groups &

Re: [channels] 2.1.4 - Removing Javascript library entirely

2018-10-21 Thread Andrew Godwin
That's about right - you should ship and maintain the file yourself now. Andrew On Sun, 21 Oct 2018, 09:04 kradem, wrote: > Hi everyone! > > The subject is related to > https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98 > > > It was very unm

Re: Channels: rejecting web socket connections with a custom close code

2018-10-06 Thread Andrew Godwin
in the spec at https://asgi.readthedocs.io/en/latest/specs/www.html#websocket but somewhat obliquely; I’ll try to make it a bit clearer. Andrew On Wed, 3 Oct 2018 at 13:23, Matt F wrote: > Hello all, > > I have a question about the process of accepting/rejecting web socket > connections

Re: Deploying Django app with Channels on Linux Hosting

2018-10-03 Thread Andrew Godwin
Hi there - it sounds like your host does not support websockets. You should check with them for more. Andrew On Wed, 3 Oct 2018 at 23:43, Manjunath wrote: > Hi all, > I have developed a simple app using django channels. > > I would like to deploy it on a linux hosting provider

  1   2   3   4   5   6   7   8   9   10   >