Re: Mysql-python in Windows

2017-12-10 Thread Egor Smolyakov
Hello.

Take a look at https://pypi.python.org/pypi/PyMySQL/0.7.11

On 10/12/2017, Julián Melero Hidalgo  wrote:
> Hi all!
> I'm trying to install pip install mysql-python, but it doesn't works.
> I'm using Win10, Xampp, Python 3.
> How can I install it?
> 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/510fd5bd-1e89-4550-bbe5-45d36264db92%40email.android.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Kind Regards, Egor Smolyakov.

-- 
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/CACL14xqimS7rbnsbcwJHTQsrLa5CpxgNVdL_%2Bv45fObNz7GfdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 2.0 Tutorial Template

2017-12-10 Thread Carl Brubaker
Alright, so I found out the my text editor was saving my files incorrectly. 
Even though it had ".html" it was displaying the whole text in the web 
browser, instead of interpreting the the code.

-- 
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/1c3d097e-e41f-475c-b5c6-b624504f0a07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [OT] Is Trump planning to break the Internet?

2017-12-10 Thread Larry Martell
On Sun, Dec 10, 2017 at 5:24 PM, Etienne Robillard  wrote:
> Hey all,
>
> On December 14, the FCC will vote to repeal net neutrality and possibly rig
> the Internet. This means that major corporations could pay to have their
> content delivered faster while independent websites traffic would be
> throttled. I think this is a outrageous move and could seriously harm
> independent websites and communities from reaching their key audience. We
> must not let this happen!
>
> Please share the word with your peers. It is imperative that we must unite
> and act together to fight for our freedom of speech and prevent the Internet
> from becoming obsolete. The Internet is a brilliant technology allowing
> billions of people to share their knowledge independently. We must defend at
> all costs its very own foundations and protect it from censorship and
> tyranny!

Please keep your political rhetoric and irresponsible scaremongering
off this list.

All the net neutrality repeal will do is restore some of the
permissionless innovation that allowed the internet to blossom in the
first place.

-- 
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/CACwCsY6xLxfMMLA1te%2Bn0WD8AurqO-fQzp3j%2B-irasaT7EVY-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 2.0 Tutorial Template

2017-12-10 Thread Carl Brubaker
Tried that one too, as it is further down in the tutorial. Still the same 
result.

On Sunday, 10 December 2017 17:52:30 UTC-5, Roberth Solis Martínez wrote:
>
> I think its better if you use:
>
> context = {
> 'latest_question_list': latest_question_list,
> }
>
> return render(request, 'polls/index.html', context)
>
>

-- 
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/4159a2fc-2048-49c9-84b5-4178fa7a01fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 2.0 Tutorial Template

2017-12-10 Thread Roberth Solis Martínez
I think its better if you use:

context = {
'latest_question_list': latest_question_list,
}

return render(request, 'polls/index.html', context)

-- 
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/1f92136a-a5b2-4880-af6e-2325dc03a1ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[OT] Is Trump planning to break the Internet?

2017-12-10 Thread Etienne Robillard

Hey all,

On December 14, the FCC will vote to repeal net neutrality and possibly 
rig the Internet. This means that major corporations could pay to have 
their content delivered faster while independent websites traffic would 
be throttled. I think this is a outrageous move and could seriously harm 
independent websites and communities from reaching their key audience. 
We must not let this happen!


Please share the word with your peers. It is imperative that we must 
unite and act together to fight for our freedom of speech and prevent 
the Internet from becoming obsolete. The Internet is a brilliant 
technology allowing billions of people to share their knowledge 
independently. We must defend at all costs its very own foundations and 
protect it from censorship and tyranny!


Sincerely,

Etienne Robillard

https://www.fightforthefuture.org/


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/da647177-c1e5-b0be-cbca-fdb6d9794b18%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Mysql-python in Windows

