Unable to connect django to Mysql db

2017-02-06 Thread Pooja Pawani
I am getting error installing mysqlclient in virtual env. django version - 1.10 python - 3.4 -- 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+unsubs

Read status in admin section

2017-02-06 Thread zHepHirotHz
I need to create a flag(some boolean variable) to marked a list of content on django admin site was already read. I already create a flag but I've no idea how to automate change the value when admin click on a list. someone have any idea how to deal with?

Aggregation question

2017-02-06 Thread Viktor Bale
This is confusing me. In the topic guide on Aggregation (https://docs.djangoproject.com/en/1.10/topics/db/aggregation/#cheat-sheet), there is an example in the cheat sheet as follows: # Cost per page>>> from django.db.models import F, FloatField, Sum>>> Book.objects.all().aggregate(...pri

Re: Unable to connect django to Mysql db

2017-02-06 Thread Tim Graham
Please provide the steps to reproduce the issue, including the traceback. On Monday, February 6, 2017 at 7:24:49 AM UTC-5, Pooja Pawani wrote: > > I am getting error installing mysqlclient in virtual env. > django version - 1.10 > python - 3.4 > -- You received this message because you are subs

Re: Django-channels can't connect to websocket server. But when I am using redis I can't connect to my site at all.

2017-02-06 Thread Nikoleta Misheva
For some reason when I query the database it does not return the right values, tho they are there. For example instead the socket name it returns the username and instead of the username it returns some number понеделник, 6 февруари 2017 г., 2:29:12 UTC+2, Andrew Godwin написа: > > You likely ne

PhpMysql how to use in django

2017-02-06 Thread Kazi Atik
Hi i am from php background i want use Phpmyadmin mysql database for django database so i want to know how to integrate this in django kindly please brief me the step

Re: Read status in admin section

2017-02-06 Thread Derek
You probably need to create an admin action; the administrator can click on the items they want to mark as "read" and then select your custom action. Docs: https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ Plenty of examples in blogs ... On Monday, 6 February 2017 14:24:49 UTC+2,

ModelForm access slug from url

2017-02-06 Thread David
I have a modelform something like this: class EventContactForm(ModelForm): def __init__(self, *args, **kwargs): super(EventContactForm, self).__init__(*args, **kwargs) self.fields['event'].queryset = Event.objects.filter(category__slug= *SLUGFROMURLHERE* ).filter(active=True).filter(start_date__gt

Re: ModelForm access slug from url

2017-02-06 Thread David
I should add that this is in conjunction with a CreateView CBV. -- 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 pos

Re: ModelForm access slug from url

2017-02-06 Thread David
Sorted by using def get_form_kwargs(self): kwargs = super(EventForm, self).get_form_kwargs() kwargs.update({'category_slug': self.kwargs['category_slug']}) return kwargs -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: Django channels

2017-02-06 Thread Andrew Godwin
The errors you're getting both point to Channels not using your second two routes, but I've tried a similar routing locally and it works fine for me. Is there a chance you could make this into a small sample project that reproduces the issue? You could also try clearing any .pyc files or __pycache

Re: PhpMysql how to use in django

2017-02-06 Thread Tim Graham
Django and phpMyAdmin can both talk to the same database. It's just a matter of configuring them separately. If you mean something else by "integrate" then please explain in more detail. They can't be "integrated" in the sense that phpMyAdmin is PHP and Django is Python. On Monday, February 6,

A server that runs django

2017-02-06 Thread Dário Carvalho
Hi everyone. So, I now understand a little more about how django works and I was thinking about how can I run a site built with django in my own python's server. Someone know how can I do such thing? I thought about using asyncio and/or socketserver or even http with socketserver. Anyway, thanks

A server that runs django

2017-02-06 Thread invincibly cool
You could use www.Python anywhere.com to host your sites with their domain names. Although a website stays on the web for 3 months in the trial. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Django documentation tutorial part 1

2017-02-06 Thread Philip
Hello, I am working through the tutorial included with the django documentation, and I am confused as to why my url is not working. I have the most recent versions of django and python (the ones that the tutorial says to use) and I believe my file structure is correct, you can see it on https

New to the community

2017-02-06 Thread Mavlonbek Muratov
Hi there. I am happy to be part of this community. I am a beginner django user so would love to hear from you about recommendations. Anythig is fine, books, videos, blogs, forums whatever you think can be helpful to learn django. I would really appreciate your help. Thanks. -- You received thi

Re: Django documentation tutorial part 1

2017-02-06 Thread Sergiy Khohlov
I have not seen setting.py in your project . Also could you please send your runserver command and output Many thanks, Serge +380 636150445 skype: skhohlov On Mon, Feb 6, 2017 at 7:49 PM, Philip wrote: > Hello, > > I am working through the tutorial included with the django documentation,

Re: A server that runs django

2017-02-06 Thread Dário Carvalho
Thanks. It's useful for me. Although what I really want to is to create my own server using python for it. Em segunda-feira, 6 de fevereiro de 2017 19:12:30 UTC-2, invincibly cool escreveu: > > You could use www.Python anywhere.com to host your sites with their > domain names. > Although a web

Re: Django documentation tutorial part 1

2017-02-06 Thread Dário Carvalho
The "urls.py" at docexample should look like: """mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add

Re: New to the community

2017-02-06 Thread Dário Carvalho
You may try the django documentation. It's very usefu. At least it has been useful for me. Kinda three days ago I was very bad but yesterday I started understanding how django works and I love it. Em segunda-feira, 6 de fevereiro de 2017 19:12:09 UTC-2, Mavlonbek Muratov escreveu: > > Hi there.

Re: A server that runs django

2017-02-06 Thread Tim Graham
Follow the deployment instructions at https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/. I would not recommend writing your own web server. If you want to see what's involved, gunicorn.org is a Python server. On Monday, February 6, 2017 at 2:38:01 PM UTC-5, Dário Carvalho wrote: >

Re: A server that runs django

2017-02-06 Thread Dário Carvalho
Thanks guy. I'll consider your recommendation. Em segunda-feira, 6 de fevereiro de 2017 20:09:50 UTC-2, Tim Graham escreveu: > > Follow the deployment instructions at > https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/. > > I would not recommend writing your own web server. If you

Re: Django documentation tutorial part 1

2017-02-06 Thread Philip
Not Found: /polls/ [06/Feb/2017 23:34:00] "GET /polls/ HTTP/1.1" 404 1925 Not Found: /polls/ [06/Feb/2017 23:34:01] "GET /polls/ HTTP/1.1" 404 1925 Above is my console output. My run server command is python3 manage.py runserver. I need to use python3 as the command otherwise it does not w

Re: Django documentation tutorial part 1

2017-02-06 Thread Philip
Thanks to the link you posted, I figured it out! I had the url in the wrong urls file. Thank you so much! On Monday, February 6, 2017 at 3:58:48 PM UTC-6, Dário Carvalho wrote: > > The "urls.py" at docexample should look like: > > """mysite URL Configuration > > The `urlpatterns` list rou

Re: Django documentation tutorial part 1

2017-02-06 Thread Philip
On Monday, February 6, 2017 at 3:12:30 PM UTC-6, Philip wrote: > > Hello, > > I am working through the tutorial included with the django documentation, > and I am confused as to why my url is not working. I have the most recent > versions of django and python (the ones that the tutorial says to

Re: Django documentation tutorial part 1

2017-02-06 Thread Philip
Solved. On Monday, February 6, 2017 at 3:12:30 PM UTC-6, Philip wrote: > > Hello, > > I am working through the tutorial included with the django documentation, > and I am confused as to why my url is not working. I have the most recent > versions of django and python (the ones that the tutorial

Re: sqlmigrate does not quote default string values

2017-02-06 Thread Michael Grijalva
Finally had some time to check again. I initially noticed this issue with Django 1.7 + MySQL, but I retested with the latest version of Django: Django==1.10.5 (latest version from pip) MySQL-python==1.2.5 On Python2.7.13 with MySQL 5.7.10 (installed via homebrew). I also tried mysqlclient (1.3.

Re: Django documentation tutorial part 1

2017-02-06 Thread Dário Carvalho
You welcome. I'm new in django too. Em segunda-feira, 6 de fevereiro de 2017 21:47:46 UTC-2, Philip escreveu: > > Solved. > > On Monday, February 6, 2017 at 3:12:30 PM UTC-6, Philip wrote: >> >> Hello, >> >> I am working through the tutorial included with the django documentation, >> and I am con

Re: PhpMysql how to use in django

2017-02-06 Thread Kazi Atik
Hi Gram , I just want to know how to configure in django can you please help me for this our company previously working in PhP now we moved to Django so can please tell me how to configure it to django On Monday, February 6, 2017 at 11:12:27 PM UTC+5:30, Tim Graham wrote: > > Django and phpMyA

Re: PhpMysql how to use in django

2017-02-06 Thread Antonis Christofides
Hello Kazi, The only thing that I can deduce from the very little information you are giving is that you want your Django app to be accessible at, say http://mydomain.com/, and phpmyadmin at, say, http://mydomain.com/phpmyadmin. Is that correct? Please explain *exactly* what you want to do and wh

Re: New to the community

2017-02-06 Thread Antonis Christofides
Hello, except for Django's official tutorial, which is quite good, many people seem to like the Django Girls tutorial. Regards, Antonis Antonis Christofides http://djangodeployment.com On 02/06/2017 09:46 PM, Mavlonbek Muratov wrote: > Hi there. I am happy to be part of this community. I am a