Re: How to create two different login system

2018-12-13 Thread Manjunath
There are multiple options to maintain different kind of users in Django.

When I came across this situation, I created a custom User class by 
inheriting AbstractBaseUser class and kept a positive integer field to 
maintain the type of user. Then I created Sub-classes Manager & Employee 
classes.
I created a custom authentication backend which will return the user object 
according to the user type.

You can try this or You can just extend the AbstractUser class.

On Friday, December 14, 2018 at 11:58:50 AM UTC+5:30, maunish dave wrote:
>
> My project contains two user one for managers and other for employees any 
> suggestions?
>

-- 
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/b3b8b178-b1bb-4a8a-9d6d-1ce3b65609fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-14 Thread Manjunath
Also,
It would be better if you rearrange your patterns.

urlpatterns=[
path('login/', LoginView.as_view(template_name='accounts/login.html'), 
name='login'),
re_path(r'^$',views.home, name='home'),
]

Since your path *r'^$' *matches all request, it is better to keep this at 
end of your list.

On Tuesday, November 13, 2018 at 7:19:22 AM UTC+5:30, Alex Callaway wrote:
>
> In my urlpatterns in the url.py file of my app, I have two pages:
>
> from django.urls import path, re_path
> from django.conf.urls import url
> from . import views
> from django.contrib.auth.views import LoginView
>
> urlpatterns=[
> re_path(r'^$',views.home, name='home'),
> path('login/', LoginView.as_view(template_name='accounts/login.html'), 
> name='login'),
> ]
>
> When I visit : `http://127.0.0.1:8000/home`  
> I see whats in my `index.html`. 
>
> But when I visit : 
>
> `http://127.0.0.1:8000/accounts/login` 
>  or 
> `http://127.0.0.1:8000/accounts/login.html` 
>  or 
> `http://127.0.0.1:8000/accounts/login/login` 
>  or 
> `http://127.0.0.1:8000/accounts/login/login/login.html` 
>  
>
> I still see what's in my `index.html`. Wtf?
>
>
> Ok. I did say in my views.py I have told it to render `home/index.html` 
> like this :
>
> def home(request):
> return render(request, 'home/index.html')
>
> But I also have this function in views.py as well :
>
>
> def login(request):
> c = {}
> c.update(csrf(request))
> return render(request, 'accounts/login.html', c)
>
> So what's the problem? Why won't it render `accounts/login.html` page when 
> I visit `http://127.0.0.1:8000/accounts/login` 
> 
>
> By the way, In my main url.py file in the project, I have url patterns 
> this way *(every django project has two urls.py)*:
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('home/', include('clientview.urls')),
> path('accounts/login/', include('clientview.urls')),
> ]
>
>

-- 
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/2622b5d3-8bcd-4277-a94e-1df2a11e8023%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PDF extarcting

2018-11-12 Thread Manjunath
I think regular expression would be a better option for your requirements.
If you provide some sample resume docs, we can help better.

On Tuesday, November 13, 2018 at 7:04:06 AM UTC+5:30, swathi2801 Yadhav 
wrote:
>
> Hi everyone, there is a project given to us to develop an application 
> I need to extract data from resume only specific fields like name, mail, 
> dob, phone number   by importing a package pyPdf2 I can only extract a data 
> to text the whole part but there is no need of whole data only specific 
> data need to extract 
> if any were are familiar with pdPdf2 extracting the data please help me 
> .!!
>
>
> thanks
> Swathi
>

-- 
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/cf376fbd-4b81-4e73-a7b0-d9d9a7a0a516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
you can easily use java script set_timeout method for redirection after
certain time.

Elaborate your second question. Provide relevant screenshots if possible.

On Fri, Nov 2, 2018 at 5:11 PM praveen bhuvi 
wrote:

> Now my 1st problem is in views.py i have a function , now in that function
> when certain condition is met i have to redirect to another page after 10
> sec or 20 sec.
> my 2nd problem is i dont know how to set (or) match the pattern in
> [application]/urls.py
>
> --
> 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/54f8b7de-cbbd-4038-b0ab-d28bc29a8b84%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/54f8b7de-cbbd-4038-b0ab-d28bc29a8b84%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Thanks & Regards,
Manjunath

-- 
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/CAP6B-r%2BuERfiFdtibWFK7yT2jPOHJ32ogQPXdn6DOFd6E%3D7kaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
you can easily use java script set_timeout method for redirection after 
certain time.

Elaborate your second question. Provide relevant screenshots if possible.

