Re: Django Video Conferencing-Reg

2020-04-11 Thread Yoo
I recommend you implement video conferencing yourself using native Django 3.0 websockets OR Django channels. You just have to figure out how to 1. get camera input, 2. convert it into base64, 3. send it over the socket, then 4. in HTML, show the image. My issue with that is 1. you need to send

AWS API or EC2 for chat?

2020-03-24 Thread Yoo
Hi all! I built a chat app without dj channels, but now I’m stuck with pricing... and just AWS in general. Every time I look up Websockets, I’m told to use AWS API Gateway. Why? And if so, how would I split my project between EC2 for website and API Gateway for my mobile users and for chats?

Monitoring Production Cookiecutter-Django

2019-11-28 Thread Yoo
I’m using cookiecutter-django and Docker for production, and I’m looking for some kind of monitoring package that comes with a GUI. My website is heavy on memory for calculations, so I’m testing it with locust.io. I want to be able to monitor a bunch of things such as firewall for SIEM and

Re: reg: django Model for MCQs type project

2019-11-20 Thread Yoo
Have a Test model which as a unique identifier (BigAutoField). Get a Questions model with a foreign key to a test and a charfield for the question itself (you can add BrinIndex for optimization). You can add a booleanfield if the question is optional and whatever else you need (like the correct

Re: Problem trying to use postgresql and psycopg2 in a django project

2019-11-20 Thread Yoo
Hey, I think for OSX (Mac) or anything using the Darwin OS (basically apple) has to use psycopg2’s binary. Just install psycopg2-binary and it should work. On Wednesday, November 20, 2019 at 6:50:01 AM UTC-5, tramites xpress drive wrote: > Hi, I Have been trying to setup my django 2

Re: Django authentication best practice

2019-11-20 Thread Yoo
Whenever I deploy an app, I always use cookiecutter-django. I’m pretty sure there is an option lying somewhere in the settings that let you disable username. If not, I believe the BaseUser model has the option of the unique identifier or username be set to the email itself. Otherwise, you can

Re: Knowing when cache expires or DurationField is done

2019-08-24 Thread Yoo
e) to log when celery should execute a task. On Saturday, August 24, 2019 at 5:12:12 PM UTC-4, Yoo wrote: > > 1. Using celery to make a replacement cache when that specific expires, > but not sure how to do it. > 2. Along the same lines, I need to also know when a DurationField is at

Knowing when cache expires or DurationField is done

2019-08-24 Thread Yoo
1. Using celery to make a replacement cache when that specific expires, but not sure how to do it. 2. Along the same lines, I need to also know when a DurationField is at "zero." Not sure how a DurationField works though. Again, need celery to be able to execute something when a specific record

Re: DRF with Rich Text

2019-08-21 Thread Yoo
of some help, > Kind regards, > Aditya > > On Wed, Aug 21, 2019, 9:11 AM Yoo > > wrote: > >> Hi, I'm gonna be using Django Rest Framework for API with a Postgres >> stack and not developing with website. Coding apps in Swift and Androidx >> Java. Users can POST rich

DRF with Rich Text

2019-08-20 Thread Yoo
Hi, I'm gonna be using Django Rest Framework for API with a Postgres stack and not developing with website. Coding apps in Swift and Androidx Java. Users can POST rich text, or text that uses HTML, to the server, and then other users can GET that HTML and view it in (ui)TextView. Based on

Horizontal Partition. How affect other indexes?

2019-07-17 Thread Yoo
Err so no one responded to my post, so I suppose here's a more general Database question: Let's say there is a table with two indexes. I horizontally partition by one of the indexes. How does this affect the other one? I need to utilize BOTH indexes and there is no way I'm able to vertically

Re: Make an Heroku connect model my app's custom user model

2019-07-17 Thread Yoo
Hi! I'm not fully acquainted with Heroku connect, but here's the pdf docs: https://buildmedia.readthedocs.org/media/pdf/django-heroku-connect/stable/django-heroku-connect.pdf on page 9 you can find: heroku_connect.E006 The Salesforce object name must be unique since an object can only mapped

Re: Can Django fill in a template based on a custom URL, if the contents of the URL match an item in the database?

2019-07-17 Thread Yoo
Hmm. So is diamondscompany.com/ going to be static? As in that is permanent? If so, then your custom button can simply be a custom URL. I'm not sure if a listing on eBay can automatically be done (not acquainted with it, sorry), but I imagine editing the admin.py with some custom stuff. Maybe