2017-12-10 Thread Julián Melero Hidalgo
Hi all!I'm trying to install pip install mysql-python, but it doesn't works.I'm using Win10, Xampp, Python 3.How can I install it?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/510fd5bd-1e89-4550-bbe5-45d36264db92%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


tutorial on mongodb and django

2017-12-10 Thread Krishna Neupane
Hey I am trying to learn Django and wanted to implement it with mongoDB. 
Are there any pointers where I could learn- anything could help from 
youtube videoes to tutorials.

-- 
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/ee1ed6a4-e597-4ce3-937c-a21a67efdfc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 2.0 Tutorial Template

2017-12-10 Thread Carl Brubaker
Code for my view.py

from django.shortcuts import render
from django.http import HttpResponse
from django.http import Http404
from django.shortcuts import render
from django.template import loader

from .models import Question

# Create your views here.
def index(request):
latest_question_list = Question.objects.order_by('-pub_date')[:5]
template = loader.get_template('polls/index.html')
context = {
'latest_question_list': latest_question_list,
}
return HttpResponse(template.render(context, request))

def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)

def results(request, question_id):
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)

def vote(request, question_id):
return HttpResponse("You're voting on question %s." % question_id)



According to the tutorial, I'm supposed to have: "Load the page by pointing 
your browser at “/polls/”, and you should see a bulleted-list containing 
the “What’s up” question from Tutorial 2 
. The link points 
to the question’s detail page." which I'm not seeing.

-- 
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/ebf4db21-0c96-4e03-81fd-4fb5f125e96c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: About 'main' app, and using it from other apps.

2017-12-10 Thread Dylan Reinhold
No, I would not think of the my_first_django folder as the main app.
If you have common stuff create a new app named common or base and put your
stuff in there.

Dylan

On Sun, Dec 10, 2017 at 7:37 AM, Marsanghas  wrote:

> Hi all!
>
> Started with Django a few days ago (version 2.0, Python 3.6.3). As a noob
> (no experience with Python and Django, and very little with MVC (sorry, MTV
> ;-) ), I have a little question that wasn't really clear to me from the
> tutorial.
>
> When creating a project, for example 'my_first_django' and creating the
> polls app, my directory structure would be:
>
> my_first_django
> \_ my_first_django
> \_ polls
>
> Those 2 (\_ my_first_django and \_ polls) are both apps, right?
> my_first_django being the 'main' app, with the projects' settings.py. I
> didn't really get that from the tutorial.
> My confusion comes from the fact that I want to create a site project and
> it feels more logical to start with the 'main' app and build modules (apps)
> next to it. The tutorial doesn't start there.
>
> What is the common practice? Don't use the 'main' app ( my_first_djano in
> this case ) as an app at all, only just for some global settings, or use it
> as the main app and create other apps as 'modules' that can be used from
> within the main? Maybe a silly question. Sorry about that.
>
> I am also asking because I want to use template inheritence in the polls
> app. I got it working by putting a base.html in 
> /my_first_django/my_first_django/templates
> , in /my_first_django/my_first_django/apps.py I put:
>
> from django.apps import AppConfig
>
> class MainConfig(AppConfig):
> name = 'my_first_django'
>
> And set that in the settings.py [INSTALLED_APPS] section (
> 'my_first_django.apps.MainConfig', ). (I probably shouldn't have used
> MainConfig but MyFirstDjangoConfig, right?)
>
> Now I can call the base.html template from the template in the polls app:
>
> {% extends "base.html" %}
>
> Is this the correct way to go about it?
>
> Thanx for any help!
>
> Regards,
> Marcel
>
> --
> 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/H7r0YWfmP5B1qPCxVIbx-5Hwe6x4OfdwV7zrAxjOdgDkFjNMI1D
> CWfm3EpB23eXP-Y0-pVzlrNSXsuU6rKODJQ%3D%3D%40i-am-b.org
> 
> .
> 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/CAHtg44CGrOcVJQOWPzk35gpWTMjSWR%3Dq_eX3rroxeSk30asaqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Why get "Server Error 500" instead of 404 template?

