Re: Django Admin on Microsoft Visual Studio Problem

2016-07-25 Thread Siddharth Ghumre
To access Django's admin site, your admin url should look like url(
r'^admin/', include(admin.site.urls)) which says whenever u hit rather
http://127.0.0.1:8000/admin would include admin urls from "admin.site.urls"
rather than "polls.views" unless you have all the admin login there in
"polls.views".

Hope this helps.
Also Visual studio has nothing to do with this error as its just an editor.

-Sid

On Mon, Jul 25, 2016 at 3:01 AM, James Schneider 
wrote:

> On Jul 23, 2016 6:39 PM, "Jose"  wrote:
> >
> > Hi all,
> >
> > After I built my classes on Django how can I access the admin site when
> running it on the local server online. I was reading the django
> documentations and they only say  http://127.0.0.1:8000/admin/ and that
> forwards them to the admin site without having to make an url. I get an URL
> error since I never specified an URL on urls.py. I then tried to make an
> url and used the code on the documentation for making the polls app on an
> admin.py file under polls. This also did not work. Could someone tell me
> how I could access that admin page using Visual Studio. These are pictures
> of the code.
> >
>
> Accessing the admin site is separate from Visual Studio. Are you running
> the Django development server? What errors are you getting when you try to
> access the site?
>
> -James
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVEGp_GuybQvYexwCYsc3RtVq27vmhy%3DBVTRRDUnvmaUA%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANtEdp582TZdqzejrBB7_xbHP7%2B_xNTmjHSR926Kt2Z_JD62Nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation de Django dans un environnement virtuel.

2016-07-25 Thread Siddharth Ghumre
I think "*sudo* pip install django" is the problem here as when you so sudo
it installs it in the host machine not in virtualenv so the thumb rule says
-  dont use sudo when you are working in vitrual env.

I guess pip install Django==1.X.X would solve the problem.

Suggestion - use pip freeze to list all the installed packages in the
virtual env.

Hope this helps.

*Bonne Chance*

-Sid

On Mon, Jul 25, 2016 at 2:20 AM, ludovic coues  wrote:

> Est-ce que l'erreur survient aussi si la commande est lancé sans sudo ?
> Dans un virtualenv, sudo ne devrait pas etre utilisé, on travail avec
> des fichiers que l'on a crée, dans notre dossier personnel.
>
> 2016-07-24 16:17 GMT+02:00  :
> > Can You, please, in English describe what a problem You have? I
> understand
> > just that this is some with virtualenv.
> >
> >
> > --
> > 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 email to django-users@googlegroups.com.
> > Visit this group at https://groups.google.com/group/django-users.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/36fed426-aa40-4ab0-bf7a-430de2888240%40googlegroups.com
> .
> >
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Cordialement, Coues Ludovic
> +336 148 743 42
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEuG%2BTbrZv5TMYSkqbX54dhnrgZ%2Bj1mqqTBN6ah0CMRbctdjqQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANtEdp4ewKKdV-jKhLa%3D-CqLxpLgv0H%3DV5ojsz2ZyuFeXfO2Hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


TypeError: $.get is not a function

2016-07-25 Thread ajay


//In scirpt

