Re: Creating superuser

2018-10-04 Thread Aware Fun
Migrate your database


On Thu, Oct 4, 2018, 10:30 PM VIPIN VIPIN  wrote:

> I had created superuser successfully
> But whenever I go to admin panel in my server, it does not give me any
> login 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/735ef3b5-1c1f-4311-a4b0-656034f6bf87%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/CA%2B8bEuTY8aHC7dMLrCrDz9Xa4mn6PixF3uG13GJWXeQK6R%2Be5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Update the django project from local to production

2018-08-25 Thread Aware Fun
Install POSTGRESQL database for production.In django sqlite is build in
database and only use for local.

rahul

On Sat, Aug 25, 2018, 3:04 PM Kamal Sharma 
wrote:

> Hey,
> How i have deployed my django project to my VPS and now i have done some
> change in my local django project and want to update on production server.
> How can i do that.?
> please help me
> Thanks
>
> Kamal Sharma
>
> --
> 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/CAHfh8PTjZ%2BHWU%2BY6nnD-fyYo-QaA%3Dw11C5Xdnb1S-Z9UYTamDw%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/CA%2B8bEuTgJfFPhP8HRdoR-ru1tAFpiG47vGcC-hFRWXFgrOfL%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Aware Fun
rahul

On Fri, Aug 24, 2018, 3:17 AM herve kabore  wrote:

> this is the urls.py
>
>
> from django.conf.urls import include,url
> from django.contrib import admin
>
> urlpatterns = [
> url(r'^admin/', include(admin.site.urls)),
>
>  url(r'^$', 'blog.views.home', name='home'),
> ]
>
>
> this is the views
>
>
> from django.shortcuts import render
>
> from django.http import HttpResponse
>
> # Create your views here.
>
> def home(request):
> return HttpResponse("Bonjour monde!")
>
>
>
> Unhandled exception in thread started by  check_errors..wrapper at 0x7f8f4a8afe18>
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line
> 228, in wrapper
> fn(*args, **kwargs)
>   File
> "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py",
> line 124, in inner_run
> self.check(display_num_errors=True)
>   File "/usr/lib/python3/dist-packages/django/core/management/base.py",
> line 359, in check
> include_deployment_checks=include_deployment_checks,
>   File "/usr/lib/python3/dist-packages/django/core/management/base.py",
> line 346, in _run_checks
> return checks.run_checks(**kwargs)
>   File "/usr/lib/python3/dist-packages/django/core/checks/registry.py",
> line 81, in run_checks
> new_errors = check(app_configs=app_configs)
>   File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line
> 16, in check_url_config
> return check_resolver(resolver)
>   File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line
> 26, in check_resolver
> return check_method()
>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
> 256, in check
> for pattern in self.url_patterns:
>   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line
> 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
> 407, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line
> 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line
> 400, in urlconf_module
> return import_module(self.urlconf_name)
>   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in
> _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "/home/herve/Bureau/mes_projets/eboutique/eboutique/urls.py", line
> 20, in 
> url(r'^$', 'backoffice.views.home', name='home'),
>   File "/usr/lib/python3/dist-packages/django/conf/urls/__init__.py", line
> 85, in url
> raise TypeError('view must be a callable or a list/tuple in the case
> of include().')
> TypeError: view must be a callable or a list/tuple in the case of
> include().
>
> --
> 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/c20e08d2-2578-4430-963e-bb14df3a0ece%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/CA%2B8bEuQ%2BuF7YM7S9q-DSPD9QCOgeXrLKp_5M_XNEEJp_JKQG%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Aware Fun
Primary key is a unique kye that differentiate you values like in order
1,2,3 like this or u can say that your values are are stored in order.In
django when u create object and give  values first it by default assign the
primary key to 1.



rahul

On Thu, Aug 23, 2018, 11:20 PM Vishak Raj  wrote:

> Hello
>
> Thanks for replying..
>
> I have a confusion
>
> In normal python shell, we import sqlite3 and insert values without giving
> the  Id or primary key..
>
> Why we giving primary key in django..
> Is it possible to insert values without primary key like we give in python
> shell..
>
> Thanks in advance
>
> On Thursday, August 23, 2018, 'Vinod Kumar' via Django users <
> django-users@googlegroups.com> wrote:
>
>> By default model have id column , so you have to put value of id.
>>
>> On Thu, Aug 23, 2018, 5:00 PM Vishak Raj  wrote:
>>
>>> hello,
>>>
>>> i am inserting the values in the table using custome sql in django
>>> shell..
>>>
>>> p.execute('INSERT INTO webapp_information 
>>> VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',i)
>>>
>>> i is the list of values
>>>
>>> it shows the error:OperationalError: table webapp_information has 32 
>>> columns but 31 values were supplied
>>>
>>> I created the only 31 columns in models.py
>>>
>>>
>>> What to do.. 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/10ad145e-5e0b-4d52-a8c9-54af6fa69fba%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> 
>>
>> *This e-mail and all attachments are intended solely for use by the
>> intended recipient and may contain confidential / proprietary information
>> of KiwiTech, LLC, subject to important disclaimers and conditions including
>> restrictions on the use, disclosure, transfer or export of such
>> information.* *If you have received this message in error or are not the
>> named recipient(s), please immediately notify the sender at the telephone
>> number stated above or by reply e-mail and delete this e-mail from your
>> computer*
>>
>> --
>> 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/CAJOHC1xufhygtCtBOjxZhUf26oonYYLxaZeqv05QRJS%3DK%2BPOJQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> vishakraj
>
> --
> 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/CAFL71Cz5ZrAwDc2EgrXfX-QOLt-nL4tcM3fyMHGGRZQEjyrJJw%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/CA%2B8bEuR3CYoq2-47uC-2BrVgF5bSK9dURB5y6PVW7nWrAUbi3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Aware Fun
We dont need to give primary key it automatically define the key.

rahul

On Thu, Aug 23, 2018, 11:20 PM Vishak Raj  wrote:

> Hello
>
> Thanks for replying..
>
> I have a confusion
>
> In normal python shell, we import sqlite3 and insert values without giving
> the  Id or primary key..
>
> Why we giving primary key in django..
> Is it possible to insert values without primary key like we give in python
> shell..
>
> Thanks in advance
>
> On Thursday, August 23, 2018, 'Vinod Kumar' via Django users <
> django-users@googlegroups.com> wrote:
>
>> By default model have id column , so you have to put value of id.
>>
>> On Thu, Aug 23, 2018, 5:00 PM Vishak Raj  wrote:
>>
>>> hello,
>>>
>>> i am inserting the values in the table using custome sql in django
>>> shell..
>>>
>>> p.execute('INSERT INTO webapp_information 
>>> VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',i)
>>>
>>> i is the list of values
>>>
>>> it shows the error:OperationalError: table webapp_information has 32 
>>> columns but 31 values were supplied
>>>
>>> I created the only 31 columns in models.py
>>>
>>>
>>> What to do.. 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/10ad145e-5e0b-4d52-a8c9-54af6fa69fba%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> 
>>
>> *This e-mail and all attachments are intended solely for use by the
>> intended recipient and may contain confidential / proprietary information
>> of KiwiTech, LLC, subject to important disclaimers and conditions including
>> restrictions on the use, disclosure, transfer or export of such
>> information.* *If you have received this message in error or are not the
>> named recipient(s), please immediately notify the sender at the telephone
>> number stated above or by reply e-mail and delete this e-mail from your
>> computer*
>>
>> --
>> 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/CAJOHC1xufhygtCtBOjxZhUf26oonYYLxaZeqv05QRJS%3DK%2BPOJQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> vishakraj
>
> --
> 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/CAFL71Cz5ZrAwDc2EgrXfX-QOLt-nL4tcM3fyMHGGRZQEjyrJJw%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/CA%2B8bEuRd7uqkw2dHt3_3J7QqJvXFD4_Kt4bAVXS2ynQtf9B9_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.