Re: [ask] Django video streaming server

2018-12-15 Thread Yavin Aalto Arba
https://github.com/andrewebdev/django-video there are plenty of other good plugin out there. Why build from scratch? Other peoples peer-reviewed plugin are most likely better than whatever you can muster in a few days\weeks :) On Sun, 16 Dec 2018 at 04:41, Riska Kurnianto wrote: > Hello all,

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Yavin Aalto Arba
'restaurant', >> > name='restaurant'), >> > path('(?Prest_id\d+)/vote/', >> > 'vote', >> > name='vote'), >> > ) >> > >> > >> > if settings.DEBUG: >> > urlpatterns += patterns('', >> > ('media/(?P.*)', >

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Yavin Aalto Arba
did you import settings? On Mon, 26 Nov 2018 at 15:34, Abba Haruna wrote: > if settings.DEBUG: > # urlpatterns += patterns('', > # ('media/(?P.*)', > # 'django.views.static.serve', > # {'document_root': settings.MEDIA_ROOT})) > > > > this is the result > > File

Re: Custom attributes in django forms

2018-11-26 Thread Yavin Aalto Arba
Hi Gordon, Try starting with the documentation here and if u have any questions please let us know: https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ On Sun, Nov 25, 2018, 11:09 PM gordon nchy hello everyone > i'm facing a challenge on how to add custom attributes to django login >

Re: How to autosave Foreignkey value inside my second Model with the id of my first model object.??

2018-11-25 Thread Yavin Aalto Arba
The whole point of a foreign key is that it's external\independent the related model - and you are going against that by giving the user the ability to enter it willy-nilly in one form. If you want to have a 2 key combo as primary key you can use unique_together without the second model as a FK

Re: Website is running in Django and also clients want to make the Mobile APP.

2018-11-23 Thread Yavin Aalto Arba
There's a django plugin to quickly recognize if the page is loaded from a mobile device and serve different templates accordingly: *https://djangopackages.org/packages/p/django-mobile/ * HOWEVER, I think a more simple and effective approach

Re: need help on form view

2018-11-23 Thread Yavin Aalto Arba
I think the problematic part is " create_user = UserCreationForm(request. POST or None)" Most FBV for forms start with the "if request.method == 'POST" and then continue to fill the form. You can set the "None" after the if statement instead of before everything else. I am not sure that the or

Re: URL path not working with Django ver 2.1.2

2018-11-22 Thread Yavin Aalto Arba
Path is not using regular expressions. Use empty quotes and it should work. On Fri, Nov 23, 2018, 5:28 AM Ben Hamlitsch This is the message I get when I run python manage.py runserver > > [image: Screen Shot 2018-11-22 at 7.18.58 PM.png] > > > This is my setup in Atom > > > [image: Screen Shot

Re: Using Django Channels to subscribe to a Redis channel

2018-11-22 Thread Yavin Aalto Arba
2018 at 8:47:07 PM UTC+1, Yavin Aalto Arba > wrote: >> >> try with self.channel_layer.group_send ? >> >> On Wed, 21 Nov 2018 at 19:44, Nasir Sh wrote: >> >>> Thanks Andrew this helps me as well. There is a missing piece I don't >>> under

Re: email

2018-11-22 Thread Yavin Aalto Arba
https://docs.python.org/3/library/sched.html ? On Thu, 22 Nov 2018 at 11:29, Tushar Nadkar wrote: > i have email id of multiple user , so how can i send mail after 3 days > when he click a button .or checkout button in django > > -- > You received this message because you are subscribed to the

Re: difference between class based view and function based view

2018-11-22 Thread Yavin Aalto Arba
I have to +1 Carstens answer. In short, I too find CB views to be too "magical". =) On Thu, 22 Nov 2018 at 11:53, Carsten Fuchs wrote: > Hi Andrew, > > many thanks for your clear and detailed explanation! > > Having used Django for several years, FVs are still my favorite approach > over

Re: python manage.py runserver

2018-11-21 Thread Yavin Aalto Arba
Mohamed, if you have some time I can do a webex session with you to check it out. On Thu, Nov 22, 2018, 5:24 AM Alfredo Sumague did you run it inside your project directory? > > On Wed, Nov 21, 2018 at 11:47 AM Mohamed Hashi > wrote: > >> i install wrap >> but till now python manage.py

Re: please i need assistance with mine css file .Mine base.html file failed to load my style.css.

2018-11-21 Thread Yavin Aalto Arba
It might help to create a link to the static file and then check the error upon reaching the url. I also recommend using the django debugging tool bar! Otherwise, it could really help if u were to share the location of the file in the project as well as the static url and other static related

Re: Using Django Channels to subscribe to a Redis channel

2018-11-21 Thread Yavin Aalto Arba
try with self.channel_layer.group_send ? On Wed, 21 Nov 2018 at 19:44, Nasir Sh wrote: > Thanks Andrew this helps me as well. There is a missing piece I don't > understand yet. In my management command, then I probably will have to use > `async_to_sync(channel_layer.group_send)` > to send the

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
n't log as expected? > > Since the signal is run synchronously within the Django request, "POST > /adminapp/merchantstores/add/" gets logged, only after the signal has > finished running. > > On Wed, Nov 21, 2018 at 6:55 PM Yavin Aalto Arba > wrote: > >>

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
, prateek gupta wrote: > I just printed the value of created as > > kwargs.get("created") > > > And it''s vaulue is True. > > On Wednesday, November 21, 2018 at 3:19:56 PM UTC+5:30, Yavin Aalto Arba > wrote: >> >> Something doesn't add up. Can you c

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
Can you show us the view where the save() is invoked? On Wed, 21 Nov 2018 at 10:57, prateek gupta wrote: > Hi All, > > I have an admin panel built on Django 2.0.6, Mysql 5.7 and Python 3.6. > > Now I have written following signal code in signals.py- > from .models import MerchantStores > from

Re: Approach to implement a Rest call functionality

2018-11-20 Thread Yavin Aalto Arba
mework for this functionality, > never thought that from front end I can do that :) > > On Tuesday, November 20, 2018 at 5:17:35 PM UTC+5:30, Yavin Aalto Arba > wrote: >> >> Hi Prateek, >> >> I think your best option is using javascript on the front end - >> leveraging an aj

Re: Approach to implement a Rest call functionality

2018-11-20 Thread Yavin Aalto Arba
Hi Prateek, I think your best option is using javascript on the front end - leveraging an ajax post call. On Tue, 20 Nov 2018 at 13:24, prateek gupta wrote: > Hi All, > > I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. > > In this panel I have a field 'PIN' described in

Re: Send E-mail to User When Account is Activated though Django Admin Application

2018-11-20 Thread Yavin Aalto Arba
I would also recommend checking out using Signals instead of directly from the view: https://docs.djangoproject.com/en/2.1/topics/signals/ You can then write a a function that will send an email based on the event. The sending email documentation is superb:

Re: Upload Image Field? ASAP PLS

2018-11-18 Thread Yavin Aalto Arba
Assuming this is just a general question about the subject: Django Models has an imagefield option: https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.ImageField The image has a .url attribute which you can use for displaying (or you can use the % static % method). cf.

Re: How to download a file when a django function is called by javascript instead of navigation to the url?

2018-11-17 Thread Yavin Aalto Arba
will work with window.location= On Saturday, November 17, 2018 at 5:55:18 PM UTC+2, Joel wrote: > > Yes. But it's not usable when we're using JavaScript to fetch the url. > > On Sat, 17 Nov, 2018, 9:20 PM Jason > wrote: > >> oh, I didn't know that was a thing. TIL. >> >> >>

Re: How to download a file when a django function is called by javascript instead of navigation to the url?

2018-11-17 Thread Yavin Aalto Arba
did you try to set "as_attachment=True" ? -- 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, send