Re: Running Django 2.2.3 in Apache2

2019-07-17 Thread Yoo
https://www.sysadmin.md/deploy-django-in-production-using-apache-nginx-and-mod-wsgi.html https://stackoverflow.com/questions/18048318/apache-mod-wsgi-vs-nginx-gunicorn There are several fantastic tutorials online regarding apache2 and mod_wsgi. A simple google search with the keywords apache2 and

Re: Issue i18n django_language in session

2019-07-17 Thread Yoo
I'm not sure, either. Usually, whenever I'm testing, I open a private/incognito browser in case there is caching or cookies are being saved (cookies could be related to session authentication and other stuff). What I would try first is clearing your cookies if you've been using a regular

Re: sqlite update on CentOS 7 for latest django version

2019-07-17 Thread Yoo
Hm did you first do ./manage.py migrate? Maybe your db.sqlite file doesn't exist... Check! Additionally, if there IS a file that is similar to a db name, like blah.db, make sure in your "database" settings in settings.py points to that file. Sqlite3 isn't old; it's not going away, either. With

Re: Query questions. Please help me.

2019-07-17 Thread Yoo
Take a look at Q objects: https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q-objects On Wednesday, July 17, 2019 at 4:04:16 PM UTC-4, 나르엔 wrote: > > Hello, I am studying django. > > When I use objects.filter, I want to search various columns. > > Columns to search

Re: Issues while creating virtual environment before installing Django

2019-07-17 Thread Yoo
Isn't Python 3.x automatically installed with virtualenv and pip? Try this: virtualenv venv Then, do: cd venv\scripts && activate Then you can start installing packages like this: pip install django On Wednesday, July 17, 2019 at 11:26:04 AM UTC-4, Mahesh Kumar wrote: > > Hi all, > I tried to

Question: Votes Table with Partitions, BRIN & B-Tree indexes