2017-12-10 Thread Chris Seberino
I cannot track down why 404 page isn't being used.  I can't get any help 
from syslog or Nginx log files.
I tried adding DEBUG=True to settings.py and still no clues.
I only get "Server Error 500".

Here is settings.py

TEMPLATES= [{"BACKEND" :
"django.template.backends.django.DjangoTemplates",
 "DIRS": [VIEWS.format(e) for e in APPS],
 "OPTIONS" :
{"context_processors" :
 ["django.template.context_processors.debug",
  "django.template.context_processors.request"]}}]
MIDDLEWARE   = ["django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",

"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",

"django.middleware.clickjacking.XFrameOptionsMiddleware"]
WSGI_APPLICATION = "nginx.wsgi.application"
INSTALLED_APPS   = APPS + ["django.contrib.admin",
   "django.contrib.auth",
   "django.contrib.contenttypes",
   "django.contrib.messages",
   "django.contrib.sessions",
   "django.contrib.staticfiles"]

-- 
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/977652c4-f86e-491c-a5af-ccbba38dc733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


About 'main' app, and using it from other apps.

2017-12-10 Thread Marsanghas
Hi all!

Started with Django a few days ago (version 2.0, Python 3.6.3). As a noob (no 
experience with Python and Django, and very little with MVC (sorry, MTV ;-) ), 
I have a little question that wasn't really clear to me from the tutorial.

When creating a project, for example 'my_first_django' and creating the polls 
app, my directory structure would be:

my_first_django
\_ my_first_django
\_ polls

Those 2 (\_ my_first_django and \_ polls) are both apps, right? my_first_django 
being the 'main' app, with the projects' settings.py. I didn't really get that 
from the tutorial.
My confusion comes from the fact that I want to create a site project and it 
feels more logical to start with the 'main' app and build modules (apps) next 
to it. The tutorial doesn't start there.

What is the common practice? Don't use the 'main' app ( my_first_djano in this 
case ) as an app at all, only just for some global settings, or use it as the 
main app and create other apps as 'modules' that can be used from within the 
main? Maybe a silly question. Sorry about that.

I am also asking because I want to use template inheritence in the polls app. I 
got it working by putting a base.html in 
/my_first_django/my_first_django/templates , in 
/my_first_django/my_first_django/apps.py I put:

from django.apps import AppConfig

class MainConfig(AppConfig):
name = 'my_first_django'

And set that in the settings.py [INSTALLED_APPS] section ( 
'my_first_django.apps.MainConfig', ). (I probably shouldn't have used 
MainConfig but MyFirstDjangoConfig, right?)

Now I can call the base.html template from the template in the polls app:

{% extends "base.html" %}

Is this the correct way to go about it?

Thanx for any help!

Regards,
Marcel

-- 
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/H7r0YWfmP5B1qPCxVIbx-5Hwe6x4OfdwV7zrAxjOdgDkFjNMI1DCWfm3EpB23eXP-Y0-pVzlrNSXsuU6rKODJQ%3D%3D%40i-am-b.org.
For more options, visit https://groups.google.com/d/optout.


Re: ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Andréas Kühne
Checking through the documents I found the following reference:

https://docs.djangoproject.com/en/2.0/topics/forms/media/#order-of-assets

Changed in Django 2.0:

In older versions, the assets of Media objects are concatenated rather than
merged in a way that tries to preserve the relative ordering of the
elements in each list.


I'm guessing that this is your problem.

>From what I understand in this context, the:

**
import seems to be added in a previous dependent form and therefore is not
added again - you should probably check if the file is added somewhere else?

Best regards,

Andréas

2017-12-10 15:47 GMT+01:00 Marc R :

