Re: PROBLEM 2

2018-12-03 Thread Lachlan Musicman
>
> On Tue, 4 Dec 2018 at 11:31, David Figueroa 
> wrote:
>
>> in the process of creating my first views I am having this problem when I
>> will check if everything is working well on the page
>>
>> --
>> 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/fc842ede-47dd-4b89-9590-4f1d1eea1c8b%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

Sorry David, I should have been clearer.

The .com will never work unless you own that domain, which I doubt. Also,
you need the colon:

The url you want is  http://localhost:8000/polls

Note: no .com, there's a : between localhost and 8000. (*tells the browser
to talk to the server on port 8000 instead of the regular http port which
is 80)

Cheers
L.



-- 
--
"The fact that you're still saying something like 'feminism gone mad'
suggests that feminism hasn't gone mad ENOUGH yet."

Helen Zaltzman / @HelenZaltzman
https://twitter.com/HelenZaltzman/status/1065384934846545920

-- 
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/CAGBeqiPdrjoD-Q2uVRaATe5g5PQ%2B%2BAB35UGTqYi9skT%3DH2%2Bq0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PROBLEM 2

2018-12-03 Thread Lachlan Musicman
Remove the .com from the URL

On Tue, 4 Dec 2018 at 11:31, David Figueroa 
wrote:

> in the process of creating my first views I am having this problem when I
> will check if everything is working well on the page
>
> --
> 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/fc842ede-47dd-4b89-9590-4f1d1eea1c8b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
--
"The fact that you're still saying something like 'feminism gone mad'
suggests that feminism hasn't gone mad ENOUGH yet."

Helen Zaltzman / @HelenZaltzman
https://twitter.com/HelenZaltzman/status/1065384934846545920

-- 
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/CAGBeqiNi-eUNA6%2B2hT49vQz21rS%3DaSzmyM8t7cXkLMe7RKPs4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


PROBLEM 2

2018-12-03 Thread David Figueroa
in the process of creating my first views I am having this problem when I 
will check if everything is working well on the page

-- 
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/fc842ede-47dd-4b89-9590-4f1d1eea1c8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problmes

2018-12-03 Thread David Figueroa
thank 

