Re: Get current site inside model

2017-01-14 Thread Melvyn Sopacua
On Friday 13 January 2017 13:15:43 Max wrote: > Vijay Khemlani, i think my question have not a lot of details. More > 1) Django site framework (works with request.get_host() without > Site_id). I can get the current site with > Site.objects.get_current(*request*), shortcuts (get_current_site) or >

Re: models foreign key

2017-01-14 Thread Melvyn Sopacua
On Friday 13 January 2017 07:42:17 Jeffrey Uvero wrote: > *there's no problem appeared but when I go to my database, there's no > connection with these two table.. there should be a connection between > two same name column.(foreign key)* > Correction with my code above. How did you determine th

Re: Decrease amount of identical "Email reports"

2017-01-14 Thread Melvyn Sopacua
Hello, On Monday 09 January 2017 00:53:13 Nacharov Mikhail wrote: > I have a high load production site. If I make a mistake (some users > getting 500 error) all ADMINS will be receiving error emails until > bug won't be fixed. > This causes email server load and it's quite annoying reading thouse

Re: Issue whe migrate with relation between tables in different schemas

2017-01-14 Thread Melvyn Sopacua
Hi, On Friday 06 January 2017 10:29:34 felipe.pereira.nit...@gmail.com wrote: > I'm working with Django 1.9.7 with Postgresql and I stuck in a problem > with relations between tables in different schemas. > > The problem that I'm facing is that I have a table, for example, named > *product, *whic

Override base filter for model's queryset (Django 1.6)?

2017-01-14 Thread Derek
I am looking for help with a Django 1.6 application. The use case is not too complicated; I need to override the delete method for the queryset to prevent some records being removed by the bulk delete (run via the admin interface); and I also want to override the base filter for the model's querys

Re: Override base filter for model's queryset (Django 1.6)?

2017-01-14 Thread Melvyn Sopacua
On Saturday 14 January 2017 21:20:32 Derek wrote: > and I also want to override the base filter for > the model's > queryset to limit what is displayed. This is covered in the Manager documentation[1] in detail. -- Melvyn Sopacua [1] https://docs.djangoproject.com/en/1.10/topics/db/ma

Django-channels connecting 2 random people

2017-01-14 Thread Nikoleta Misheva
Hello fellows, I started to go into channels and I saw the example for multiplex chat but it is not excactly what I want and I will be happy if someone can point me in the right direction or show me an example. So I want to have many dynamically created rooms than will be destroyed after the ses

Re: Django-channels connecting 2 random people

2017-01-14 Thread Andrew Godwin
Your best bet is probably to use a database to track who's currently got an open connection and their reply channel, and then use database rows to match pairs together (in another table). Your message received code can then look up the other side in the table and forward it to that reply channel.

Re: Django-channels connecting 2 random people

2017-01-14 Thread Nikoleta Misheva
Would it be a good idea to add everyone that has an open connection to a list of dictionaries and when 2 people are connected to remove them from the list? And how can I guarantee that the channels limit is just 2 and there won't be anyone joining by mistake? Or I just didn't get your idea. Tha

Re: Get current site inside model

2017-01-14 Thread Max
Melvyn Sopacua, i will look it. Thank you all. -- 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 post to this group,

Need help with a school project

2017-01-14 Thread Grant Holman
I need help starting a django project for a school project. I am brand new to Django but have some experience with Python. I need to design web application where inputs are put onto a screen and then inputted into a database. From my research this is a simple process with Django. Does anyone h

Re: Need help with a school project

2017-01-14 Thread Vijay Khemlani
Read the tutorial I guess https://docs.djangoproject.com/en/1.10/intro/tutorial01/ After that handling form data and saving to the databse should be trivial On 1/14/17, Grant Holman wrote: > I need help starting a django project for a school project. I am brand new > to Django but have some exp

Re: Access Celery's subprocess in my Django app

2017-01-14 Thread Avraham Serour
Hi, In my opinion the celery task should just write to the DB the relevant data, no need to pass around and reprocess just to write the relevant data from the result, the celery task can just import the django model and save directly to the DB. Usually you don't need to set the CELERY_RESULT_BACK