Use of asyncio

2019-02-01 Thread shiva kumar
Can anyone explain to which applications asyncio used for.

-- 
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/CAMsYeuHMYhz-m%3D3hr%2BAwzdmOGx3UMr1HNDSYLV-MAWyxtRWZ4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Fwd: data sharing with multiple clients by server simultaneously

2019-01-30 Thread shiva kumar
-- Forwarded message -
From: shiva kumar 
Date: Tue 29 Jan, 2019 11:21 pm
Subject: data sharing with multiple clients by server simultaneously
To: 


Hi guys. I have a doubt regrading communication b\w client and server.
consider an example there are 20 clients continuously connected and share
data with server and server response to there request.
my requirements are
 What are all the concepts needed inorder to make it? and some alternatives.

thank u

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


Re: Loading Django views inside template with JQuery

2019-01-22 Thread shiva kumar
I think you want to load the data from view to html using jQuery.

I hope ajax concepts will used. Once try it.

On Tue 22 Jan, 2019 6:13 pm Ricardo Cataldi  Hy guys, you all right?
>
> I have a problem that it seems not to be any answer in Stack Overflow.
>
> I need to load three views inside a template, and i decided to do that
> based on html tags and JQuery. The bellow image shows how the front end
> will look like:
>
> [image: imagem_tab.png]
>
> What happens is that the tabs should load a view separately, I've searched
> on ways of doing that with JQuery but i didn't found any that would work...
>
> Can anyone tell me how exactly I can load a view with JQuery inside a html
> tab? In case it is not possible, can you give me an alternative?
>
> The html following:
>
> {% block header %}
> 
> 
> {% trans "Gerenciamento de 
> Produtos" %}
> 
>  role="tablist">
> 
>  role="tab" data-toggle="tab" data-target="#ListProduct">
> list
> Listar Produtos
> 
> 
> 
> 
> view_list
> Listar Opções
> 
> 
> 
> 
> add_box
> Adicionar Opções
> 
> 
> 
> 
> 
> 
> {% endblock header %}
>
> {% block content %}
> 
> 
> 
> 
> 
> {% block productlist %}
>
> {% endblock %}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {% block listtoptions %}
>
> {% endblock %}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {% block createoptions %}
>
> {% endblock %}
> 
> 
> 
> 
> 
> {% endblock content %}
>
>
> I want to load the views inside all those blocks.
>
> Thanks in advance!!
>
> --
> 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/55f946c1-53de-4c2d-984e-5d9e774e03b2%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/CAMsYeuFGOx4T_%3D7VWrJrC_0AtTKpwCEANyAKaneV3XgGxsK--g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem in activating virtual environment in Django with ". \Scripts\activate" command

2019-01-17 Thread shiva kumar
Can you tell which os ur using.

On Fri 18 Jan, 2019 12:48 am Django Geek Aditya  Shell Output after entering command is
> PS E:\todo> . \Scripts\activate
> . : The term '\Scripts\activate' is not recognized as the name of a
> cmdlet, function, script file, or operable
> program. Check the spelling of the name, or if a path was included, verify
> that the path is correct and try again.
> At line:1 char:3
> + . \Scripts\activate
> +   ~
> + CategoryInfo  : ObjectNotFound: (\Scripts\activate:String)
> [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
>
> PS E:\todo>
>
> --
> 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/00a2f79a-0d62-4fd8-8cd4-cd5b9e8d1f2b%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/CAMsYeuHMGXx9rteELakC6zyqWGR9tGGMQPQ4m5sN0bEbJaqD%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template not exist error snap in attechment

2019-01-12 Thread shiva kumar
It's not detail it's details.html

On Sat 12 Jan, 2019 12:42 pm tribhuvan kishor  even list.html is in the same place and its accessible . i am not getting
> why showing problem with details.html
>
>
> On Sat, Jan 12, 2019 at 12:40 PM tribhuvan kishor <
> tribhuvankishor...@gmail.com> wrote:
>
>> """
>> Django settings for mysite project.
>>
>> Generated by 'django-admin startproject' using Django 2.0.5.
>>
>> For more information on this file, see
>> https://docs.djangoproject.com/en/2.0/topics/settings/
>>
>> For the full list of settings and their values, see
>> https://docs.djangoproject.com/en/2.0/ref/settings/
>> """
>>
>> import os
>>
>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>
>>
>> # Quick-start development settings - unsuitable for production
>> # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
>>
>> # SECURITY WARNING: keep the secret key used in production secret!
>> SECRET_KEY = 'po3(*jzn*8yzi$765qqcke+ewdc()g6xbwvx(g64i^bw28ulc@'
>>
>> # SECURITY WARNING: don't run with debug turned on in production!
>> DEBUG = True
>>
>> ALLOWED_HOSTS = []
>>
>>
>> # Application definition
>>
>> INSTALLED_APPS = [
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> 'blog',
>> ]
>>
>> MIDDLEWARE = [
>> 'django.middleware.security.SecurityMiddleware',
>> 'django.contrib.sessions.middleware.SessionMiddleware',
>> 'django.middleware.common.CommonMiddleware',
>> 'django.middleware.csrf.CsrfViewMiddleware',
>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> 'django.contrib.messages.middleware.MessageMiddleware',
>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>> ]
>>
>> ROOT_URLCONF = 'mysite.urls'
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': [],
>> 'APP_DIRS': True,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.request',
>> 'django.contrib.auth.context_processors.auth',
>> 'django.contrib.messages.context_processors.messages',
>> ],
>> },
>> },
>> ]
>>
>> WSGI_APPLICATION = 'mysite.wsgi.application'
>>
>>
>> # Database
>> # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
>>
>> DATABASES = {
>> 'default': {
>> 'NAME': 'mysite',
>> 'ENGINE': 'django.db.backends.mysql',
>> 'HOST': 'localhost',
>> 'PORT':'3306',
>> 'USER': 'root',
>> 'PASSWORD': 'root',
>> }
>> }
>>
>>
>> # Password validation
>> # 
>> https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
>>
>> AUTH_PASSWORD_VALIDATORS = [
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>> },
>> ]
>>
>>
>> # Internationalization
>> # https://docs.djangoproject.com/en/2.0/topics/i18n/
>>
>> LANGUAGE_CODE = 'en-us'
>>
>> TIME_ZONE = 'UTC'
>>
>> USE_I18N = True
>>
>> USE_L10N = True
>>
>> USE_TZ = True
>>
>>
>> # Static files (CSS, JavaScript, Images)
>> # https://docs.djangoproject.com/en/2.0/howto/static-files/
>>
>> STATIC_URL = '/static/'
>>
>>
>> On Sat, Jan 12, 2019 at 11:33 AM shiva kumar <
>> kannamshivakumar...@gmail.com> wrote:
>>
>>> once post your setting.py file content . i will try to figure it out.
>>>
>>>
>>> On Sat, Jan 12, 2019 at 11:16 AM tribhuvan kishor <
>>> trib