On Friday, November 2, 2018 at 5:11:40 PM UTC+5:30, praveen bhuvi wrote:
>
> Now my 1st problem is in views.py i have a function , now in that function 
> when certain condition is met i have to redirect to another page after 10 
> sec or 20 sec.
> my 2nd problem is i dont know how to set (or) match the pattern in 
> [application]/urls.py
>

-- 
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/e8b5803f-1b14-4523-ac0c-2cfc9508eca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to Django: Please Help!! Django User Model not saving first_name, last_name and email - Authentication App

2018-10-29 Thread Manjunath
Remove declaration of first_name, last_name & email in Form calss.
class SignUpForm(UserCreationForm):
class meta():
model = User 
fields = ('username', 'first_name', 'last_name', 'email', 
'password1', 'password2', )

 And while Saving the form, follow below steps.
if form.is_valid():
   new_user = form.save(commit=False)
   new_user.set_password(form.cleaned_data['password1'])
  new_user.save()
  # Your next steps


I think you might need to declare password1 & password2 fields in your 
Form. Do Check.



On Monday, October 29, 2018 at 10:04:39 PM UTC+5:30, Adrian Chipukuma wrote:
>
> Hello, 
>
> I am new to Django and enjoying the learning process, unfortunately I am 
> stuck, and I need expert guidance. 
> I am learning through developing a User Authentication System. The system 
> is supposed to have a user registration functionality, login, user profile 
> editing and logout. I have managed to create the login, logout 
> functionalities and the registration functionality partly. The problem is 
> on the registration, I am only able to save the 'username and password ' 
> using django forms, I have written the code for saving the first_name and 
> the last _name as well as email but it seems not to be working, only the 
> 'username and password' are saved.. I think I am missing something though 
> no error comes up. Please anyone to guide me. Thank you.
> the code is as shown below:
>
>
> views.py
> from django.shortcuts import render, redirect
> from django.contrib.auth import authenticate, login, logout
> from django.contrib.auth.models import User
> from django.contrib import auth, messages
> from django.contrib.auth.forms import UserCreationForm
> from django import forms
> from .forms import SignUpForm
>
> def home(request):
> return render(request, 'authenticate/home.html', {})
>
> def login_user(request):
> if request.method == 'POST':
> username = request.POST['username']
> password = request.POST['password']
> user = authenticate(request, username=username, password=password)
> if user is not None:
> login(request, user)
> messages.success(request,('You have been logged in'))
> return redirect('home')
> else:
> messages.success(request,('Error Logging in!'))
> return redirect('login')
> else:
> return render(request, 'authenticate/login.html', {})
>
> def logout_user(request):
> """if request.method =='POST':"""
> logout(request)
> messages.success(request,('You have been logged out'))
> return redirect('home')
>
> def register_user(request):
> if request.method =='POST':
> form = SignUpForm(request.POST)
> if form.is_valid():
> form.save()
> username = form.cleaned_data['username']
> password = form.cleaned_data['password1']
> user = authenticate(username=username, password=password)
> login(request, user)
> messages.success(request,(' Successfully Registered!'))
> return redirect('home')
> else:
> form = SignUpForm()
>
> context = {'form': form }
> return render(request, 'authenticate/register.html', context)
>
> urls.py
>
> from django.urls import path
> from . import views
> urlpatterns = [
> path('', views.home, name="home"),
> path('login/', views.login_user, name="login"),
> path('logout/', views.logout_user, name='logout'),
> path('register/', views.register_user, name='register'),
> ]
>
> forms.py
> from django.contrib.auth.forms import UserCreationForm, UserChangeForm
> from django.contrib.auth.models import User
> from django import forms
>
> class SignUpForm(UserCreationForm):
> email = forms.EmailField()
> first_name = forms.CharField(max_length=100,)
> last_name = forms.CharField(max_length=100,)
> class meta():
> model = User 
> fields = ('username', 'first_name', 'last_name', 'email', 'password1', 
> 'password2', )
>
> register.html
> {% extends 'authenticate/base.html'%}
> {% block content%}
> This is the Registration Page
> 
> {% csrf_token %}
> {% if form.errors %}
> Your form has errors
> {{ error }}
> {% endif %}
> 
> {{ form.as_p }}
> 
> 
> 
> 
> {% endblock %}
>
>
> Chao!
>
> Adrian
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
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/9a58de45-95d1-4fc6-8948-0cc6994c85fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Identify failed insert field

2018-10-29 Thread Manjunath
I think one of the numeric values you are passing is an empty string.
Django is trying to cast it to int but failing to do so.

Best solution would be to print each values before save() call & you will 
know which is the error causing column..