$('#suggest').keyup(function ()
{
   var query = $('#suggest').value;

 $.get("/search/", {suggest:query},function( data ){
 $("#list").html( {% for item in search_list %}
''+{{ item }}+ ''
{% endfor %} )


});



In body







am i doing something wrong 

plz help

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f874db3a-1e19-4cef-9deb-9beed11159d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError: $.get is not a function

2016-07-25 Thread Gergely Polonkai
This sounds to be a JavaScript problem, which is not part of Django in any
ways.

My idea, however, is that you don’t import another JS file that contains
the $ function (probably jQuery or Prototype?)



Gergely Polonkai
[image: https://]about.me/gergely.polonkai


2016-07-25 12:31 GMT+02:00 ajay :

> //In scirpt
>
> $('#suggest').keyup(function ()
> {
>var query = $('#suggest').value;
>
>  $.get("/search/", {suggest:query},function( data ){
>  $("#list").html( {% for item in search_list %}
> ''+{{ item }}+ ''
> {% endfor %} )
>
>
> });
>
>
>
> In body
>
>
> 
> 
> 
>
>
> am i doing something wrong
>
> plz help
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f874db3a-1e19-4cef-9deb-9beed11159d2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBU%2BHq2a7Xs7U5tqcfFF%2BZ2CzyQMTiMtetjkbxym5SJuczQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation de Django dans un environnement virtuel.

2016-07-25 Thread Shem Geek
Chances are high that one of the apps you are installing is already 
installed and in its latest version, however, I dont understand what you 
are asking

On Sunday, July 24, 2016 at 3:46:15 PM UTC+3, Philippe Idlas wrote:
>
> Bonjour,
>
> J'ai créé deux environnements virtuels sous Python avec 'virtualenv'. L'un 
> fonctionne avec python2.7 et s'appelle 'gandalf'. L'autre avec python3.4 et 
> s'appelle 'tuto_env'. Sous 'gandalf' j'ai installé django + mezzanine selon 
> le tutoriel de Ross Laird. Sous 'tuto_env' je n'ai installé pour l'instant 
> que django avec la commande : pip install django. Sous 'gandalf' tout 
> fonctionne correctement. Sous 'tuto_env' j'ai le problème suivant. Au 
> moment de l'installation de django, le message d'erreur suivant apparaît:
> (tuto_env) philippe@srv-web-idlas:~/www-dev/.virtualenvs/tuto_env$ sudo 
> pip install django
>
>>
>> Requirement already satisfied (use --upgrade to upgrade): django in 
>> /usr/local/lib/python2.7/dist-packages
>> Cleaning up...
>>
>
> Pourtant avant de lancer l'installation de django je me connecte bien dans 
> mon environnement 'tuto_env' comme ceci :
>
> workon tuto_env
>
>
> J'ai également installé 'yolk' et la liste des packages installés montre 
> que le seul environnement actif pour python est python2.7. 
>
> (tuto_env) philippe@srv-web-idlas:~/www-dev/.virtualenvs/tuto_env$ yolk -l
>> Django 1.9.8 has no metadata
>> Pillow  - 2.6.1- active 
>> South   - 1.0.2- active development 
>> (/usr/local/lib/python2.7/dist-packages)
>> argparse- 1.2.1- active development (/usr/lib/python2.7)
>> cffi- 0.8.6- active 
>> chardet - 2.3.0- active 
>> colorama- 0.3.2- active 
>> cryptography- 0.6.1- active 
>> filebrowser-safe 0.4.3 has no metadata
>> html5lib- 0.999- active 
>> lxml- 3.4.0- active 
>> ndg-httpsclient - 0.3.2- active development 
>> (/usr/lib/pymodules/python2.7)
>> numpy   - 1.8.2- active 
>> pbr 1.8.1 has no metadata
>> pip - 1.5.6- active 
>> ply - 3.4  - active 
>> psycopg2- 2.5.4- active 
>> pyOpenSSL   - 0.14 - active 
>> pyasn1  - 0.1.7- active 
>> pycparser   - 2.10 - active 
>> pycups  - 1.9.63   - active 
>> pycurl  - 7.19.5   - active 
>> PyGObject   - 3.14.0   - active 
>> pysmbc  - 1.0.15.3 - active 
>> pyxdg   - 0.25 - active 
>> requests- 2.4.3- active 
>> setuptools  - 5.5.1- active 
>> six 1.10.0 has no metadata
>> six - 1.8.0- non-active 
>> stevedore 1.12.0 has no metadata
>> urllib3 - 1.9.1- active 
>> virtualenv-clone - 0.2.6- active development 
>> (/usr/local/lib/python2.7/dist-packages)
>> virtualenv  - 1.11.6   - non-active 
>> virtualenv 14.0.6 has no metadata
>> virtualenvwrapper 4.7.1 has no metadata
>> wheel   - 0.24.0   - active 
>> wsgiref - 0.1.2- active development (/usr/lib/python2.7)
>> yolk- 0.4.3- active development 
>> (/usr/local/lib/python2.7/dist-packages)
>>
>   
> Je ne comprends pas bien d'où vient mon erreur. Si quelqu'un pouvez me 
> donner une idée ou une piste ?
>
> Cordialement.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/010d5330-4dca-41b9-999b-83d0333cd97f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Registration for Django: Under the Hood 2016 is now open!

2016-07-25 Thread Ola Sitarska
*Django: Under the Hood  is back for 
its third edition!*

*DUTH is an annual Django conference that takes place in Amsterdam, the 
Netherlands. On 3rd - 6th November this year, we're going to see 9 deep 
dive talks into topics of Django channels, testing, Open Source funding, 
JavaScript, Django forms validation, debugging and many more.*

Django: Under the Hood also gives the opportunity to bring many Django core 
developers to work together and shape the future of Django with a group of 
300 passionate Django developers attending the conference.

This year, the registration process for the conference became a lottery to 
avoid mad rush and tickets selling out in minutes.


*You can register now , 
and the lottery is only open until 26th of July at noon Amsterdam time.*
If you want to make sure that tickets for your team are reserved and set 
aside, Django: Under the Hood still has few sponsorship opportunities open. 
Please get in touch on he...@djangounderthehood.com.

We can't wait to see you in Amsterdam!

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9f7d2e37-00c9-4ed2-a442-5d93a4976173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django selected value

2016-07-25 Thread Shem Geek

Had a similar problem today, other than using django forms, ensure your 
select box is named, wen the selct box is named, the selected value witll 
have the name of the select box:
 example:

 option 1 
 option 2


in django after posting the form:
you cant get the value by.
selected_opt = request.POST['myoptions']

On Saturday, July 23, 2016 at 8:46:56 PM UTC+3, Volodymyr Kirichinets wrote:
>
> How to get value/name of currently selected drop box item?
>
> my models.py :
>
> class Model2(models.Model):
> 
> .
> choice_field = models.ManyToManyField(to=Model1)
> 
> 
>
> class Model2Form(ModelForm):
> class Meta:
> model = Model2
> fields = ['choice_field']
> 
> .
>
>
>
> my views.py:
>
> def myfunc(request):
> form = Model2Form()
> if request.method == 'POST':
> form1 = Model2Form(request.POST)
> if form1.is_valid():
> form1.save()
> return 
> ..
> myquery = Model2.objects.values('choice_field').last()
>
> In template.html when I try {{ myquery.choice_field }} - i get 
> {'choice_field': 5}. How can I get a name of currently selected 
> choice_field item and/or value of currently selected choice_field item?
>
>
>
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/10069b0b-ee29-457e-92d3-cbf2adc9f564%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I do a multiple select in the Admin filters ?

2016-07-25 Thread Hurlu
Hi everyone,

For the project I'm working on, I got a Dish Model in which, in order to 
filter different dishes for allergens or other reasons, I got a 
BooleanField to check if the dish is* pork-free*, another to check if it's* 
nuts-free* and a good other 

*dozen.*As you would expect, displaying all thoses filters side by side 
would by very unesthetical and unpratical. So I aimed to reduce their 
number to two: One *multiple select* filter for "*contains this:*", and 
another for "*does not contain*:".

My researches so far were not very successful : the best I could find is 
this module , namely Django-adminfilters 
, that I could not quite get 
to work, as well as many not-so-helpful SO posts. 


Could someone please enlighten me, be it with a way to do it or a 
workaround ?
Thanks a lot !

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/44ac6507-4072-4677-8dde-dd367145e826%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError: $.get is not a function

2016-07-25 Thread ludovic coues
$.get look a lot like Jquery.

Do you mind to share what version you are using ? You can find out with
`alert($.fn.jquery)`

2016-07-25 16:34 GMT+02:00 Gergely Polonkai :

> This sounds to be a JavaScript problem, which is not part of Django in any
> ways.
>
> My idea, however, is that you don’t import another JS file that contains
> the $ function (probably jQuery or Prototype?)
>
>
>
> Gergely Polonkai
> [image: https://]about.me/gergely.polonkai
>
> 
>
> 2016-07-25 12:31 GMT+02:00 ajay :
>
>> //In scirpt
>>
>> $('#suggest').keyup(function ()
>> {
>>var query = $('#suggest').value;
>>
>>  $.get("/search/", {suggest:query},function( data ){
>>  $("#list").html( {% for item in search_list %}
>> ''+{{ item }}+ ''
>> {% endfor %} )
>>
>>
>> });
>>
>>
>>
>> In body
>>
>>
>> 
>> 
>> 
>>
>>
>> am i doing something wrong
>>
>> plz help
>>
>> --
>> 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 email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/f874db3a-1e19-4cef-9deb-9beed11159d2%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACczBU%2BHq2a7Xs7U5tqcfFF%2BZ2CzyQMTiMtetjkbxym5SJuczQ%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTamODge%3D-_4FaM2HMG2MV5sVXpdBDKqbJ88STBxRmTWdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django selected value

2016-07-25 Thread Volodymyr Kirichinets
Hi Shem,
Thanks for Your interest,
But I solved this in more flexible and convenient model.(without requests, 
get selected options and other).
I use now ManyToManyField and this solve many problems.
Thanks for Your interest. I invite You to Python Dnipro, Django Dnipro, 
Pyramid Dnipro - Google Groups, 
If You interested - add this groups.
Sincerely,
Volodymyr

>
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/162bbeb2-2d91-4755-93e0-aa5ec9018599%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django MySql weirdness

2016-07-25 Thread Steve Bischoff

http://stackoverflow.com/questions/38534734/django-42000-invalid-default-value-for-action-time

I have been trying to figure this one out for a bit now, does anyone have 
any tips on why mysql won't take in this date time from django?

Thanks

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e7900617-6c13-4bbc-b9ad-a542310d79a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I do a multiple select in the Admin filters ?

2016-07-25 Thread Constantine Covtushenko
Hi Hurlu,

I can suggest two approaches here.

   1. change your model so that it contains two fields: 'allowed' and 
   'disallowed'. Every of which is an array of allowed and disallowed items 
   respectively. You can use JSON Field for that. This approach has benefit 
   that your models looks simple and can be easily extended with additional 
   allowed/disallowed items. In your example every time new valuable property 
   identified your should extend model and handle migrations both schema and 
   data. With this approach Django/admin can handle your 
   requirements pretty straightforward.
   2.  create custom form with 2 custom fields: allowed and disallowed. 
   Exclude all extra filters as an 'excluded'. And override 'save' method to 
   map users data from use input to model filters. And do it before model is 
   saved.

I hope that should solve your problem.
Regards

On Monday, July 25, 2016 at 6:25:29 PM UTC+3, Hurlu wrote:
>
> Hi everyone,
>
> For the project I'm working on, I got a Dish Model in which, in order to 
> filter different dishes for allergens or other reasons, I got a 
> BooleanField to check if the dish is* pork-free*, another to check if it's* 
> nuts-free* and a good other 
>
> *dozen.*As you would expect, displaying all thoses filters side by side 
> would by very unesthetical and unpratical. So I aimed to reduce their 
> number to two: One *multiple select* filter for "*contains this:*", and 
> another for "*does not contain*:".
>
> My researches so far were not very successful : the best I could find is 
> this module , namely Django-adminfilters 
> ,
>  
> that I could not quite get to work, as well as many not-so-helpful SO 
> posts. 
> 
> 
> Could someone please enlighten me, be it with a way to do it or a 
> workaround ?
> Thanks a lot !
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9184f12b-1d1d-4630-9f5a-a2ab74980726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django selected value

2016-07-25 Thread Sergiy Khohlov
Many to many fields are not good due to performance issues. It is not
important for small Db but for big it is a problem.
Simplest way for understanding form is a adding debug print(form)inside
your views get function.
Next step is turning off form autocommit, update your form fields and save
it.

25 лип. 2016 21:36 "Volodymyr Kirichinets"  пише:

> Hi Shem,
> Thanks for Your interest,
> But I solved this in more flexible and convenient model.(without requests,
> get selected options and other).
> I use now ManyToManyField and this solve many problems.
> Thanks for Your interest. I invite You to Python Dnipro, Django Dnipro,
> Pyramid Dnipro - Google Groups,
> If You interested - add this groups.
> Sincerely,
> Volodymyr
>
>>
>> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/162bbeb2-2d91-4755-93e0-aa5ec9018599%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJMpeF7LOsC4VqotCWznHFf8r2m-VO9rP1cmXEYP5mDU2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django MySql weirdness

2016-07-25 Thread Constantine Covtushenko
Hi Steve,

Can you please provide code snippet here for 'action_time' field?

Regards,

On Mon, Jul 25, 2016 at 9:11 PM, Steve Bischoff 
wrote:

>
>
> http://stackoverflow.com/questions/38534734/django-42000-invalid-default-value-for-action-time
>
> I have been trying to figure this one out for a bit now, does anyone have
> any tips on why mysql won't take in this date time from django?
>
> Thanks
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e7900617-6c13-4bbc-b9ad-a542310d79a8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK52boWEQ%3DebdOriaSBziy-TqLZGN3%2BTeSWZWbmBvEdcK3V4Pw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Reverse URL django-admin

2016-07-25 Thread 'dtdave' via Django users
I apologise in advance for the length of my post but I have included all 
the detail I can.

I have the following structure for an app. The list view template uses 
Bootstrap DataTables. My question is how to amend the urls to return the 
change url in django-admin.


models.py

def get_absolute_url(self):
return reverse('contact_detail', kwargs={"id": self.id})

urls.py


from django.conf.urls import url
from .views import (
contacts_list,
contacts_detail,
)


urlpatterns = [
url(r'^$', contacts_list, name='contact_list'),
url(r'^(?P\d+)/$', contacts_detail, name='contact_detail'),
]


views.py
from django.contrib.auth.decorators import user_passes_test
from django.shortcuts import render, get_object_or_404
from .models import Contact


@user_passes_test(lambda u: u.is_staff)
def contacts_list(request):
c = {}
contacts = Contact.objects.all()
c['contacts'] = contacts
return render(request, 'contacts/contacts_list.html', c)


def contacts_detail(request, id=None):
instance = get_object_or_404(Contact, id=id)
context = {
"title": "Contact Details",
"instance": instance,
}
return render(request, "contacts/contacts_detail.html", context)

contact_list.html
{{ contact.id }}

Any advice would be appreciated.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c37dbdb-bfcc-4555-8112-abd849c78055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django selected value

2016-07-25 Thread Volodymyr Kirichinets
Вечер добрый, Сергей
Я не знаю какие там проблемы с большой базой, но моя база тоже не маленькая.
И к тому же у меня задачи которые не решить без ManyToManyField - другие не 
подходят и вызывают еще больше проблем.  Я вызываю данные с моделей и 
заполняю модели, так что акцент на формах тут неуместен.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9ea0b44f-b796-41b1-a3c3-96347f705f3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django selected value

2016-07-25 Thread Volodymyr Kirichinets
 Сергей, добавляйся  в Python Dnipro, Django Dnipro, Pyramid Dnipro - 
Google Groups

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/65999e6f-32e8-4fef-a1ce-539515f159a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Installation de Django dans un environnement virtuel.

2016-07-25 Thread Quentin Fulsher
Je aussi pense que le probleme est quand tu utilizes le command `sudo`. J'irai 
essayer le installation sans le `sudo`. 

Aussi français n'est pas mon premiere lang donc si tu ne comprend je peux 
essayer encore.

Bon chance!

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b3771fac-26a3-470e-b1cb-e1b30f3cf040%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.