> because they are specific to only a few models, particularly the loading
> scripts, and options, etc.  this worked great in Django 1.11
>
>
> On Sunday, 10 December 2017 09:36:56 UTC-5, Etienne Robillard wrote:
>
>> Why don't you simply put the javascripts into your base template without
>> using Python ?
>>
>> Etienne
>>
>> Le 2017-12-10 à 09:30, Marc R a écrit :
>>
>> I have this in my model:
>>
>> class Media:
>> js = (
>>* '/static/plugins/codemirror/lib/codemirror.js',*
>> '/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
>> '/static/plugins/codemirror/addon/fold/foldcode.js',
>> '/static/plugins/codemirror/addon/fold/foldgutter.js',
>> '/static/plugins/codemirror/addon/fold/brace-fold.js',
>> '/static/plugins/codemirror/addon/fold/indent-fold.js',
>> '/static/plugins/codemirror/addon/fold/comment-fold.js',
>> '/static/plugins/codemirror/addon/fold/xml-fold.js',
>> '/static/plugins/codemirror/addon/comment/comment.js',
>> '/static/plugins/codemirror/addon/edit/matchbrackets.js',
>> '/static/plugins/codemirror/addon/edit/matchtags.js',
>> '/static/plugins/codemirror/mode/javascript/javascript.js',
>> '/static/plugins/codemirror/mode/xml/xml.js',
>> '/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
>> '/static/plugins/codemirror/addon/display/fullscreen.js',
>> '/static/js/admin/syslog/syslog_change_form.min.js'
>> )
>>
>> which used to work as it was included in the model admin page in the
>> order it appears. However, now in Django 2.0, it appears in this order:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> *> src="/static/plugins/codemirror/lib/codemirror.js">*
>> 
>> 
>> 
>>
>> The issue is that the First file MUST be first as the remainder rely upon
>> it!  I'd rather not override a template file as if i change the admin
>> backend with a package i'd like this to "just work" as it did in Django 1.11
>> Is this a bug in the new way that Django includes these files (docs say
>> they made a change in how this is done, clearly it broke something that
>> worked!).
>>
>> 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...@googlegroups.com.
>> To post to this group, send email to django...@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/ms
>> gid/django-users/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Etienne Robillardtka...@yandex.comhttps://www.isotopesoftware.ca/
>>
>> --
> 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/8493b435-1574-4187-88f6-7f45f5dbaba6%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/CAK4qSCfTd0BBjYQsovHPx%2BS40U_dA1RA%3DYDNtBdYS3GJJFbKpA%40mail.gmail.com.
For more options, visit https://groups

Re: ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Marc R
because they are specific to only a few models, particularly the loading 
scripts, and options, etc.  this worked great in Django 1.11