Hope it helps!!


On Sunday, October 28, 2018 at 8:35:13 AM UTC+5:30, Joel wrote:
>
> Is there anyway to identify which database field update failed, 
> instead of a generic message like "ValueError: invalid literal for 
> int() with base 10: ''? 
>
> For example, I have the following save(): 
>
> tempcust = unconfirmedappointment(name=name, ageyrs=ageyrs, 
> agemnths=agemnths, gender=gender, mobile=phone, 
> docid=doc,clinicid=clinicobj, seldate=seldate, seltime=slot, 
> email=email, address=address, city=city, uniquestring=uniquestring, 
> otp=otp) 
> tempcust.save() 
>
> Apparently one of the values is wrong for the field. But all I get is 
> the following: 
>
> 2018-10-28 08:29:48,842 django.request ERRORInternal Server Error: 
> /clinic/madhav/doctor/4/setappointment 
> Traceback (most recent call last): 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/core/handlers/exception.py",
>  
>
> line 34, in inner 
> response = get_response(request) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/core/handlers/base.py", 
>
> line 126, in _get_response 
> response = self.process_exception_by_middleware(e, request) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/core/handlers/base.py", 
>
> line 124, in _get_response 
> response = wrapped_callback(request, *callback_args, 
> **callback_kwargs) 
>   File "/home/joel/myappointments/clinic/views.py", line 896, in 
> setappointment 
> tempcust.save() 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/base.py", 
> line 718, in save 
> force_update=force_update, update_fields=update_fields) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/base.py", 
> line 748, in save_base 
> updated = self._save_table(raw, cls, force_insert, force_update, 
> using, update_fields) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/base.py", 
> line 831, in _save_table 
> result = self._do_insert(cls._base_manager, using, fields, update_pk, 
> raw) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/base.py", 
> line 869, in _do_insert 
> using=using, raw=raw) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/manager.py", 
>
> line 82, in manager_method 
> return getattr(self.get_queryset(), name)(*args, **kwargs) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/query.py", 
> line 1136, in _insert 
> return query.get_compiler(using=using).execute_sql(return_id) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
>  
>
> line 1288, in execute_sql 
> for sql, params in self.as_sql(): 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
>  
>
> line 1241, in as_sql 
> for obj in self.query.objs 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
>  
>
> line 1241, in  
> for obj in self.query.objs 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
>  
>
> line 1240, in  
> [self.prepare_value(field, self.pre_save_val(field, obj)) for 
> field in fields] 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
>  
>
> line 1182, in prepare_value 
> value = field.get_db_prep_save(value, connection=self.connection) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/fields/__init__.py",
>  
>
> line 790, in get_db_prep_save 
> return self.get_db_prep_value(value, connection=connection, 
> prepared=False) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/fields/__init__.py",
>  
>
> line 785, in get_db_prep_value 
> value = self.get_prep_value(value) 
>   File 
> "/home/joel/.local/lib/python3.6/site-packages/django/db/models/fields/__init__.py",
>  
>
> line 1807, in get_prep_value 
> return int(value) 
> ValueError: invalid literal for int() with base 10: '' 
>
> How to trace which field is problematic, other than manually debugging 
> each variable and seeing if it is non integer? Can django tell me 
> which field is causing the  issue? 
>
> Sincerely yours, 
>
> Dr Joel G Mathew 
>

-- 
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.co

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

2018-10-23 Thread Manjunath
You are welcome.
I suggest you go through the documentation & guide carefully and work 
accordingly..
I learned the same way!!