Em segunda-feira, 3 de dezembro de 2018 10:04:38 UTC-3, Simon Charette 
escreveu:
>
> Hello David,
>
> The current latest version of the Django 1.11 serie doesn't support Python 
> 3.7[0] but
> 1.11.17, which is still unreleased[1], should per popular demand[2].
>
> Until 1.11.17 is released I'd advise you either stick to Python 3.6 or 
> upgrade to Django 2.0+.
>
> Cheers,
> Simon
>
> [0] https://pypi.org/project/Django/1.11.16/
> [1] https://docs.djangoproject.com/en/2.1/releases/1.11.17/
> [2] https://groups.google.com/forum/#!topic/django-developers/H7fP5w0YU2I
>
> Le lundi 3 décembre 2018 07:32:48 UTC-5, David Figueroa a écrit :
>>
>> The following error message appears when I try to run the following code 
>> in cmd. (I use Djanjo version 1.11 and paython 3.7) 
>> *C:\Users\david\PAYTHON\SAIT1>py manage.py runserver*
>> *Unhandled exception in thread started by > check_errors..wrapper at 0x03A46468>*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Traceback (most recent call last):  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>>  
>> line 227, in wrapperfn(*args, **kwargs)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py",
>>  
>> line 117, in inner_runautoreload.raise_last_exception()  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>>  
>> line 250, in raise_last_exceptionsix.reraise(*_exception)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\six.py",
>>  
>> line 685, in reraiseraise value.with_traceback(tb)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>>  
>> line 227, in wrapperfn(*args, **kwargs)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\__init__.py",
>>  
>> line 27, in setupapps.populate(settings.INSTALLED_APPS)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\registry.py",
>>  
>> line 85, in populateapp_config = AppConfig.create(entry)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\config.py",
>>  
>> line 94, in createmodule = import_module(entry)  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py",
>>  
>> line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], 
>> package, level)  File "", line 1006, in 
>> _gcd_import  File "", line 983, in 
>> _find_and_load  File "", line 967, in 
>> _find_and_load_unlocked  File "", line 677, in 
>> _load_unlocked  File "", line 728, in 
>> exec_module  File "", line 219, in 
>> _call_with_frames_removed  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\__init__.py",
>>  
>> line 4, in from django.contrib.admin.filters import (  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\filters.py",
>>  
>> line 10, in from django.contrib.admin.options import 
>> IncorrectLookupParameters  File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\options.py",
>>  
>> line 12, in from django.contrib.admin import helpers, widgets  
>> File 
>> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\widgets.py",
>>  
>> line 151'%s=%s' % (k, v) for k, v in params.items(),^SyntaxError: 
>> Generator expression must be parenthesized*
>>
>

-- 
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/72edf73f-f674-4b9e-9ef9-cd47b201f15b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Best way to structure this Django project

2018-12-03 Thread Pankaj Kumar
Thats a valid workflow in my opinion. Many Django works take that approach.

But alternatively, if you want you can pass the product info as parameters
in the Payment app while redirecting and can have a model in the Payment
app to capture and integrate product and payment parameters together. That
way you can avoid importing the Product model but retaining the product
informations along with payment informations.

On 3 Dec 2018 9:50 p.m., "Matthew Pava"  wrote:

> I don't think there's a way around it, but that's okay.  I have
> dependencies between several apps in my project, and the apps help organize
> the project.
> If you don't want to necessarily hard-code the app model, you could pass
> in the model as an argument and use apps.get_model(app_name, model_name)
> inside the function.
>
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
> On Behalf Of Simon Connah
> Sent: Sunday, December 2, 2018 5:31 PM
> To: django-users@googlegroups.com
> Subject: Best way to structure this Django project
>
> Hi,
>
> I have a bit of a problem with structuring a Django project. I have a
> UserProfile app which stores extra information about users using a
> OneToOneField to the Django auth user model.
>
> I have a products app which has two models relating to two types of
> products and finally I have a payments app which contains all the code
> needed to integrate with the Stripe payment processor.
>
> My problem is fairly simple. When someone buys a product I obviously
> want to take them to a payment page but if I carry on with my current
> structure that would require redirecting to a view in the payments app
> as it will contain code to work with the Stripe API but it would also
> require access to the product model(s) which would hard code a
> dependency between the payments app and the products app.
>
> Is there anyway I can rearrange my project so I can avoid this hard
> coded dependency?
>
> --
> 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/12030aa1-69ad-dc7f-c3be-72e8e2f9b50e%40gmail.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/1b12d5105a8c457e8fc7b1f45312141c%40iss2.ISS.LOCAL.
> 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/CAMAa5dNNmcJ%2Bz2HR%3DFuNJiFwP1T-dv5OTr3gJNx5-9v7NiwgWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django bugfix releases 1.11.17 and 2.1.4.

2018-12-03 Thread Ing.Daniel Bojorge
Thanks.


Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge

 *Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*

*Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*

*Programación en Capas (Web y Escritorio)* 
Mi Blog 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)



El lun., 3 dic. 2018 a las 11:11, Carlton Gibson ()
escribió:

> Details are available on the Django project weblog:
>
> https://www.djangoproject.com/weblog/2018/dec/03/bugfix-releases/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-develop...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/87C178DB-CE37-4338-89CA-707172652A23%40gmail.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/CAMQeQjagqOL41PLZNEUaRefDayVpDkx%2BP%3DFwchy3xNfuKdj5nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django bugfix releases 1.11.17 and 2.1.4.

2018-12-03 Thread Carlton Gibson
Details are available on the Django project weblog: 

https://www.djangoproject.com/weblog/2018/dec/03/bugfix-releases/

-- 
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/87C178DB-CE37-4338-89CA-707172652A23%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to set "loading" on button without using JS

2018-12-03 Thread Fellipe Henrique
Hello,

