Re: In my django web app i wannt show time in user timezone

2018-12-07 Thread Vovk Donets
>From docs: "...there’s no equivalent of the Accept-Language HTTP header that Django could use to determine the user’s time zone automatically. Instead, Django provides time zone selection functions . Use them to build

Re: How I can insert data into database automaticaly

2018-12-07 Thread Mike Dewhirst
On Saturday, December 8, 2018 at 2:44:21 AM UTC+11, Informatico de Neurodesarrollo wrote: > > Thanks Mike: > > My data are in different formats, but I don't care pass it by hand once > time. > Once is enough, I agree. > > Previously, I know that I need make migrations my model into

Re: In my django web app i wannt show time in user timezone

2018-12-07 Thread thanh . nguyenba0611
Hello, I think you can use "request.META" django. (request.META['TZ']). It is timezone user submit request. :D On Saturday, December 8, 2018 at 8:39:29 AM UTC+7, Deniz Bazan wrote: > > Hello everybody, > I have a django web app, in my app i want to show in the page where the > time

Re: Django URL problem

2018-12-07 Thread thanh . nguyenba0611
It can be like {% url 'email' %} (incorrect) => {% url 'email' %} (correct) :D On Saturday, December 8, 2018 at 2:10:13 AM UTC+7, Kacsándi, Zsolt wrote: > > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > > https://example.com/1/email >

Re: Django URL problem

2018-12-07 Thread thanh . nguyenba0611
Hello, I think you are missing ('email/') in template. On Saturday, December 8, 2018 at 2:10:13 AM UTC+7, Kacsándi, Zsolt wrote: > > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > > https://example.com/1/email > https://example.com/1/email/2 >

In my django web app i wannt show time in user timezone

2018-12-07 Thread Deniz Bazan
Hello everybody, I have a django web app, in my app i want to show in the page where the time information is, with user timezone. I have a form with start_time and end_time(Timefield) user send this with a specific timezone(Berlin/Europa) after this when a user go to the page, the user should

inserting data in a DateTimeField() in Django by using datetime-local

2018-12-07 Thread Godson Rapture
Please, I am creating a to-do list app as my first django project. My form is not valid because I am trying to insert DateTimeField in django using datetime-local. I did research, I discovered I need to do a custom model so I parse the datetime-local field. Pls guide me on how to create a

Re: Django URL problem

2018-12-07 Thread vishal sharma
Hello, I am making multiupload files API in Django please suggest which functions we can use for uploading multiple upload? Thanks!! On Sat, 8 Dec 2018 at 12:40 AM, Kacsándi, Zsolt wrote: > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > >

Django URL problem

2018-12-07 Thread Kacsándi , Zsolt
Hi, I am new in Django and I have a problem. I want to build an URL structure like this: https://example.com/1/email https://example.com/1/email/2 The first URL is the list view, the second is the detail view. The first integer (1) in those is the account id, and in the second URL the second

Re: Poor Performance for Form Rendering In Django 1.11

2018-12-07 Thread Simon Charette
Hello John, Did you try switching to the Jinja2 form renderer[0] to see if it helps? I've not tried it myself but I heard it makes a significant difference. Cheers, Simon [0] https://docs.djangoproject.com/en/2.1/ref/forms/renderers/#jinja2 Le vendredi 7 décembre 2018 08:30:48 UTC-5, John a

Re: How I can insert data into database automaticaly

2018-12-07 Thread Informatico de Neurodesarrollo
Thanks Mike: My data are in different formats, but I don't care pass it by hand once time. Previously, I know that I need make migrations my model into "postgres" database creating the hole table but empty My interest will be learn one way put a previous data into my database, before

Re: Databases configuration

2018-12-07 Thread Daniel M
I think the problem is the server. Try pip install mysqlserver then start the server. On Dec 7, 2018 17:27, "Chuck R" wrote: > Hi, if you're using python venv, try install mysqlclient(pip install > mysqlclient) and rerun the local server. > > On Thu, Dec 6, 2018, 9:38 AM C. Kirby >> Did you

