Watch "Django on pythonanywhere." on YouTube

2019-06-06 Thread Alex Kimeu
https://youtu.be/3B2yALSpqFg

-- 
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/CACYP3VFRV7k4EjrrK2Zc-n-3HqcHtxMVbGT4F%2BSNmPKwj%2B6Ubg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: python manage.py makemirations

2019-05-29 Thread Alex Kimeu
You have to add your app in the settings.py file then migrate.

On Wed, 29 May 2019, 21:22 Robert Wahoo,  wrote:

> Regardless, it’s not an issue. Just migrate
>
>
>
>
>
> *From: *"django-users@googlegroups.com" 
> on behalf of sagar ninave 
> *Reply-To: *"django-users@googlegroups.com"  >
> *Date: *Wednesday, May 29, 2019 at 2:17 PM
> *To: *Django users 
> *Subject: *python manage.py makemirations
>
>
>
> i have created new project and i am defining model and doing makemigratins
> but it is showing no changes detected what is problem i don't understand
>
> --
> 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/e30905f2-77c4-4b07-9d75-47f9d645a1e0%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/BL0PR01MB4354D13EBF33AE997483EE3DF41F0%40BL0PR01MB4354.prod.exchangelabs.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/CACYP3VE7HQ%2BBiurmQH1BMtKTFWqgaEhG2sbT109%2BMguoNXsPaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: python manage.py makemirations

2019-05-29 Thread Alex Kimeu
That's ok. There's no any problem. Just go ahead and migrate.

On Wed, 29 May 2019, 21:18 Robert Wahoo,  wrote:

> Did you make model changes?
>
>
>
> *From: *"django-users@googlegroups.com" 
> on behalf of sagar ninave 
> *Reply-To: *"django-users@googlegroups.com"  >
> *Date: *Wednesday, May 29, 2019 at 2:17 PM
> *To: *Django users 
> *Subject: *python manage.py makemirations
>
>
>
> i have created new project and i am defining model and doing makemigratins
> but it is showing no changes detected what is problem i don't understand
>
> --
> 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/e30905f2-77c4-4b07-9d75-47f9d645a1e0%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/BL0PR01MB4354271DF09678BD7C241D00F41F0%40BL0PR01MB4354.prod.exchangelabs.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/CACYP3VFbkf9bWvtWgQe9oCFuBJ-mP49vJbfYc__x5X4Uw5uzdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Model Forms.

2019-05-17 Thread Alex Kimeu
Thanks. Makes sense. Let me try it. Thanks.

On Fri, 17 May 2019, 14:18 Joe Reitman,  wrote:

> In your template you can identify each field by its name and use a table
> to render them in columns. e.g.
>
> table
>   table row
> table data {{ form.username }}
> table data {{ form.password }}
>
> On Friday, May 17, 2019 at 2:23:14 AM UTC-5, kimeualexis wrote:
>>
>> Hello, guys.
>> Is there a way to lay out Django Model form fields across the Browser
>> rather than top-down?
>>
>> Kindly assist.
>>
> --
> 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/91849286-5271-48be-ae7d-b90c5ab59ea5%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/CACYP3VEqNWAukvQSf1DJOZ784oODbTxGxn0dZ71yOP6DNKzoPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ModuleNotFoundError: No module named 'sample,'

2019-03-07 Thread Alex Kimeu
Do you have a model named Sample in your models.py file of your app??

On Thu, 7 Mar 2019, 13:00 Robin Riis,  wrote:

> from .models import Sample
>
> Den tors 7 mars 2019 10:44  skrev:
>
>> Hi Team
>>
>> My project name is Sample
>> While I am trying to connect database with models.py
>> I am finding these type of errors
>> ModuleNotFoundError: No module named 'sample,'
>> Can anybody help me.
>>
>> --
>> 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/94eba992-1553-40a5-8a58-4f9ad85bbd5c%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/CAPLZMbNwyb0esCbJgR50oxrw_kaXSH4m8COB83Nw7nVfP6DE9A%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/CACYP3VHp7ZWo5Gpjx_kiJdCSu0siSxHTicm88%3DjaqO%2BZf455ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re:

2019-02-23 Thread Alex Kimeu
I think the issue is in your models.py . Kindly share your polls models.

On Fri, 22 Feb 2019, 16:18 Vivek Bhavsar,  wrote:

> You should put the dot(period) after the polls
> For eg:. python manage.py makemigrations polls .
>
> NOTE: There is space between polls and dot(period)
>
>
> Thanks
>
> On Feb 21, 2019 1:40 PM, "bhushan patil"  wrote:
>
> I am running the command 'python manage.py makemigrations polls' but it's
> showing that django.db.models has no attribute model.
>
> --
> 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/CAJ%3Ds-Myumw2o8mxYcbjQXjG0Zy%2BVao6kPjmL7dxaajaGDG5MsA%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/CAMvtZS7V7fGEfyiifdhcAydi_Y16ByrW1VUL3PkA_PLLpKsymw%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/CACYP3VHMnRti%3DaDRzucn2fgq9VtAoC0-rynrTBLcHJhec6w%3DyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist at /vmail/inbox/

2019-02-04 Thread Alex Kimeu
It means the template you are trying to render is either not created or not
in the location where Django expects to be. Django does not see the
template you are trying to render.

On Tue, 5 Feb 2019, 04:28 senthu nithy  I am doing a project using Django. I got this error. I don't understand
> what this error really means.
> Thanks in advance!
> K.Senthuja
> Undergraduate Student (UOJ),
> https://www.linkedin.com/in/senthuja/
> https://medium.com/@senthujakarunanithy
>
> --
> 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/CALEaTU5PQaiOuekpgJS7B6gQkZeQEz-x8--RMmLvC9mjJDnFNw%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/CACYP3VHVfVCm7LHqt7x6bNN78%2BwjXnVaC4YQEzaXxQygwz1HFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: User profile

2019-01-17 Thread Alex Kimeu
First you need to create a model for the User Profile.

On Thu, 17 Jan 2019, 17:49 ANi  Do you mean you want to create your custom user model?
> Two ways to do it,
> 1. create a profile model and use foreign key to the user model that
> Django provided.
> 2. create a custom user model like this
> https://wsvincent.com/django-custom-user-model-tutorial/
>
>
> senthu nithy於 2019年1月17日星期四 UTC+8下午8時47分41秒寫道:
>>
>> I am new Django framework. I want to create a user profile for my app.
>> But i start to create the user profile then i direct to create Admin
>> profile which is already created in Django. I want to create a user
>> Profile. Can you direct me?
>>
> --
> 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/94a197bc-1440-43cf-9af7-0c31da09cf4b%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/CACYP3VG4PsTMPd7Sj0LGkbqNUdU135K2D9Ven-VXV91vMiJhTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django UserForm Help Texts

2019-01-14 Thread Alex Kimeu
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm
from django.contrib import messages
from .models import Profile
from quiz.models import Question


def register(request):
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
form.save()
username = form.cleaned_data.get('username')
messages.success(request, f'Account Created for {username}!')
return redirect('quiz:quiz-index')

else:
form = UserRegisterForm()
return render(request, 'users/register.html', {'form': form})


On Mon, Jan 14, 2019 at 11:39 PM Alex Kimeu  wrote:

> *views.py*
>
>
> On Mon, Jan 14, 2019 at 11:36 PM Nebojsa Hajdukovic <
> nebojsa.zero...@gmail.com> wrote:
>
>> can you show your views.py?
>>
>> пон, 14. јан 2019. у 19:52 kimeualexis  је
>> написао/ла:
>>
>>> Hello, guys.
>>>
>>> Anyone with an idea how to hide help texts in Django User Registration
>>> Form?
>>>
>>> Regards.
>>>
>>> [image: Screenshot from 2019-01-14 21-48-53.png]
>>>
>>> --
>>> 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/331219f5-b547-456c-a7c4-759c0574d82b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/331219f5-b547-456c-a7c4-759c0574d82b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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/CAJ60hW2T%3DVnYyXGwhaFS-SyK5kg7Voi7at9N-c%2BTiGkpJ4EMVg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJ60hW2T%3DVnYyXGwhaFS-SyK5kg7Voi7at9N-c%2BTiGkpJ4EMVg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
>
> *"It's when nothing happens that anything can happen."*
> *https://kodenaut.github.io/ <https://kodenaut.github.io/>**+
> <https://kodenaut.github.io/>254 723494571*
>
>

-- 


*"It's when nothing happens that anything can happen."*
*https://kodenaut.github.io/ <https://kodenaut.github.io/>**+
<https://kodenaut.github.io/>254 723494571*

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


Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
Kindly post your urls mappings.

On Mon, Jan 14, 2019 at 10:22 PM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:

> yes all things are working fine like post list are working fine
>
> from django.shortcuts import render, get_object_or_404
> from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
> from django.views.generic import ListView
> from .models import Post
>
> def post_list(request):
> object_list = Post.published.all()
> paginator = Paginator(object_list, 3) # 3 posts in each page
> page = request.GET.get('page')
> try:
> posts = paginator.page(page)
> except PageNotAnInteger:
> # If page is not an integer deliver the first page
> posts = paginator.page(1)
> except EmptyPage:
> # If page is out of range deliver last page of results
> posts = paginator.page(paginator.num_pages)
> return render(request,
>   'blog/post/list.html',
>   {'page': page,
>'posts': posts})
>
> # Create your views here.
> def post_detail(request, year, month, day, post):
> post = get_object_or_404(Post, slug=post,
>  status='published',
>  publish__year=year,
>  publish__month=month,
>  publish__day=day)
>
> return render(request,
>   'blog/post/details.html',
>   {'post': post})
>
> class PostListView(ListView):
> queryset = Post.published.all()
> context_object_name = 'posts'
> paginate_by = 3
> template_name = 'blog/post/list.html'
>
> def test_test(request):
> return render(request,'blog/post/test.html')
>
>
> On Tue, Jan 15, 2019 at 12:24 AM Alex Kimeu  wrote:
>
>> Have you configured MySQL correctly?
>>
>> On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor <
>> tribhuvankishor...@gmail.com> wrote:
>>
>>> this view is retrieving data with SQlite but not fetching data in
>>> MySQL saying no data found.
>>>
>>>
>>> def post_detail(request, year, month, day, post):
>>> post = get_object_or_404(Post, slug=post,
>>>  status='published',
>>>  publish__year=year,
>>>  publish__month=month,
>>>  publish__day=day)
>>>
>>> return render(request,
>>>   'blog/post/details.html',
>>>   {'post': post})
>>>
>>> --
>>> regards
>>> Tribhuvan Kishor Bhaskar
>>>
>>> --
>>> 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/CACiphSVVyMgpNmgFj16ROZGqpohaq0fYJKV2bES4D1aVeg1LbA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CACiphSVVyMgpNmgFj16ROZGqpohaq0fYJKV2bES4D1aVeg1LbA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>>
>> *"It's when nothing happens that anything can happen."*
>> *https://kodenaut.github.io/ <https://kodenaut.github.io/>**+
>> <https://kodenaut.github.io/>254 723494571*
>>
>> --
>> 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/CACYP3VGYe96j6vYWYC8-7GCzODUfu8b5xc1qo2Lh6KhHevKgYQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACYP3VGYe96j6vYWYC8-7GCzODUfu8b5xc1qo2Lh6KhHevKgYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
Have you configured MySQL correctly?

On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:

> this view is retrieving data with SQlite but not fetching data in
> MySQL saying no data found.
>
>
> def post_detail(request, year, month, day, post):
> post = get_object_or_404(Post, slug=post,
>  status='published',
>  publish__year=year,
>  publish__month=month,
>  publish__day=day)
>
> return render(request,
>   'blog/post/details.html',
>   {'post': post})
>
> --
> regards
> Tribhuvan Kishor Bhaskar
>
> --
> 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/CACiphSVVyMgpNmgFj16ROZGqpohaq0fYJKV2bES4D1aVeg1LbA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 


*"It's when nothing happens that anything can happen."*
*https://kodenaut.github.io/ **+
254 723494571*

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


Re:

2019-01-02 Thread Alex Kimeu
Is your server running?

On Wed, Jan 2, 2019 at 6:30 PM Joseph Gichuki 
wrote:

>
>
> Here it is
>
> Sent from Mail  for
> Windows 10
>
> --
> 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/5c2cce87.1c69fb81.2d099.3b97%40mx.google.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 


*"It's when nothing happens that anything can happen."*
*https://kodenaut.github.io/ **+
254 723494571*

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


Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Alex Kimeu
*#Import auth views*

from django.contrib.auth import views as auth_views

*#Use the views in the url*

path('login/', auth_views.LoginView.as_view(), name='login'),

Happy coding!


On Mon, Aug 27, 2018 at 6:29 PM Tim Vogt (Tim Vogt) 
wrote:

> Hi Jason,
> Thank !
>
> my urls.py in /users looks like this
>
> This is the error I get with amusement.
>
> How to change the old import? I suppose this is the way. Because the admin
> is imported from django.
>
>
>
>
>
>
> """Defines URL patterns for users"""
>
> from django.conf.urls import url
> from . import views
> # from django.contrib.auth import login
> from django.contrib.auth.views import LoginView
>
> app_name='users'
>
>
> urlpatterns = [
>   # Login page
> url('login/', LoginView, {'template_name': 'users/login.html'}, name='login'),
> # Logout page
> url('logout/', views.logout_view, name='logout'),
> ]
>
>
>
>
> TypeError at /users/login/
>
> __init__() takes 1 positional argument but 2 were given
>
> Request Method: GET
> Request URL: http://localhost:8000/users/login/
> Django Version: 2.0.7
> Exception Type: TypeError
> Exception Value:
>
> __init__() takes 1 positional argument but 2 were given
>
> Exception Location: 
> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/handlers/base.py
> in _get_response, line 126
> Python Executable:
> /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
> Python Version: 3.6.5
> Python Path:
>
> ['/Users/timvogt/Software_projects/learning_log',
>  '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip',
>  '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
>  
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
>  '/Users/timvogt/Library/Python/3.6/lib/python/site-packages',
>  
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']
>
> Server time: Mon, 27 Aug 2018 15:26:32 +
> Traceback Switch to copy-and-paste view
> 
>
>-
>
> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/handlers/exception.py
> in inner
>1.
>
>   response = get_response(request)
>
>   ...
>▶ Local vars 
>-
>
> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/handlers/base.py
> in _get_response
>1.
>
>   response = self.process_exception_by_middleware(e, 
> request)
>
>   ...
>▶ Local vars 
>-
>
> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/handlers/base.py
> in _get_response
>1.
>
>   response = wrapped_callback(request, *callback_args, 
> **callback_kwargs)
>
>   ...
>▶ Local vars 
>
> Request informationUSER
> AnonymousUser
> GET
> No GET data
> POST
> No POST data
> FILES
> No FILES data
> COOKIES
> VariableValue
> csrftoken
>
> 'zKJ7uZOTcHNiYr4arCV6YjzR36mq7Ie2HpK607EMlKDhQcxObqHBTFSRrtkyaNZa'
>
> snipcart_order_token
>
> '142952d7-baae-4ab2-b2b0-ac5462367122'
>
> _xsrf
>
> '2|878cf834|c449d16f85d12cdef7046b0ac6567a54|1534532218'
>
> username-localhost-
>
> '2|1:0|10:1534532218|23:username-localhost-|44:YWY3N2MyNDAxYzQ0NDI3NmIxNWY4ZjUyNTI5Y2Y4YTY=|060151f0b69a6428ef01d3516fe0550735f7c8e205b9f59bf602134027e9'
>
> _ga
>
> 'GA1.1.581090691.1515705617'
>
> pretix_csrftoken
>
> '4D01Mhbc4oN2AvqmkxKaDPdzh040pxwHykOr0hc5afYoMMWtYpFcukamsEO2j3lg'
>
> __stripe_mid
>
> 'c72941fc-ac1e-4460-b838-5c87b673'
>
> Pycharm-77c83f85
>
> '1f4c7cc4-a97c-4bdc-b2cc-4c190f485abd'
>
> META
> VariableValue
> Apple_PubSub_Socket_Render
>
> '/private/tmp/com.apple.launchd.v0QRbL5XFB/Render'
>
> CONTENT_LENGTH
>
> ''
>
> CONTENT_TYPE
>
> 'text/plain'
>
> CSRF_COOKIE
>
> 'zKJ7uZOTcHNiYr4arCV6YjzR36mq7Ie2HpK607EMlKDhQcxObqHBTFSRrtkyaNZa'
>
> DISPLAY
>
> '/private/tmp/com.apple.launchd.n1qjsNP13q/org.macosforge.xquartz:0'
>
> DJANGO_SETTINGS_MODULE
>
> 'learning_log.settings'
>
> GATEWAY_INTERFACE
>
> 'CGI/1.1'
>
> HOME
>
> '/Users/timvogt'
>
> HTTP_ACCEPT
>
> 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
>
> HTTP_ACCEPT_ENCODING
>
> 'gzip, deflate'
>
> HTTP_ACCEPT_LANGUAGE
>
> 'nl-nl'
>
> HTTP_CONNECTION
>
> 'keep-alive'
>
> HTTP_COOKIE
>
> ('csrftoken=zKJ7uZOTcHNiYr4arCV6YjzR36mq7Ie2HpK607EMlKDhQcxObqHBTFSRrtkyaNZa; 
> '
>  'snipcart_order_token=142952d7-baae-4ab2-b2b0-ac5462367122; '
>  '_xsrf=2|878cf834|c449d16f85d12cdef7046b0ac6567a54|1534532218; '
>  
> 'username-localhost-="2|1:0|10:1534532218|23:username-localhost-|44:YWY3N2MyNDAxYzQ0NDI3NmIxNWY4ZjUyNTI5Y2Y4YTY=|060151f0b69a6428ef01d3516fe0550735f7c8e205b9f59bf602134027e9";
>  '
>  '_ga=GA1.1.581090691.1515705617; '
>  
> 'pretix_csrftoken=4D01Mhbc4oN2AvqmkxKaDPdzh040pxwHykOr0hc5afYoMMWtYpFcukamsEO2j3lg;
>  '
>  '