On Wednesday, October 24, 2018 at 8:17:06 AM UTC+5:30, Bugs Bunny wrote:
>
> i use this and work, thanks (y) 
>
> On Tue, Oct 23, 2018 at 1:04 AM Manjunath  > wrote:
>
>> Your project urls are set to address starting with admin & polls.
>>
>> You can browse *localhost:8000/polls/*
>>
>> On Monday, October 22, 2018 at 11:06:22 PM UTC+5:30, Bugs Bunny wrote:
>>>
>>> Regards for the answers this is my input
>>>
>>> On Sun, Oct 21, 2018 at 8:15 AM Motaz Hejaze  wrote:
>>>
>>>> first , no spaces are allowed in URLS
>>>> as  Manjunath said
>>>> replace path(' ', views.index, name='index') with path('', 
>>>> views.index, name='index') in your polls/urls.py and check the result.
>>>>
>>>> second , run the server 
>>>> python manage.py runserver 
>>>>
>>>> third check the url
>>>> go to http://127.0.0.1:8000/polls
>>>>
>>>> On Sun, Oct 21, 2018 at 1:56 PM Manjunath  wrote:
>>>>
>>>>> I think you have a space in your url path.
>>>>>
>>>>> replace path(' ', views.index, name='index') with path('', 
>>>>> views.index, name='index') in your polls/urls.py and check the result.
>>>>>
>>>>> On Friday, October 19, 2018 at 4:59:10 PM UTC+5:30, Bugs Bunny wrote:
>>>>>>
>>>>>> Greetings django team, I'm a newbie with this framework but I have 
>>>>>> experience with python, I did the first tutorial and it throws me a 404 
>>>>>> error, I saw that in the previous versions we used a r'formated 'string 
>>>>>> and 
>>>>>> indicated the beginning ^ and the end $ but in version 2.1 is no 
>>>>>> longer used, check and I do not know where the error comes from, I will 
>>>>>> leave some captures, the IRC room is down I hope answers from this 
>>>>>> wonderful community
>>>>>>
>>>>>> tuto/urls.py
>>>>>>  from django.contrib import admin
>>>>>>  from django.urls import include, path
>>>>>>
>>>>>>  urlpatterns = [
>>>>>>  path('polls/', include('polls.urls')),
>>>>>>  path('admin/', admin.site.urls),
>>>>>>  ]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> polls/urls.py
>>>>>> from django.urls import path
>>>>>> from . import views
>>>>>>
>>>>>> urlpatterns = [
>>>>>>  path(' ', views.index, name='index'),
>>>>>>  ]
>>>>>>
>>>>>> polls/views.py
>>>>>> from django.shortcuts import render
>>>>>> from django.http import HttpResponse as HR
>>>>>> # Create your views here.
>>>>>>
>>>>>> def index(request):
>>>>>>return HR("hola estas en el index de polls")
>>>>>>  
>>>>>>
>>>>>> mi internet its very laggy
>>>>>>
>>>>> -- 
>>>>> 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/8b8d005c-e2c1-4399-9bd8-9deb1cdea9f8%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/django-users/8b8d005c-e2c1-4399-9bd8-9deb1cdea9f8%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" g

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

2018-10-22 Thread Manjunath
Your project urls are set to address starting with admin & polls.

You can browse *localhost:8000/polls/*

On Monday, October 22, 2018 at 11:06:22 PM UTC+5:30, Bugs Bunny wrote:
>
> Regards for the answers this is my input
>
> On Sun, Oct 21, 2018 at 8:15 AM Motaz Hejaze  > wrote:
>
>> first , no spaces are allowed in URLS
>> as  Manjunath said
>> replace path(' ', views.index, name='index') with path('', views.index, 
>> name='index') in your polls/urls.py and check the result.
>>
>> second , run the server 
>> python manage.py runserver 
>>
>> third check the url
>> go to http://127.0.0.1:8000/polls
>>
>> On Sun, Oct 21, 2018 at 1:56 PM Manjunath > > wrote:
>>
>>> I think you have a space in your url path.
>>>
>>> replace path(' ', views.index, name='index') with path('', views.index, 
>>> name='index') in your polls/urls.py and check the result.
>>>
>>> On Friday, October 19, 2018 at 4:59:10 PM UTC+5:30, Bugs Bunny wrote:
>>>>
>>>> Greetings django team, I'm a newbie with this framework but I have 
>>>> experience with python, I did the first tutorial and it throws me a 404 
>>>> error, I saw that in the previous versions we used a r'formated 'string 
>>>> and 
>>>> indicated the beginning ^ and the end $ but in version 2.1 is no 
>>>> longer used, check and I do not know where the error comes from, I will 
>>>> leave some captures, the IRC room is down I hope answers from this 
>>>> wonderful community
>>>>
>>>> tuto/urls.py
>>>>  from django.contrib import admin
>>>>  from django.urls import include, path
>>>>
>>>>  urlpatterns = [
>>>>  path('polls/', include('polls.urls')),
>>>>  path('admin/', admin.site.urls),
>>>>  ]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> polls/urls.py
>>>> from django.urls import path
>>>> from . import views
>>>>
>>>> urlpatterns = [
>>>>  path(' ', views.index, name='index'),
>>>>  ]
>>>>
>>>> polls/views.py
>>>> from django.shortcuts import render
>>>> from django.http import HttpResponse as HR
>>>> # Create your views here.
>>>>
>>>> def index(request):
>>>>return HR("hola estas en el index de polls")
>>>>  
>>>>
>>>> mi internet its very laggy
>>>>
>>> -- 
>>> 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/8b8d005c-e2c1-4399-9bd8-9deb1cdea9f8%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/8b8d005c-e2c1-4399-9bd8-9deb1cdea9f8%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...@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/CAHV4E-cjH_Zc645Hj13201Z8Fme%2BBevfqA5oie5Gnz9ZN%3DGt%3DA%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAHV4E-cjH_Zc645Hj13201Z8Fme%2BBevfqA5oie5Gnz9ZN%3DGt%3DA%40mail.gmail.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/a0e99f7d-50af-41a8-a3c2-c648641aee14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2018-10-21 Thread Manjunath
I think you have a space in your url path.

replace path(' ', views.index, name='index') with path('', views.index, 
name='index') in your polls/urls.py and check the result.

On Friday, October 19, 2018 at 4:59:10 PM UTC+5:30, Bugs Bunny wrote:
>
> Greetings django team, I'm a newbie with this framework but I have 
> experience with python, I did the first tutorial and it throws me a 404 
> error, I saw that in the previous versions we used a r'formated 'string and 
> indicated the beginning ^ and the end $ but in version 2.1 is no longer 
> used, check and I do not know where the error comes from, I will leave some 
> captures, the IRC room is down I hope answers from this wonderful community
>
> tuto/urls.py
>  from django.contrib import admin
>  from django.urls import include, path
>
>  urlpatterns = [
>  path('polls/', include('polls.urls')),
>  path('admin/', admin.site.urls),
>  ]
>
>
>
>
>
> polls/urls.py
> from django.urls import path
> from . import views
>
> urlpatterns = [
>  path(' ', views.index, name='index'),
>  ]
>
> polls/views.py
> from django.shortcuts import render
> from django.http import HttpResponse as HR
> # Create your views here.
>
> def index(request):
>return HR("hola estas en el index de polls")
>  
>
> mi internet its very laggy
>

-- 
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/8b8d005c-e2c1-4399-9bd8-9deb1cdea9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Blog app Error: NoReverseMatch at /post/14/

2018-10-11 Thread Manjunath
Try adding for action to your add_comment url  then submit the form.
I guess currently form is getting submitted in the same page.

On Friday, October 12, 2018 at 12:00:03 PM UTC+5:30, Robert CR wrote:
>
> here is the template file.
>
> *add_comment.html*
>
>
>
> *{% extends "blog/base.html" %}{% load crispy_forms_tags %}{% block 
> content %}{% 
> csrf_token %}   class="border-bottom mb-4">Comment  {{ form|crispy }}  
> Post Comment!
>   {% endblock content %}*
>

-- 
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/aeaadfcb-38b7-4db2-9921-1c8c2485fd5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Blog app Error: NoReverseMatch at /post/14/

2018-10-11 Thread Manjunath
Please provide snapshot of your template file as well as project's urls.py 
file.

On Friday, October 12, 2018 at 11:14:22 AM UTC+5:30, Robert CR wrote:
>
> I am making a blog app for my django website. Right now i'm making a 
> comment feature, but when i try to view a post and the posts comments i get 
> an error.
>
> *The Error*
>
> [image: Udklip.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/76c1f1f7-27a1-4474-9410-e1e41fa2b738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-09 Thread Manjunath
No issues..
Glad I was of some help. :)

On Wednesday, October 10, 2018 at 12:07:24 AM UTC+5:30, victor jack wrote:
>
> Manjunath thanks i have fixed the bug in my code , the problem was in the 
> author_detail page. THanks so much for your time , i really appreciate your 
> help
> On Tue, Oct 9, 2018 at 9:40 AM Manjunath  > wrote:
>
>> No issues.
>> So, is the issue resolved now?
>>
>> On Tuesday, October 9, 2018 at 10:51:13 AM UTC+5:30, victor jack wrote:
>>>
>>> Will check it out . Thanks for your input very much appreciated
>>>
>>> On Tue, 9 Oct 2018 6:17 AM Manjunath,  wrote:
>>>
>>>> Hi Victor,
>>>> Are you sure book.author.pk has value?
>>>> can you send the model definition of Book & Author to verify?
>>>> Or you can verify yourself by using django Shell.
>>>>
>>>>
>>>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>>>>
>>>>>
>>>>> Thanks Manjunath, i will post two screen shots of the templates 
>>>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>>>
>>>>>> Seems like you are not passing the argument along with the url.
>>>>>> Please share your template file to verify.
>>>>>>
>>>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hello guys, i am in dire need of any django user's knowledge, i have 
>>>>>>> this issue that has been bugging me literally in my codebase. I want to 
>>>>>>> render a html page but the error keeps on coming, i have tried but to 
>>>>>>> no 
>>>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps 
>>>>>>> throwing me off please guys i need your assistance. Attached are 
>>>>>>> the screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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...@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/8b5f8e90-5ecb-4593-915e-e495e998760a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/8b5f8e90-5ecb-4593-915e-e495e998760a%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/a0f60b60-5ea4-4384-8800-08cbc8e08df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-09 Thread Manjunath
No issues.
So, is the issue resolved now?

On Tuesday, October 9, 2018 at 10:51:13 AM UTC+5:30, victor jack wrote:
>
> Will check it out . Thanks for your input very much appreciated
>
> On Tue, 9 Oct 2018 6:17 AM Manjunath, > 
> wrote:
>
>> Hi Victor,
>> Are you sure book.author.pk has value?
>> can you send the model definition of Book & Author to verify?
>> Or you can verify yourself by using django Shell.
>>
>>
>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>>
>>>
>>> Thanks Manjunath, i will post two screen shots of the templates 
>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>
>>>> Seems like you are not passing the argument along with the url.
>>>> Please share your template file to verify.
>>>>
>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>>>>
>>>>> Hello guys, i am in dire need of any django user's knowledge, i have 
>>>>> this issue that has been bugging me literally in my codebase. I want to 
>>>>> render a html page but the error keeps on coming, i have tried but to no 
>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps throwing 
>>>>> me off please guys i need your assistance. Attached are the 
>>>>> screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/8b5f8e90-5ecb-4593-915e-e495e998760a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-09 Thread Manjunath
Change the line
path('date/', views.timeinfo)
to 
path('date/', view=views.timeinfo)

Check if it is working.

On Tuesday, October 9, 2018 at 11:22:51 AM UTC+5:30, Pradeep Singh wrote:
>
> tell me how to map correctly
>
> On Tue, 9 Oct 2018 at 11:21, Pradeep Singh  > wrote:
>
>> how to correct it give me step by step instruction
>>
>> On Mon, 8 Oct 2018 at 22:43, victor jack > > wrote:
>>
>>> Your application'software URL  is not mapped correctly , from the error 
>>> page it is only the admin that can be loaded .
>>>
>>> On Tue, 9 Oct 2018 6:40 AM Pradeep Singh, >> > wrote:
>>>
>>>>
>>>>
>>>> On Mon, 8 Oct 2018 at 22:30, victor jack >>> > wrote:
>>>>
>>>>> screenshot of the error message Singh will be helpful
>>>>>
>>>>> On Tue, 9 Oct 2018 6:24 AM Pradeep Singh, >>>> > wrote:
>>>>>
>>>>>> i am using python 3.7+django 2.0
>>>>>>
>>>>>> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh >>>>> > wrote:
>>>>>>
>>>>>>> what is wrong with my...code...and setting please tell me
>>>>>>>
>>>>>>> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh >>>>>> > wrote:
>>>>>>>
>>>>>>>> please help me ...i am always getting django 404 error .how to fix 
>>>>>>>> it
>>>>>>>>
>>>>>>>> On Mon, 8 Oct 2018 at 22:17, Manjunath >>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Hi Victor,
>>>>>>>>> Are you sure book.author.pk has value?
>>>>>>>>> can you send the model definition of Book & Author to verify?
>>>>>>>>> Or you can verify yourself by using django Shell.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack 
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks Manjunath, i will post two screen shots of the templates 
>>>>>>>>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>>>>>>>>
>>>>>>>>>>> Seems like you are not passing the argument along with the url.
>>>>>>>>>>> Please share your template file to verify.
>>>>>>>>>>>
>>>>>>>>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack 
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hello guys, i am in dire need of any django user's knowledge, i 
>>>>>>>>>>>> have this issue that has been bugging me literally in my codebase. 
>>>>>>>>>>>> I want 
>>>>>>>>>>>> to render a html page but the error keeps on coming, i have tried 
>>>>>>>>>>>> but to no 
>>>>>>>>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps 
>>>>>>>>>>>> throwing me off please guys i need your assistance. Attached 
>>>>>>>>>>>> are the screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgi

Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread Manjunath
Please Send the screenshot of your 404 page.

On Tuesday, October 9, 2018 at 10:53:07 AM UTC+5:30, Pradeep Singh wrote:
>
> please help me ...i am always getting django 404 error .how to fix it
>
> On Mon, 8 Oct 2018 at 22:17, Manjunath > 
> wrote:
>
>> Hi Victor,
>> Are you sure book.author.pk has value?
>> can you send the model definition of Book & Author to verify?
>> Or you can verify yourself by using django Shell.
>>
>>
>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>>
>>>
>>> Thanks Manjunath, i will post two screen shots of the templates 
>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>
>>>> Seems like you are not passing the argument along with the url.
>>>> Please share your template file to verify.
>>>>
>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>>>>
>>>>> Hello guys, i am in dire need of any django user's knowledge, i have 
>>>>> this issue that has been bugging me literally in my codebase. I want to 
>>>>> render a html page but the error keeps on coming, i have tried but to no 
>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps throwing 
>>>>> me off please guys i need your assistance. Attached are the 
>>>>> screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/3e9db323-5b53-4ae3-a981-283bdc597cf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread Manjunath
Hi Victor,
Are you sure book.author.pk has value?
can you send the model definition of Book & Author to verify?
Or you can verify yourself by using django Shell.


On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>
>
> Thanks Manjunath, i will post two screen shots of the templates 
> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>
>> Seems like you are not passing the argument along with the url.
>> Please share your template file to verify.
>>
>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>>
>>> Hello guys, i am in dire need of any django user's knowledge, i have 
>>> this issue that has been bugging me literally in my codebase. I want to 
>>> render a html page but the error keeps on coming, i have tried but to no 
>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps throwing 
>>> me off please guys i need your assistance. Attached are the screenshots 
>>> . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I put 3 more fields on database models

2018-10-06 Thread Manjunath
Seems like you have not performed migrations after adding the new fields.

execute these commands & then run your server.

python manage.py makemigrations

python manage.py migrate

 


On Sunday, October 7, 2018 at 3:33:54 AM UTC+5:30, Bleron Uka wrote:
>
> Hi, 
> My database has data there and i add 3 more inputs and i am having this 
> error ?!
>

-- 
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/69a9ed3d-d083-49b6-bad4-80ffe7a3bc77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-05 Thread Manjunath
Seems like you are not passing the argument along with the url.
Please share your template file to verify.

On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>
> Hello guys, i am in dire need of any django user's knowledge, i have this 
> issue that has been bugging me literally in my codebase. I want to render a 
> html page but the error keeps on coming, i have tried but to no avail, 
> ['catalog\\/author/(?P\\d+)$'] 
> - this regex keeps throwing me off please guys i need your assistance. 
> Attached are the screenshots . 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/4efd6d55-5306-45a5-b1b6-f95003596348%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need help with unique_together - on ForeignKey and Boolean field

2018-10-05 Thread Manjunath
How are you deciding which post is pinned?
The unique approach might not do any good to you.
A simple solution is to update the pinned values of each post to False & 
setting the required post pinned value to True when you are setting a 
pinned post.
There may be better solutions, but I hope this might help you.


On Friday, October 5, 2018 at 10:06:48 PM UTC+5:30, Chuka Nwadiogbu wrote:
>
> Hi, I know it has been a while since this question was asked but I have  a 
>> similar question. I have a Post model, and I want there to be one pinned 
>> post out of the list of all posts, I tried creating a new property thus, 
>
>
> ```pinned = models.BooleanField(default=False, unique=True)```
>
> but it caused major problems. I want to have just one pinned post and the 
> rest unpinned but that would mean pinned = True for one post/article and 
> pinned=False for the rest and I don't think that is how unique is supposed 
> to work. Unique is supposed to be different for all the objects right? not 
> sure how to tackle this problem.
>
> someone suggested I use a foreignkey field to link them all together but 
> now if I'm being honest, I actually do not know where to go from here 
>
> ```class PinnedPost(models.Model):
> pinned_post = models.ForeignKey(Post, related_name='pinned', 
> on_delete=models.CASCADE)``` 
> if there's anyone here that can help me with this please, I'd really 
> appreciate it. 
>

-- 
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/0ba74428-19b6-4d60-9445-e6ace97297e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: redirect page

2018-10-04 Thread Manjunath
The issue is with your urls.py file.
Since the first pattern you have given is empty, it will match all 
requests.  Interchange lines 4 & 5 and your issue will be resolved.


On Friday, October 5, 2018 at 2:17:27 AM UTC+5:30, Gear Crew wrote:
>
>
> when you click on any link doesn't go to music/1/ 
>
> it reloads that same content 
>
>
>
>
> [image: Screenshot from 2018-10-04 22-43-29.png]
>
> [image: Screenshot from 2018-10-04 22-45-29.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/e4fe48c2-2188-4316-8834-42f582b20718%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django app with Channels on Linux Hosting

2018-10-03 Thread Manjunath
Hi Andrew,
I checked with my host providers. They are telling that websockets are 
supported & I should check my code. :(

On Thursday, October 4, 2018 at 3:18:23 AM UTC+5:30, Andrew Godwin wrote:
>
> Hi there - it sounds like your host does not support websockets. You 
> should check with them for more.
>
> Andrew
>
> On Wed, 3 Oct 2018 at 23:43, Manjunath > 
> wrote:
>
>> Hi all,
>> I have developed a simple app using django channels.
>>  
>> I would like to deploy it on a linux hosting provider (Currently I have 
>> account with mochahost.com - Web Hosting:mocha package) & I have 
>> deployed the app there.
>> All features of the app are working except for web sockets which give the 
>> following error: *Error during WebSocket handshake: Unexpected response 
>> code: 404*
>>
>> The app in local development system works fine without a glitch but the 
>> ASGI layer is not working after deployment.
>>
>> My current host provider is running pyhon apps using  Passenger.
>>
>> Is there any extra settings I need to do to setup the Socket layer?
>> Kindly help me in this issue.
>>
>> Package versions used:
>> Python - 3.6.6
>> Django - 2.1.1
>> Channels - 2.1.3
>> Channels_redis - 2.3.0
>>
>>
>> Hope to get help for this issue..
>>
>> Thanks & Regards,
>> Manjunath
>>
>> -- 
>> 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/e39d3fb8-bad0-4852-a3df-aa52ebf45d6d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e39d3fb8-bad0-4852-a3df-aa52ebf45d6d%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/15f33bc8-012d-4f8b-8332-7e28b74f9811%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deploying Django app with Channels on Linux Hosting

2018-10-03 Thread Manjunath
Hi all,
I have developed a simple app using django channels.
 
I would like to deploy it on a linux hosting provider (Currently I have 
account with mochahost.com - Web Hosting:mocha package) & I have deployed 
the app there.
All features of the app are working except for web sockets which give the 
following error: *Error during WebSocket handshake: Unexpected response 
code: 404*

The app in local development system works fine without a glitch but the 
ASGI layer is not working after deployment.

My current host provider is running pyhon apps using  Passenger.

Is there any extra settings I need to do to setup the Socket layer?
Kindly help me in this issue.

Package versions used:
Python - 3.6.6
Django - 2.1.1
Channels - 2.1.3
Channels_redis - 2.3.0


Hope to get help for this issue..

Thanks & Regards,
Manjunath

-- 
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/e39d3fb8-bad0-4852-a3df-aa52ebf45d6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deploying Django app with Channels on a Shared Linux Hosting

2018-10-03 Thread Manjunath
Hi all,
I have developed a simple django application using channels & deployed it 
in a shared linux hosting service(mochahost.com - Webhosting: mocha 
package).
It serves django app with help of Passenger.

The wsgi is working without any issue but the ASGI layer seems to be non 
responsive.
When trying to connect, I am getting the following error message: *Error 
during WebSocket handshake: Unexpected response code: 404*

I don't know how to resolve this.
Is there any extra setup steps I need to follow or any other settings I 
need to do?
Any help would be very much appreciated.

Package versions used:
Python: 3.6.6
Django: 2.1.1
Channels: 2.1.3
Channels_redis: 2.3.0

Thanks & Regards,
Manjunath

-- 
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/cad88411-bcf0-4061-9a37-621f9f11d327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ABOUT DJANGO

2013-11-09 Thread HUGAR MANJUNATH Manjunath
HELLO , I AM NOT GETTING HOW TO INSTAL THE DJANGO AND PYTHAN ON OUR MACHINE.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/133d769f-dd63-4e69-b14b-f4e25b3bc259%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: __unicode__() addition not working in basic poll application.

2013-06-20 Thread Manjunath Shivanna
Just restart the python interactive Shell... that should solve your problem

Regards,
Manju

On Monday, May 16, 2011 5:32:41 AM UTC-7, maaz muqri wrote:
>
> Hi, 
>  
> class Poll(models.Model): 
> # ... 
> def __unicode__(self): 
> return self.question 
>
> class Choice(models.Model): 
> # ... 
> def __unicode__(self): 
> return self.choice 
>  
>
>
> after adding the above code also I am not able to retrieve the 
> question by the command: 
>
> I am getting this 
>
> >>>Poll.objects.all() 
> [] 
>
>
> instead of this 
>
> >>>Poll.objects.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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.