Re: Databases configuration

2018-12-07 Thread Chuck R
Hi, if you're using python venv, try install mysqlclient(pip install mysqlclient) and rerun the local server. On Thu, Dec 6, 2018, 9:38 AM C. Kirby Did you start your mysql process? > > On Thursday, December 6, 2018 at 9:33:37 AM UTC-5, Cool Smith wrote: >> >> Hi everyone, >> >> I am new to

Databases configuration

2018-12-07 Thread Chuck R
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mysql', 'USER': 'root', 'PASSWORD': 'root', 'HOST': '', 'PORT': '3306' } } This should work for you. You were using the wrong port.The port you were using is for

Re: Authorization not working on production server

2018-12-07 Thread Sidnei Pereira
Did you log in? Em sexta-feira, 7 de dezembro de 2018 09:21:51 UTC-2, Akash utreja escreveu: > > Hi, > I am building authorization in django framework using python.. The problem > is that my code is working fine on local server but when I run the same in > production it returns "Anonymous User"

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-07 Thread Sidnei Pereira
Take a look on this article. https://automationpanda.com/2017/09/14/django-projects-in-pycharm-community-edition/ Em quinta-feira, 6 de dezembro de 2018 15:18:22 UTC-2, Parker Bernard escreveu: > > how do i open my django in my pycharm or python > > > On Thu, Dec 6, 2018, 3:40 PM Sidnei Pereira

Poor Performance for Form Rendering In Django 1.11

2018-12-07 Thread John
My site has a navbar with an advanced search widget (beside the search field), which renders on every page. For each request, a context_processor creates the form so it can be available on that page in the navbar. This form has about a dozen selects with a total

Django UpdateView and Createview

2018-12-07 Thread Rupam Hazra
Hi, I have working in a TaskManagement Sytem where i have *project *module and *technology *module. class ProjectMaster(models.Model): name=models.CharField(max_length=255,blank=True,null=True) description=models.CharField(max_length=255,blank=True,null=True)

Re: Order of migration dependencies when running makemigrations from scratch

2018-12-07 Thread Simon Charette
Hello Dakota, Migration.dependencies should really have been defined as a set from the start as Django doesn't care about their order anyway. I unfortunately cannot provide a work around but I suggest you submit an improvement/cleanup ticket to make the order deterministic. It should be a

Authorization not working on production server

2018-12-07 Thread Akash utreja
Hi, I am building authorization in django framework using python.. The problem is that my code is working fine on local server but when I run the same in production it returns "Anonymous User" Am I doing it right? if request.user.has_perm('auth.access_admin') ""whole code"" else:

Re: Databases configuration

2018-12-07 Thread Kasper Laudrup
Hi Cool Smith, On 12/7/18 10:11 AM, Cool Smith wrote: I tried starting MYSQL server on System Preferences. However, it seems the server will shutdown automatically a few seconds later. You would probably have a better chance of getting useful responses if you posted your question in a

Re: Databases configuration

2018-12-07 Thread Cool Smith
I tried starting MYSQL server on System Preferences. However, it seems the server will shutdown automatically a few seconds later. On Friday, December 7, 2018 at 8:09:28 PM UTC+11, Cool Smith wrote: > > How to do so? > > On Friday, December 7, 2018 at 1:38:09 AM UTC+11, C. Kirby wrote: >> >> Did

Re: Databases configuration

2018-12-07 Thread Cool Smith
How to do so? On Friday, December 7, 2018 at 1:38:09 AM UTC+11, C. Kirby wrote: > > Did you start your mysql process? > > On Thursday, December 6, 2018 at 9:33:37 AM UTC-5, Cool Smith wrote: >> >> Hi everyone, >> >> I am new to Django. I have started a new project running on my localhost. >>