On Sunday, 10 December 2017 09:36:56 UTC-5, Etienne Robillard wrote:
>
> Why don't you simply put the javascripts into your base template without 
> using Python ? 
>
> Etienne
>
> Le 2017-12-10 à 09:30, Marc R a écrit :
>
> I have this in my model: 
>
> class Media:
> js = (
>* '/static/plugins/codemirror/lib/codemirror.js',*
> '/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
> '/static/plugins/codemirror/addon/fold/foldcode.js',
> '/static/plugins/codemirror/addon/fold/foldgutter.js',
> '/static/plugins/codemirror/addon/fold/brace-fold.js',
> '/static/plugins/codemirror/addon/fold/indent-fold.js',
> '/static/plugins/codemirror/addon/fold/comment-fold.js',
> '/static/plugins/codemirror/addon/fold/xml-fold.js',
> '/static/plugins/codemirror/addon/comment/comment.js',
> '/static/plugins/codemirror/addon/edit/matchbrackets.js',
> '/static/plugins/codemirror/addon/edit/matchtags.js',
> '/static/plugins/codemirror/mode/javascript/javascript.js',
> '/static/plugins/codemirror/mode/xml/xml.js',
> '/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
> '/static/plugins/codemirror/addon/display/fullscreen.js',
> '/static/js/admin/syslog/syslog_change_form.min.js'
> )
>
> which used to work as it was included in the model admin page in the order 
> it appears. However, now in Django 2.0, it appears in this order:
>  src="/static/plugins/codemirror/addon/fold/foldcode.js">
>  src="/static/plugins/codemirror/addon/fold/foldgutter.js">
>  src="/static/plugins/codemirror/addon/fold/brace-fold.js">
>  src="/static/plugins/codemirror/addon/fold/indent-fold.js">
>  src="/static/plugins/codemirror/addon/fold/comment-fold.js">
>  src="/static/plugins/codemirror/addon/fold/xml-fold.js">
>  src="/static/plugins/codemirror/addon/comment/comment.js">
>  src="/static/plugins/codemirror/addon/edit/matchbrackets.js">
>  src="/static/plugins/codemirror/addon/edit/matchtags.js">
>  src="/static/plugins/codemirror/mode/javascript/javascript.js">
>  src="/static/plugins/codemirror/mode/xml/xml.js">
> * src="/static/plugins/codemirror/lib/codemirror.js">*
>  src="/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js">
>  src="/static/plugins/codemirror/addon/display/fullscreen.js">
>  src="/static/js/admin/syslog/syslog_change_form.min.js">
>
> The issue is that the First file MUST be first as the remainder rely upon 
> it!  I'd rather not override a template file as if i change the admin 
> backend with a package i'd like this to "just work" as it did in Django 1.11
> Is this a bug in the new way that Django includes these files (docs say 
> they made a change in how this is done, clearly it broke something that 
> worked!).
>
> 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...@googlegroups.com .
> To post to this group, send email to django...@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/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> Etienne robillardtka...@yandex.com 
> https://www.isotopesoftware.ca/
>
>

-- 
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/8493b435-1574-4187-88f6-7f45f5dbaba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Etienne Robillard
Why don't you simply put the javascripts into your base template without 
using Python ?


Etienne


Le 2017-12-10 à 09:30, Marc R a écrit :

I have this in my model:

class Media:
        js = (
*'/static/plugins/codemirror/lib/codemirror.js',*
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/fold/foldcode.js',
'/static/plugins/codemirror/addon/fold/foldgutter.js',
'/static/plugins/codemirror/addon/fold/brace-fold.js',
'/static/plugins/codemirror/addon/fold/indent-fold.js',
'/static/plugins/codemirror/addon/fold/comment-fold.js',
'/static/plugins/codemirror/addon/fold/xml-fold.js',
'/static/plugins/codemirror/addon/comment/comment.js',
'/static/plugins/codemirror/addon/edit/matchbrackets.js',
'/static/plugins/codemirror/addon/edit/matchtags.js',
'/static/plugins/codemirror/mode/javascript/javascript.js',
            '/static/plugins/codemirror/mode/xml/xml.js',
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/display/fullscreen.js',
'/static/js/admin/syslog/syslog_change_form.min.js'
        )

which used to work as it was included in the model admin page in the 
order it appears. However, now in Django 2.0, it appears in this order:
src="/static/plugins/codemirror/addon/fold/foldcode.js">
src="/static/plugins/codemirror/addon/fold/foldgutter.js">
src="/static/plugins/codemirror/addon/fold/brace-fold.js">
src="/static/plugins/codemirror/addon/fold/indent-fold.js">
src="/static/plugins/codemirror/addon/fold/comment-fold.js">
src="/static/plugins/codemirror/addon/fold/xml-fold.js">
src="/static/plugins/codemirror/addon/comment/comment.js">
src="/static/plugins/codemirror/addon/edit/matchbrackets.js">
src="/static/plugins/codemirror/addon/edit/matchtags.js">
src="/static/plugins/codemirror/mode/javascript/javascript.js">
src="/static/plugins/codemirror/mode/xml/xml.js">
*src="/static/plugins/codemirror/lib/codemirror.js">*
src="/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js">
src="/static/plugins/codemirror/addon/display/fullscreen.js">
src="/static/js/admin/syslog/syslog_change_form.min.js">