I`m using the default processo to get data from user

CreateView -> Form -> Template

Using AngularJS I can set a "spining" to a Submit button.. but.. how can I
set these without using AngularJS.. using the "normal process"

Thanks!

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
*
*Blog: *http:www.fellipeh.eti.br
*GitHub: https://github.com/fellipeh *
*Twitter: @fh_bash*

-- 
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/CAF1jwZGb2eOnvQgv-J%3D16nwgwtJd5k5eR7szKm2K09AZQa-wvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: Best way to structure this Django project

2018-12-03 Thread Matthew Pava
I don't think there's a way around it, but that's okay.  I have dependencies 
between several apps in my project, and the apps help organize the project.
If you don't want to necessarily hard-code the app model, you could pass in the 
model as an argument and use apps.get_model(app_name, model_name) inside the 
function.

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Simon Connah
Sent: Sunday, December 2, 2018 5:31 PM
To: django-users@googlegroups.com
Subject: Best way to structure this Django project

Hi,

I have a bit of a problem with structuring a Django project. I have a 
UserProfile app which stores extra information about users using a 
OneToOneField to the Django auth user model.

I have a products app which has two models relating to two types of 
products and finally I have a payments app which contains all the code 
needed to integrate with the Stripe payment processor.

My problem is fairly simple. When someone buys a product I obviously 
want to take them to a payment page but if I carry on with my current 
structure that would require redirecting to a view in the payments app 
as it will contain code to work with the Stripe API but it would also 
require access to the product model(s) which would hard code a 
dependency between the payments app and the products app.

Is there anyway I can rearrange my project so I can avoid this hard 
coded dependency?

-- 
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/12030aa1-69ad-dc7f-c3be-72e8e2f9b50e%40gmail.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/1b12d5105a8c457e8fc7b1f45312141c%40iss2.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Replicación de Bases de Datos (cualquier BD y/o Sistema Operativo)

2018-12-03 Thread Ing.Daniel Bojorge
 https://goo.gl/HjtExs

En este curso aprenderás a realizar replicación desde cualquier base de
datos hacia cualquier base de datos sin importar el sistema operativo.

Elaboraremos una solución que replique data entre diferentes tipos de bases
de datos y sistema operativo.  Veremos #PostgreSQL (en #Ubuntu y Windows),
#SQLServer ( en #Windows) y #MariaDB.

Todo con una herramienta #opensource que te hará la vida muy fácil por su
forma de trabajar.

Por precio de lanzamiento, se ofrece con un 87% de descuento desde este
enlace.

Si crees que te es útil a ti o a otra persona, ¿podrías compartirlo con tus
contactos?


Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge

 *Curso Django 2.1* 
Mi Blog 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)

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


Re: Remove user permission

2018-12-03 Thread Saurabh Agrawal
"user.user_permissions.remove" expects a permission object. Or the pk of
that object. Hence, the TypeError.

On Mon, Dec 3, 2018 at 9:02 PM Gaurav Tomer 
wrote:

> I was trying to remove permission of a user using remove utility as below -
>
> user = User.objects.get(id=user_id)
> user.user_permissions.remove("delete_polls")
>
> Then it raises TypeError:invalid literal for int with base 10:
> 'delete_polls'
>
>
> Do I need to pass index here?
>
> As it sounds kind of static way to do so. Is there anything I am missing
> here?
>
> --
> 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/CAAb%3DBQodEv2hZyi5aRka5oD_eQwCnkBxcpQz5cJpnHEc33o5DQ%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/CAL1UH0tmmGD7DfvSStABPQkce7_fJV31OGOCHLMKRNbrW2kcgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Remove user permission

2018-12-03 Thread Gaurav Tomer
I was trying to remove permission of a user using remove utility as below -

user = User.objects.get(id=user_id)
user.user_permissions.remove("delete_polls")

Then it raises TypeError:invalid literal for int with base 10:
'delete_polls'


Do I need to pass index here?

As it sounds kind of static way to do so. Is there anything I am missing
here?

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


Re: forms.FORM in django

2018-12-03 Thread Mohamed Hashi
You are seeing this page because DEBUG=True is in your settings file and
you have not configured any URLs
i wrote the codes but isnt appearing on web page 12.0.0.1
any idea or help
thanks .

-- 
You r
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/CAMsYeuHpYswJf-Q%2B-Lrn5N17GFQBMT3WS%2BNHsLqaNXznZoPg5A%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/CAOiYw3sc3jOB3uwCdkU%3D3D4BSqwybnz%3D65wa03Q-54Ky%3DJkPmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problmes

2018-12-03 Thread Simon Charette
Hello David,

The current latest version of the Django 1.11 serie doesn't support Python 
3.7[0] but
1.11.17, which is still unreleased[1], should per popular demand[2].

Until 1.11.17 is released I'd advise you either stick to Python 3.6 or 
upgrade to Django 2.0+.

Cheers,
Simon

[0] https://pypi.org/project/Django/1.11.16/
[1] https://docs.djangoproject.com/en/2.1/releases/1.11.17/
[2] https://groups.google.com/forum/#!topic/django-developers/H7fP5w0YU2I

Le lundi 3 décembre 2018 07:32:48 UTC-5, David Figueroa a écrit :
>
> The following error message appears when I try to run the following code 
> in cmd. (I use Djanjo version 1.11 and paython 3.7) 
> *C:\Users\david\PAYTHON\SAIT1>py manage.py runserver*
> *Unhandled exception in thread started by  check_errors..wrapper at 0x03A46468>*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Traceback (most recent call last):  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>  
> line 227, in wrapperfn(*args, **kwargs)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py",
>  
> line 117, in inner_runautoreload.raise_last_exception()  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>  
> line 250, in raise_last_exceptionsix.reraise(*_exception)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\six.py",
>  
> line 685, in reraiseraise value.with_traceback(tb)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
>  
> line 227, in wrapperfn(*args, **kwargs)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\__init__.py",
>  
> line 27, in setupapps.populate(settings.INSTALLED_APPS)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\registry.py",
>  
> line 85, in populateapp_config = AppConfig.create(entry)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\config.py",
>  
> line 94, in createmodule = import_module(entry)  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py",
>  
> line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], 
> package, level)  File "", line 1006, in 
> _gcd_import  File "", line 983, in 
> _find_and_load  File "", line 967, in 
> _find_and_load_unlocked  File "", line 677, in 
> _load_unlocked  File "", line 728, in 
> exec_module  File "", line 219, in 
> _call_with_frames_removed  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\__init__.py",
>  
> line 4, in from django.contrib.admin.filters import (  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\filters.py",
>  
> line 10, in from django.contrib.admin.options import 
> IncorrectLookupParameters  File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\options.py",
>  
> line 12, in from django.contrib.admin import helpers, widgets  
> File 
> "C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\widgets.py",
>  
> line 151'%s=%s' % (k, v) for k, v in params.items(),^SyntaxError: 
> Generator expression must be parenthesized*
>

-- 
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/7ebfb368-ba6d-45ed-a9b7-1c68f7cdad8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problmes

2018-12-03 Thread David Figueroa
The following error message appears when I try to run the following code in 
cmd. (I use Djanjo version 1.11 and paython 3.7) 
*C:\Users\david\PAYTHON\SAIT1>py manage.py runserver*
*Unhandled exception in thread started by .wrapper at 0x03A46468>*


































*Traceback (most recent call last):  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
 
line 227, in wrapperfn(*args, **kwargs)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py",
 
line 117, in inner_runautoreload.raise_last_exception()  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
 
line 250, in raise_last_exceptionsix.reraise(*_exception)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\six.py",
 
line 685, in reraiseraise value.with_traceback(tb)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
 
line 227, in wrapperfn(*args, **kwargs)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\__init__.py",
 
line 27, in setupapps.populate(settings.INSTALLED_APPS)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\registry.py",
 
line 85, in populateapp_config = AppConfig.create(entry)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\config.py",
 
line 94, in createmodule = import_module(entry)  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py",
 
line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], 
package, level)  File "", line 1006, in 
_gcd_import  File "", line 983, in 
_find_and_load  File "", line 967, in 
_find_and_load_unlocked  File "", line 677, in 
_load_unlocked  File "", line 728, in 
exec_module  File "", line 219, in 
_call_with_frames_removed  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\__init__.py",
 
line 4, in from django.contrib.admin.filters import (  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\filters.py",
 
line 10, in from django.contrib.admin.options import 
IncorrectLookupParameters  File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\options.py",
 
line 12, in from django.contrib.admin import helpers, widgets  
File 
"C:\Users\david\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\admin\widgets.py",
 
line 151'%s=%s' % (k, v) for k, v in params.items(),^SyntaxError: 
Generator expression must be parenthesized*

-- 
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/d253f957-11e6-4020-a967-4edd9ffe8cc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem matching paths deploying with WSGI on Ubuntu mounted not at root

2018-12-03 Thread Dave Briccetti
I’m moving an app from Heroku to an Ubuntu server on AWS. I’m having 
trouble with matching URL paths when mounting via WSGI to not the root of 
the domain. Everything works fine under development on the Mac. I’ll gladly 
pay somebody to videoconference with me and get this sorted. Or, perhaps 
there are common mistakes that people make documented somewhere. I’ve spent 
lots of time searching and experimenting.

Dave Briccetti
https://davebsoft.com

-- 
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/553f33b8-a648-4749-a7d7-cf436e16b3d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: path('posts/(?P[0-9]+)/$'

2018-12-03 Thread ehrenfeld1946
They both worked.

Thank you!

On Sunday, December 2, 2018 at 6:04:04 PM UTC-8, Lachlan Musicman wrote:
>
>
>
> On Mon, 3 Dec 2018 at 11:51, > wrote:
>
>>
>>
>> On Sunday, December 2, 2018 at 10:00:17 AM UTC-8, Jani Tiainen wrote:
>>>
>>> Hi.
>>>
>>> Path is a new url format which uses format of  for 
>>> exanple like  . If you want to use regular expressions use 
>>> re_path instead. 
>>>
>>>  kirjoitti su 2. jouluk. 2018 klo 19.42:
>>>
 When I run http://localhost:8000/posts/2

 Here is my .py's

 from django.contrib import admin
 from django.urls import path
 from posts import views
 from django.conf.urls.static import static
 from django.conf import settings

 urlpatterns = [
   path('admin/', admin.site.urls),
   path('', views.home),
   path('posts/(?P[0-9]+)/$', views.post_details),

   ] + static(settings.MEDIA_URL, document_root = 
 settings.MEDIA_ROOT)



>
> So, to your urls.py you need to add:
>
> from django.urls import path, re_path
>
> And your url patterns will need to look like
>
> re_path('posts/(?P[0-9]+)/$', views.post_details),
>
> I've not looked for a while, but it might even need to be 
>
> re_path(r'posts/(?P[0-9]+)/$', views.post_details),
>
> Cheers
>
> L.
>
>
>
>
>  --
> "The fact that you're still saying something like 'feminism gone mad' 
> suggests that feminism hasn't gone mad ENOUGH yet."
>
> Helen Zaltzman / @HelenZaltzman 
> https://twitter.com/HelenZaltzman/status/1065384934846545920
>
>

-- 
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/54c9a62c-1c4a-480a-876e-c248f19ccefa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: path('posts/(?P[0-9]+)/$'

2018-12-03 Thread Jani Tiainen
path('posts//$') should work as well.

 kirjoitti ma 3. jouluk. 2018 klo 2.51:

> I am new to django so I am not sure I understand what you are saying. Can
> you give me a rewrite of the correct syntax of the line that is not correct?
>
> Thank you
>
> On Sunday, December 2, 2018 at 10:00:17 AM UTC-8, Jani Tiainen wrote:
>>
>> Hi.
>>
>> Path is a new url format which uses format of  for
>> exanple like  . If you want to use regular expressions use
>> re_path instead.
>>
>>  kirjoitti su 2. jouluk. 2018 klo 19.42:
>>
>>> When I run http://localhost:8000/posts/2
>>>
>>> I get the error:
>>>
>>>
>>>   Using the URLconf defined in blog.urls,
>>>   Django tried these URL patterns, in this order:
>>>
>>>
>>>1. admin/
>>>2.
>>>3. Posts/(?P[0-9]+)/$
>>>4. ^media/(?P.*)$
>>> The current path, posts/2, didn't match any of these.
>>>
>>>
>>> Here is my .py's
>>>
>>> from django.contrib import admin
>>> from django.urls import path
>>> from posts import views
>>> from django.conf.urls.static import static
>>> from django.conf import settings
>>>
>>> urlpatterns = [
>>>   path('admin/', admin.site.urls),
>>>   path('', views.home),
>>>   path('posts/(?P[0-9]+)/$', views.post_details),
>>>
>>>   ] + static(settings.MEDIA_URL, document_root = 
>>> settings.MEDIA_ROOT)
>>>
>>>
>>> views.py
>>>
>>> from django.shortcuts import render
>>> from posts.models import Post
>>>
>>> # Create your views here.
>>> def home(request):
>>> posts = Post.objects.order_by('pub_date')
>>>
>>> return render(request, 'posts/home.html', {'posts': posts})
>>>
>>> def post_details(request, post_id):
>>> return render(request, "posts/posts_detail.html", {'post_id': post_id})
>>>
>>>
>>> Any ideas why it doesn't work. I am a newbie with django
>>>
>>> --
>>> 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/d28eac04-2edc-405e-9942-e883b1e7bff8%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/2f56611d-1510-4f94-b2a2-82aa0a700780%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/CAHn91ofU6wd6reV-BVyuW%2BwLOhkxC%3DU9EXPXLNcmq1-7fCsC_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


admin page not found!!

2018-12-03 Thread Saeed Pooladzadeh
Hello

Here comes my url page code 

from django.contrib import admin
from django.urls import path

urlpatterns = [
path('admin/', admin.site.urls),
#url(r'^polls/', include('polls.urls')),
]
  
When I run the the code and want to go to admin page I see this message:
 
Page not found!

Using the URLconf defined in DjangoWebProject3.urls, Django tried these URL 
patterns, in this order:

   1. admin/

The current path, admin, didn't match any of these.


What is wrong with my code Please inform me.


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/45c97cdd-0fda-41f9-ac19-21e0dddfdf2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.