2019-07-17 Thread Yoo
Hi! For context, I have a votes table that is like a through model of Many-to-many (M2M). I’m using Postgres because BRIN and other stuff. Here’s the table: class UpVote(models.Model): id = models.UUIDField(primary_key=True, default=uuid4, editable=False) post = models.ForeignKey(Post,

Re: Internal Ranking System Application

2019-06-25 Thread Yoo
gt; User models aren't linked; creating one doesn't create the other, nor does > updating or removing one affect the other. > > On Monday, June 24, 2019 at 10:00:21 PM UTC-4, Yoo wrote: >> >> Np! >> >> https://docs.djangoproject.com/en/2.2/ref/models/fields/#

Re: Minimum Hardware requirement - reg

2019-06-25 Thread Yoo
8 app modules? That's a little clumsy. Something that would require that many app modules would be like docs.google.com and drive.google.com. Google has a LOT of different platforms which, if programmed in Django, would need several app modules. I'm 90% sure you'll only need one app. Hardware

Re: Social media management

2019-06-25 Thread Yoo
Management platform? How so? Are you talking about authenticating users with OAuth? Like "sign up with Google" or "Sign up with Facebook" If so, you can check out: https://github.com/RealmTeam/django-rest-framework-social-oauth2 Otherwise, if you're talking about building an API like a Twitter

Re: Django create username and password, please help!

2019-06-25 Thread Yoo
Go to settings. Go to "Project: myproject" or whatever it says for myproject. Then press Project Interpreter and makes sure that Django is pip installed in that virtual environment. If it's not installed, do: pip install django If that's done, you can use the PyCharm terminal to do this:

Re: How to talk to API via HTTP on Django

2019-06-25 Thread Yoo
Use Django REST Framework and django-filters. Easy set-up. For something you're trying to do, you can send a request like: http://127.0.0.1:8000/api/testtable/?format=json=science/ Basically, this goes to the table Testtable, filters the queryset by some column category that returns all

Re: Signals with update()

2019-06-25 Thread Yoo
If what I said is confusing, let me know where. I've been stuck on this for a looonngg time. On Tuesday, June 25, 2019 at 10:34:25 AM UTC-4, Yoo wrote: > > Hi, I have a problem with updating in Django signals regarding a specific > use-case hierarchy: > > https://gist.github.

Signals with update()

2019-06-25 Thread Yoo
Hi, I have a problem with updating in Django signals regarding a specific use-case hierarchy: https://gist.github.com/andrewcw825/90375d77578afea23ec4886f18e063b4 Hi, so here's the problem: once the objects for Public1 are created, I need to update each object in the queryset of Private1 of a1

Need help transferring large amounts of data between models

2019-06-20 Thread Yoo
https://stackoverflow.com/questions/56695636/large-transfer-of-data-between-several-django-models Please take a look. I don't have a good grasp over my situation... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

API Root doesn't have has_permissions with JWT_Authentication

2019-06-19 Thread Yoo
https://stackoverflow.com/questions/56673987/api-root-doesnt-have-has-permissions-with-jwt-authentication Someone please help. I have a feeling that because of this error, in production, there'll be a security flaw because of this attribute error... -- You received this message because you are

Re: Internal Ranking System Application

2019-06-16 Thread Yoo
Based off the context: https://simpleisbetterthancomplex.com/tutorial/2016/11/23/how-to-add-user-profile-to-django-admin.html I'm somewhat confused regarding where this is supposed to go, so here're some random ideas which hopefully might help you start off with some Google searches: The above

Signals

2019-06-16 Thread Yoo
Hi. the following code is kinda wonky, so here's the context. I have two models: https://gist.github.com/andrewcw825/f88aa2084e373480f3e63991af7d6c4b The url_id field is supposed to be an auto increment field; however, since it's not the primary key, I can't. Obviously, I could make a function

Model Forms Dynamic

2019-05-28 Thread Yoo
https://docs.djangoproject.com/en/2.2/topics/forms/modelforms/ In the example of model form, they say model = Author Is it possible to set a variable to set the model? Like could I make a variable and set it to whatever model I’d like, then say model = var? -- You received this message because

Re: Right method for url mapping

2019-05-26 Thread Yoo
Can you please explain. But I have seen in one of my app it works with > just second one!! > > در یکشنبه 26 مهٔ 2019، ساعت 3:49:59 (UTC+4:30)، Yoo نوشته: >> >> First one. Usually I'd have it be views.index. Otherwise, the first one >> is perfectly fine. Need explanation? >

Re: Create a real small business website with Django as soon as possible!!

2019-05-26 Thread Yoo
For #3, Django documentation helpfully describes a method. 3) https://docs.djangoproject.com/en/2.2/topics/i18n/translation/#how-django-discovers-language-preference Not sure of sample project, but a simple Google serach on for a GitHub page is enough For #2, Built-In admin is still possible

Re: How to get object id from database?

2019-05-25 Thread Yoo
Maybe try album__id (two underscores)? Or try album_title as defined in the Album model. I also advise not to expose your primary key in the URL. If the above did not work, check Django documentation: https://docs.djangoproject.com/en/2.2/topics/http/urls/ On Saturday, May 25, 2019 at 2:46:58

Re: Right method for url mapping

2019-05-25 Thread Yoo
First one. Usually I'd have it be views.index. Otherwise, the first one is perfectly fine. Need explanation? On Saturday, May 25, 2019 at 7:14:18 PM UTC-4, Saeed Pooladzadeh wrote: > > Hello > > Wich of them is the right method for url mapping: > > path('', views.show, name='index'), > > or >

Too many tables with 10 columns each?

2019-05-25 Thread Yoo
There are 200 tables with 11 columns, including 4 foreign keys. Is 200 tables too many tables? This is the error I'm getting: Operations to perform: Apply all migrations: admin, auth, contenttypes, public, sessionsRunning migrations: Applying contenttypes.0001_initial... OK Applying

Re: Migrations File too Large preventing Migrate

2019-05-21 Thread Yoo
https://stackoverflow.com/q/56213264/10973829 Originally, I posted this in StackOverflow. Not getting any responses. I looked over all my migration files, and it seems like they get continuously larger. There are more “Test” tables than what you see in the migration files; what I’ve done was

Migrations File too Large preventing Migrate

2019-05-19 Thread Yoo
In Django 2.2, I run makemigrations then migrate. I wait approx. 5-7 minutes and then I get "Fatal Python error: Cannot recover from stack overflow." "Current thread 0x0002094 (most recent call first):" yada yada "File "manage.py", line 17 in main "File manage.py line 21 in " End. I check