The issue is that the First file MUST be first as the remainder rely 
upon it!  I'd rather not override a template file as if i change the 
admin backend with a package i'd like this to "just work" as it did in 
Django 1.11
Is this a bug in the new way that Django includes these files (docs 
say they made a change in how this is done, clearly it broke something 
that worked!).


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/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
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/36e6755b-ed27-9a77-9bdd-77a9bd4bf429%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


ModelAdmin Media JS file order issue in Django 2.0

I have this in my model:

class Media:
js = (
   * '/static/plugins/codemirror/lib/codemirror.js',*
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/fold/foldcode.js',
'/static/plugins/codemirror/addon/fold/foldgutter.js',
'/static/plugins/codemirror/addon/fold/brace-fold.js',
'/static/plugins/codemirror/addon/fold/indent-fold.js',
'/static/plugins/codemirror/addon/fold/comment-fold.js',
'/static/plugins/codemirror/addon/fold/xml-fold.js',
'/static/plugins/codemirror/addon/comment/comment.js',
'/static/plugins/codemirror/addon/edit/matchbrackets.js',
'/static/plugins/codemirror/addon/edit/matchtags.js',
'/static/plugins/codemirror/mode/javascript/javascript.js',
'/static/plugins/codemirror/mode/xml/xml.js',
'/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js',
'/static/plugins/codemirror/addon/display/fullscreen.js',
'/static/js/admin/syslog/syslog_change_form.min.js'
)

which used to work as it was included in the model admin page in the order 
it appears. However, now in Django 2.0, it appears in this order:











**




The issue is that the First file MUST be first as the remainder rely upon 
it!  I'd rather not override a template file as if i change the admin 
backend with a package i'd like this to "just work" as it did in Django 1.11
Is this a bug in the new way that Django includes these files (docs say 
they made a change in how this is done, clearly it broke something that 
worked!).

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/5ad93160-05c2-4251-84ad-6f8a1574b675%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django 2.0 Tutorial Template

What do you mean by not loading correctly?
is it a problem of your urls.py setting? 

-- 
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/e2c524f1-f27f-4697-9476-fcbfa4466df1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.11

Hi.

Please do the official tutorial first to get hang of Django concepts.
https://docs.djangoproject.com/en/1.11/intro/tutorial01/

If you feel that official tutorial is too packed Django Girls do have
excellent tutorial. https://tutorial.djangogirls.org/en/

10.12.2017 5.58 "minh quang"  kirjoitti:

> Hi all, i am begining develop web django. If i buid django web app to
> manage studen't score result then will i creat what model is?
> ,thanks 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, 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/56f55f56-9b21-48e3-ba4e-a271d808b4d5%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/CAHn91oc4OqPJQQANoVSVdAHGqcfQA0CCUtQS1A3V08OfBL%2B%3Duw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 2.0 Tutorial Template

It look s fine also to me. What do you expect ?

2017-12-10 5:50 GMT+01:00 Dylan Reinhold :

> That looks fine. how about your view.py.
>
> Dylan
>
> On Sat, Dec 9, 2017 at 6:05 PM, Carl Brubaker 
> wrote:
>
>> I copied it from the django tutorial page:
>>
>> {% if latest_question_list %}
>> 
>> {% for question in latest_question_list %}
>> {{
>> question.question_text }}
>> {% endfor %}
>> 
>> {% else %}
>> No polls are available.
>> {% endif %}
>>
>>
>> --
>> 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/ms
>> gid/django-users/e9c01727-427d-4be6-a639-8d1f7e1f0e06%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/CAHtg44ALo1QrxQq2GieUP5O265rbY
> KRd0gk35SPp-agybNm-eA%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/CAA2xsHTZrDxV%3Dfed5m_FmgFmh%3DWPA4DenfXT4T-nxWApa61btg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.