Re: template not exist error snap in attechment

2019-01-11 Thread shiva kumar
once post your setting.py file content . i will try to figure it out.


On Sat, Jan 12, 2019 at 11:16 AM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:

> this is my directory structure
>
> On Fri, Jan 11, 2019 at 9:19 PM Martin K  wrote:
>
>> TEMplate DIrectory
>>> PROJECT/APP/template/blog/detail.html
>>>
>>>
>> You see directly in the error that template should be located in
>> PROJECT/APP/template/blog/*post*/detail.html
>>
>> --
>> 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/b56b852a-9948-45d5-bafd-479530c0c2ca%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> 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/CACiphSX4ScGJMbkik-zLvhh%2BQA6KCq7toBzFMEijOvJbtwKzFw%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/CAMsYeuEAkL%2BsHDStbMn25eK%2BWsALdo%2BaD_Do8Z9%3DLVs3DzRchw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template not exist error snap in attechment

2019-01-11 Thread shiva kumar
Can you put your project file structure.

On Fri 11 Jan, 2019 5:46 pm NAveeN Kumar Reddy <
knaveenkumarredd...@gmail.com wrote:

> Check the link before pattern in path function
>
> On Fri 11 Jan, 2019, 4:43 PM tribhuvan kishor <
> tribhuvankishor...@gmail.com wrote:
>
>> URL
>>  path('//',views.post_detail, name='post_detail'),
>> VIEW
>>
>> def post_detail(request, year,  post):
>> post = get_object_or_404(Post, slug=post,
>>  status='published',
>>  publish__year=year,)
>>
>>  return render(request,
>>   'blog/post/detail.html',
>>   {'post': post})
>>
>>
>> TEMPLATE
>>
>> {% extends "blog/base.html" %}
>> {% block title %}{{ post.title }}{% endblock %}{% block content %}
>> {{ post.title }}
>> 
>> Published {{ post.publish }} by {{ post.author }}
>> 
>> {{ post.body|linebreaks }}
>> {% endblock %}
>>
>> Canonical URL
>>
>>
>> def get_absolute_url(self):
>> return reverse('blog:post_detail', args=[self.publish.year, self.slug]
>>
>>
>> TEMplate DIrectory
>> PROJECT/APP/template/blog/detail.html
>> --
>> 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/CACiphSX2LQ-oL0OwktHhLqCFwqqPwVwFagCaGX2rNTiBdxOa%2BA%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%2BC2Q80cu1L4BvXE9PX%2BF140hOhiX8ZVLBqJtjATpm%3DJEcACNw%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/CAMsYeuHzyaj1H5ocfJQpfdOvMKmK_MHMhxxDywkxgpFYX%2By_FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django template translation not working as expected

2019-01-10 Thread shiva kumar
Can you explain what are django translation

On Thu 10 Jan, 2019 11:59 pm Ashutosh Das  I am using django 2.1 , here is all the settings related to translation:
>
>
> MIDDLEWARE = [
> 'corsheaders.middleware.CorsMiddleware',
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.locale.LocaleMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> 'debug_toolbar.middleware.DebugToolbarMiddleware',]
>
> LANGUAGE_CODE = 'en'
>
> LANGUAGES = (
> ('en', _('English')),
> ('bn', _('Bengali')))
>
> LOCALE_PATH = (
> os.path.join(BASE_DIR, 'locale'))
>
> TIME_ZONE = 'Asia/Dhaka'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = False
>
> Template tag that I want to translate:
>
>
> {% load i18n %}
>   {% trans "About Us" %}
> I run both ./manage.py makemessages --all ./manage.py compilemessages
> commands , also added translation in .po file after makemessages command:
>
>
> # locale/bn/LC_MESSAGES/django.po#: templates/partials/footer.html:8
> msgid "About Us"
> msgstr "আমাদের সম্পর্কে"
>
> When I changed the language code from en to bn, template string still
> rendering the default english "About Us".
>
> Here are all the codes that I am using for changing language:
>
>
> 
> {% get_current_language as LANGUAGE_CODE %}
> {% if LANGUAGE_CODE == 'en' %}
> ENGLISH
> {% else %}
> বাংলা
> {% endif %}
> 
> 
> ENGLISH
> বাংলা
> 
> 
>
>
> views.py :
>
>
> def change_lan(request):
> allowed_lan = ('en', 'bn')
> get_lan = request.GET.get('lan', 'en')
> if get_lan in allowed_lan:
> translation.activate(get_lan)
> request.session[translation.LANGUAGE_SESSION_KEY] = get_lan
> return redirect(request.META.get('HTTP_REFERER', '/'))
> else:
> return redirect(request.META.get('HTTP_REFERER', '/'))
>
> --
> 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/3ed3c00a-148e-4817-a470-bada1af10ba3%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/CAMsYeuG%3DB65MCOZAz-z3x40iB94jG4HmR2TY-8Ma3siycQ7EJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get the maximum possible ID value for a primary key?

2019-01-09 Thread shiva kumar
can you explain it indetail


On Wed, Jan 9, 2019 at 7:18 PM Stodge  wrote:

> Is there a way to get the maximum value that an ID can be for a model that
> uses AutoField for its primary key? For example, in PostgreSQL I could do:
>
> SELECT maximum_value FROM information_schema.sequences WHERE
> sequence_name = 'my_sequence_id_seq';
>
>  maximum_value
> ---
>  9
> (1 row)
>
>
>
> I'm looking through the model meta data and the AutoField but I don't see
> anything.
>
> 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/6c5d3bfc-b2ef-4ff1-b589-2f7b3ee07e0a%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/CAMsYeuETr9OqywfEAFNZz8QDRTCrPKSFUECHk9bmL-tTsfkSwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pop-up forms

2019-01-09 Thread shiva kumar
As i am new to django i dont know about pop-up forms.
can you give an overview of it please.


On Tue, Jan 8, 2019 at 7:34 PM DrTen  wrote:

> Hi Did you ever solved this issue, its 2019 and I still can't find a
> working solution.
>
> On Monday, October 9, 2006 at 3:31:19 PM UTC-5, hernan43 wrote:
>>
>> You wouldn't happen to know a good resource of where I can learn more
>> of how to create a form like this would you? I'd like to implement a
>> similar capability and would like to read up on how to do it.
>> --Ray
>>
>> --
> 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/d66a086e-5ac0-4dbf-a1e0-c4a6ff64940c%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/CAMsYeuExU7DDYHWt6%3DHuB5FZNK%3D-%3DpNMKP4j1nX2B1msQkk9GQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Loop over Django objects and Bootstrap cards

2019-01-03 Thread shiva kumar
I think use inline div elements in place of block. Block elements makes u
to start elements in next line.

On Thu 3 Jan, 2019 7:41 pm valentin jungbluth  I used UploadField so I just have to use
> {{ object.fieldname.url }}
>
> and it works.
>
> But my question is : How I can gather all documents according to one
> publication in one card ?
>
> --
> 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/cafbf573-f6ac-4ee7-9d3a-d89f42e18820%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/CAMsYeuGSJeG_CTGuXRpS5GvOVHNAc5Q-Ts0hRzn18Ei2-N4ssQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error when installing channels

2018-12-22 Thread shiva kumar
Hai guys, I am getting error when installing channels using pip.

These is the error ' need Microsoft visual c++ 14.0'

Can anyone suggest how to download and get it done. I tried to do it. I am
unable to understand how to do and what to do.

Pls respond to my issue.

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


Re: help

2018-12-19 Thread shiva kumar
Once post ur forms.py file. Check views and url files. There are errrors

On Tue 11 Dec, 2018 7:55 pm Tosin Ayoola  getting this error when i click on a new link i just added please can
> anyone help out below is my codes, views, url
>
>
> ##url
>
> from django.urls import path
> from . import views
>
> urlpatterns = [
>   path('', views.index, name = 'index'),
>   path('dailytask', views.dailyactivities, name = 'dailyactivities'),
>
> ]
>
> ## views
>
> from django.shortcuts import render, redirect
> from . import  models
> from . forms import DailyTaskForm
> def index(request):
>   return render(request, 'index.html')
>
> def dailyactivities(request):
>   tasks = DailyTaskForm(request.method == 'POST' or None)
>   if request.method == 'POST' and tasks.is_valid()\
> and tasks.cleaned_data():
>   tasks.save()
>   return render(request, 'index')
>
>   return redirect(request, 'dailychoresform.html')
>
>
> --
> 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/CAHLKn70uUYa4j5Bd-6fv8UeuitLx0W4JefAi7Hid84%2BP1SzMLg%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/CAMsYeuF4ZZBjUcxRpgt0NAjs3okSouh_nZxotPZaRNXDCQF_4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Manage static files using Jinja2

2018-12-19 Thread shiva kumar
Yes static files need a url path. But that path should be mentioned in
setting.py file. That makes django, when there is use of css or js files it
refers to that path

On Tue 11 Dec, 2018 4:32 am  I am using the documentation to learn Django. When I started creating
> static files, I started to get problems. I am using this:
> https://docs.djangoproject.com/en/2.1/howto/static-files/ but I think it
> is using Django template engine. How can I fix this problem?
>
> Does every static file needs a url?
>
> Thank you.
>
> La información contenida en este e-mail y sus anexos es confidencial,
> privilegiada y está dirigida exclusivamente a su destinatario, en
> consecuencia, solo puede ser utilizada por aquel. Si usted no es el
> destinatario original, no deberá examinar, usar, copiar o distribuir este
> mensaje o la información que contiene. Si lo recibe por error, por favor
> reenvíelo a la persona que se lo envió y elimínelo. Cualquier retención o
> uso total o parcial no autorizada de este mensaje está estrictamente
> prohibida y sancionada por ley.
>
> --
> 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/48ff25dd-f227-4984-82f4-26dc0c60e948%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/CAMsYeuFo_%3DtA6k8kdRzt_ABQnDXsph-f3NCaQGoXAvUEjHCzYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to extract a number from a url

2018-12-05 Thread shiva kumar
Use

 in place of number

An add extra parameter in views which u will relate this to

On Thu 6 Dec, 2018 2:18 am Sourajit Mohanty  I want to extract the number from this  url 'music/6/newsongs/' so that I
> can use that number to redirect it to another page..
> How can I do that??
>
> --
> 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/8512424b-8a0e-40a2-92f0-2e9d4f8995a1%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/CAMsYeuHeAbwr6SgozHM4wxkqMFiWhLnQc6ODy75FHm0qBs9O0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Integrating ml in django

2018-12-04 Thread shiva kumar
I have one doubt regarding django. That, can we use ml concepts and
packages in django as our backend technology
That is by using ml concepts like numpy, tensor flow can we make data
present in database more functional to use like predictions etc.

Any suggestions will be helpful.that makes me some awareness.please respond
if u guys know about 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/CAMsYeuGonxq2asuFCX4qb%3DDRfSoVo2CavFEEHzvEa-p%3DD8GhLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


forms.FORM in django

2018-11-27 Thread shiva kumar
I am new to django and i am learning it slowly. I worked on forms but i
have one doubt,
what  forms.FORM   indicate.

i know we are inheriting forms in to our class but i dont understand
specifically what it is. how FORM will be used

could anyone please explain what it is

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


Re: runserver error rectification

2018-11-27 Thread shiva kumar
import polls in  mysite/mysite/urls.py
i think it will work


On Tue, Nov 27, 2018 at 3:00 PM Sanjay Malviya  wrote:

> What modification to codes required, pls in project
> mysite/mysite/polls(app)
> polls/views.py
> from django.http import httpresponse
> def index(request):
> return httpresponse('Hello, world, You're at the polls index')
> polls/urls.py
> from django.urls import path
> from . import views
> urlpatterns = [
> path('', views.index, name='index'),
> ]
> mysite/mysite/urls.py
>  from django.contrib import admin
> from django.urls import include, path
> urlpatterns = [
> path('polls/', include('polls.urls')),
> path('admin/', admin.site.urls),
> ]
>
>
> On Mon, Nov 26, 2018 at 10:57 AM Jason  wrote:
>
>> whatever you have as url patterns is not a list, tuple or other iterable.
>>
>> --
>> 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/20504ff8-1711-4b9b-9b60-300083a8a60c%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/CAN%2BaYhcmUXjGgSeGazYB3c99t0XpgF_y4ykA64ePm%2B_uFApx3g%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/CAMsYeuFYvZkTvX67LkguVWAL_WjEBc2nZXfOcfmxJaTo5Oh4kQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get a multiple select widget for the Admin without a queryset

2018-11-26 Thread shiva kumar
Can you explain what ur problem briefly.

On Tue 27 Nov, 2018 8:54 am Mike Dewhirst  In the Admin I would like to provide the user with checkboxes against a
> list of options not stored in the database.
>
> Specifically, I want to retrieve a comma separated list of integers from a
> model field choices attribute. The model field looks like this:
>
> menu_links = models.CharField(max_length=LARGE, blank=True,
> choices=MENU_LINKS,
> default='',
> validators=[int_list_validator],
> verbose_name='Menu data links',
> help_text="These selections control which URLs are displayed in the "
> "'Substances and mixtures' menu",
> )
>
> I'm seeing two problems.
>
> One is getting such a widget to appear in an admin.StackedInline class.
>
> Two is creating the data in the above models.CharField from
> choices=MENU_LINKS
>
> Here it is ...
>
> MENU_LINKS = [
> (1, "ChemIDplus"),
> (2, "ChemSpider"),
> (3, "NIST Webbook"),
> ]
>
>
> In the admin I have tried
>
> class ProfileFilteredSelectMultiple(admin.widgets.FilteredSelectMultiple):
>
> def __init__(self, verbose_name='Menu links', is_stacked=False, *args, 
> **kwargs):
> args += (verbose_name,)
> args += (is_stacked,)
> super(ProfileFilteredSelectMultiple, self).__init__(*args, **kwargs)
>
>
> Then in the nested StackedInline class ...
>
> class CompanyProfileInline(admin.StackedInline):
>
> model = CompanyProfile
> formfield_overrides = {
> CharField: {'widget': ProfileFilteredSelectMultiple},
> }
> readonly_fields = (('modified', 'modified_by',))
> fieldsets = (
> ('More detail for company profile', {
> 'classes': ('collapse', 'wider'),
> 'fields': (
>  'menu_links',
>  ...
>
> Any hints or pointers will be appreciated.
>
> Thanks
>
> Mike
>
> --
> 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/a49d990e-67fc-3327-4205-a3b843f7f7ae%40dewhirst.com.au
> 
> .
> 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/CAMsYeuE%3Dcxh-AC3e%2BZ9z57TEPMqbGO5CfohyVxuQSFyzJML0zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


unable to do migrate when defining custom user model

2018-11-26 Thread shiva kumar
i am defining my own custom user model using AbstractBaseUser class and
BaseUserManager class.
and i got no error when doing 'python manage.py makemigrations'
but it is showing that db  not created while running 'python manage.py
migrate' .

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


Re: Make a loop to get request.POST information

2018-11-26 Thread shiva kumar
Try this
Replace 'input_'.a with
'input_'+str(a)

I think it will work


On Mon 26 Nov, 2018 9:43 pm Thibaud MONTAGNON  Hi,
>
> I got 3 differents input named input_1, input_2, input_3 and I want to
> make a loop to put them in the ddb.
>
> I try to use this code but it dosent work...
>
> row=[1,2,3]
>
> for a in row:
> polls = Polls.objects.create(motsclef=request.POST[*'input_'.a*])
>
> Could you help me ?
>
> (I just want to simplify this :
>
> polls = Polls.objects.create(motsclef=request.POST[*'input_1'*])
> polls = Polls.objects.create(motsclef=request.POST[*'input_2'*])
> polls = Polls.objects.create(motsclef=request.POST[*'input_3'*])
> )
>
> --
> 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/f87e75b6-a8ec-4ff1-b0ea-3fc49529bbb5%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/CAMsYeuGtBZvmiFbUgOhnFSm0XjkJbxaFNPNLanbQ0wnjUQ9rRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


unable to create modelform object in views

2018-11-22 Thread shiva kumar
views file

from django.core.mail import send_mail
from django.http import HttpResponse
# Create your views here.
from django.shortcuts import render,redirect
from django.urls import include
import datetime
from .forms import loginform,modelform
def hidemelogin(request):
if request.method == 'POST':
form=loginform(request.POST)
if form.is_valid():
subject = form.cleaned_data['your_name']
message = form.cleaned_data['message']
sender = form.cleaned_data['sender']
cc_myself = form.cleaned_data['cc_myself']
recipients = ['rk3545...@gmail.com']
if cc_myself:
recipients.append(sender)
print(subject, message,sender, cc_myself,recipients)
print(type(form))
return redirect('/hideme/blog/')
else :
form=loginform()
form1=modelform()
return render(request,'login.html',{'form':form,'form1':form1})
def hidemehtml(request):
print("shiva")
return render(request,'index.html',{})


model file

from django.db import models
class BlogPost(models.Model):
id=models.AutoField(primary_key=True)
yourname=models.CharField(max_length=20)
content=models.TextField(null=True,blank=True)
ccself=models.BooleanField(default=True)
sender=models.EmailField(blank=False)
def __str__(self):
return self.yourname
# Create your models here.


form file

from django import forms
from .models import BlogPost
class loginform(forms.Form):
your_name=forms.CharField(label='enter your name', max_length=100)
message = forms.CharField(widget=forms.Textarea)
sender = forms.EmailField()
cc_myself = forms.BooleanField(required=False)

class modelform(forms.ModelForm):
class meta:
model = BlogPost
fields=[
"id","name","message","sender","carbon copy"
]

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


error at re_path

2018-09-23 Thread shiva kumar
getting error saying page not found when using re_path for defining our own
url pattern.

re_path(r'^home/(?p[0-9]{4})/$',views.home1),

this was how i used the function and it showing error at ?p.


is there any mistake suggest a solution.

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