Re: django print all record in the cmd but display the last one on template

2019-10-11 Thread Raja Sekar Sampath
Hi,

Convert the variable IPD into an array or render result variable on template

On Fri, 11 Oct 2019 at 12:04, leb dev  wrote:

> i have a function that retrieve data from sql server database where i am
> using **fetchall()** then  for loop
> the retrieved data are all printed on the **cmd console** but when i tried
> to display these result on the template it **only display the last record**.
>
> views.py
> 
> def search(request):
>
>   query = cursor.execute('Select id, fullname from person')
>   result = query.fetchall()
>   for row in result:
> print("ID==>",id)
> IPD=row[0]
>   return render(request,"test.html",{"IPD":IPD})
>
> test.html
> 
>
>   {{ IPD }}
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/68025e0a-81cf-4e62-bd15-14e2006e0157%40googlegroups.com
> 
> .
>


-- 
Thanks & Regards,

Raja Sekar Sampath
+91 9087434567.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAS5AE6gvtL%2Br5G6Oj2-FW9vUFY3C6PLA31MJ_mGewABNTJ0pg%40mail.gmail.com.


MDN Locallibrary project - syntax error on 'export DJANGO_DEBUG=False'

2019-10-11 Thread fishbite
Hi there,

I've been working on the MDN Locallibrary project and am just preparing to 
publish the website on Heroku.

I seem to be stumbling at the first hurdle though and hope someone can help.

The problem is a syntax error pointing to the following line of code in my 
settings.py file:

export DJANGO_DEBUG=False

the following lines precede this with no errors:

*import os*
*SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')*


*DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'*


could someone please tell me why this is happening and how to fix it. The 
lines have been copied and pasted from the tutorial into the file, so I'm 
pretty sure there isn't a typo.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d3b25700-4b4c-4c4f-b468-6f2d344e6951%40googlegroups.com.


syntax error: export DJANGO_DEBUG=False

2019-10-11 Thread fishbite
Hi there,

My first post to this group!

I've built the locallibrary project following the MDN tutorial and I'm now 
preparing to deploy the site on Heroku as described in the same tutorial 
and have added these lines to my settings.py file:

*import os*
*SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')*


export DJANGO_DEBUG=False

I get:
SyntaxError: invalid syntax

Has anyone else encountered this problem and / or know why it is occuring 
or how to resolve the issue?

Thanks in advance for any help you can provide.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/779d99cf-2445-4dcf-9c37-e1f7d9ab7bf0%40googlegroups.com.


How to modify data after receiving from request.data

2019-10-11 Thread laxmikanta nayak
Hi,

I am passing {message: 'here'} to a rest api then in rest api before saving 
to the db i want to modify it to {message:'here it it'}. at which step 
should i do the modification:
after reading from request.data using json dump and loads , or there is a 
way to modify the serializer.data ?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c69968e2-ebf3-4573-bc08-18306b327eaf%40googlegroups.com.


Re: How to modify data after receiving from request.data

2019-10-11 Thread gaurav jain
You can not modify the request.data object.
You can save it in a different variable and use that
Regards
Gaurav Jain
crazcu...@gmail.com/9971594094

On Fri, 11 Oct, 2019, 7:20 PM laxmikanta nayak, <
laxmikantanayak...@gmail.com> wrote:

> Hi,
>
> I am passing {message: 'here'} to a rest api then in rest api before
> saving to the db i want to modify it to {message:'here it it'}. at which
> step should i do the modification:
> after reading from request.data using json dump and loads , or there is a
> way to modify the serializer.data ?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c69968e2-ebf3-4573-bc08-18306b327eaf%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMiDnWCex%2B4YeeontZDVHor6sQ8qCjpa8b7WJEVf1H%3DKRqVEyw%40mail.gmail.com.


Re: CSS not working

2019-10-11 Thread yashwanth .k
Hello,
You must make a separate directory in static folder.
in the html file try using { load staticfiles } not {load static}

On Fri, Oct 11, 2019 at 11:59 AM yasar arafath Kajamydeen <
yasar...@gmail.com> wrote:

> *@ Jani - Executed the  given cmd, Please find the output and please guide
> me further ..*
>
>
> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3
> polls/style.css
> Found 'polls/style.css' here:
>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
> Looking in the following locations:
>   C:\Users\kajamydeenya\telusko\static
>   C:\Users\kajamydeenya\telusko\polls\static
>
> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>
>
>
>
> *Regards,*
> *Yasar Arafath K*
>
> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>
>> Hi.
>>
>> You could try to diagnose issue with findstatic management command:
>>
>> ./manage.py findstatic -v 3 polls/style.css
>>
>> You should get a list of paths Django tried to look for your static file
>> (stylesheet) and of course was it found.
>>
>>
>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen 
>> kirjoitti:
>>
>>> Hi All,
>>>
>>> I just added style sheet in my application but its not working , Please
>>> try to help me.
>>>
>>>
>>> Setting.py
>>>
>>>
>>>
>>> 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.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> 'polls.apps.PollsConfig',
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>>
>>>
>>> ]
>>>
>>> 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 = 'telusko.urls'
>>>
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> '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 = 'telusko.wsgi.application'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
>>> database file if using sqlite3.
>>> 'USER': '',  # Not used with sqlite3.
>>> 'PASSWORD': '',  # Not used with sqlite3.
>>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>>> sqlite3.
>>> 'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> # 
>>> https://docs.djangoproject.com/en/2.2/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.2/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.2/howto/static-files/
>>>
>>> STATIC_URL = '/static/'
>>> STATICFILES_DIRS = [
>>> os.path.join(BASE_DIR, 'style.css'),
>>> ]
>>>
>>>
>>>
>>>
>>>
>>> *style.css*
>>>
>>>
>>>
>>>

Re: Anyone used RENDER product for hosting?

2019-10-11 Thread Mario R. Osorio
I like Digital Ocean

On Tuesday, October 8, 2019 at 5:33:27 AM UTC-4, ram.mullapudi wrote:
>
>
> Hello,
>
> I'm looking for cheaper, secure and reliable way to host my website? The 
> site is being developed on DJango FWK.  We are currently on GCP and also 
> reviewed other popular vendors too. I recently came to know about Render 
> platform and am wondering if anyone tried it?
>
> Regards,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e9172f49-128d-4964-b526-0736a7a88fd5%40googlegroups.com.


filter.update

2019-10-11 Thread Luca Bertolotti
sorry but i have a big problem

I have this

mylist = ['a','b','c']

than Mydbtable.filter(column = value),update(mylist[0]=value)

why update never accept mylist[0] there is a solution?

regards

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8d398764-0a17-47f4-a06a-325f1527fc36%40googlegroups.com.


Re: filter search from 2 models

2019-10-11 Thread lemme smash
just create custom view and add those two querysets to context. if you want 
to do search by one input in both querysets, you'll need to create custom 
filter as well, or just filter it in a view by query from input

On Thursday, October 10, 2019 at 1:48:52 AM UTC+3, sotiris moustogiannis 
wrote:
>
> I want to do dynamic filter search from 2 different models 
>
> i have 2 models
>
> [image: md1.png]
>
> [image: md2.png]
>
>
>
> i have this filters.py file to find shops and dates
>
>
> [image: fi.png]
>
>
> and this shop listview
>
> [image: li.png]
>
>
>
> i can only show the results of shopfilter and i want to do a combination 
> of shops and appointments model
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8f0ed77-2076-4995-bf7e-838557b01bf4%40googlegroups.com.


Re: filter search from 2 models

2019-10-11 Thread sotiris moustogiannis
thanks a lot. you helped me

On Friday, October 11, 2019 at 7:14:45 PM UTC+3, lemme smash wrote:
>
> just create custom view and add those two querysets to context. if you 
> want to do search by one input in both querysets, you'll need to create 
> custom filter as well, or just filter it in a view by query from input
>
> On Thursday, October 10, 2019 at 1:48:52 AM UTC+3, sotiris moustogiannis 
> wrote:
>>
>> I want to do dynamic filter search from 2 different models 
>>
>> i have 2 models
>>
>> [image: md1.png]
>>
>> [image: md2.png]
>>
>>
>>
>> i have this filters.py file to find shops and dates
>>
>>
>> [image: fi.png]
>>
>>
>> and this shop listview
>>
>> [image: li.png]
>>
>>
>>
>> i can only show the results of shopfilter and i want to do a combination 
>> of shops and appointments model
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f386d232-a23a-487e-b6b3-545e5b571ee8%40googlegroups.com.


migrate error in manage.py

2019-10-11 Thread Ralph Barhydt
When I try to run "python manage.py migrate" I get an error "invalid 
syntax" that points to ")  from exc". How can I fix this?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6843a8cb-be93-4fef-a6f2-f49d6f7a1c98%40googlegroups.com.


Micro Service Architecture

2019-10-11 Thread Uzama Zaid Mohammed Jaward
Hi all

What are the tech stack is good for micro service architecture in Django

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOHA2_2tFnyeEsKZXx2BrCTp_WitdSuLkzNVZ4%3DaJ1g3L4iYOg%40mail.gmail.com.


Re: migrate error in manage.py

2019-10-11 Thread Suraj Thapa FC
Use python3

On Fri, 11 Oct, 2019, 11:01 PM Ralph Barhydt,  wrote:

> When I try to run "python manage.py migrate" I get an error "invalid
> syntax" that points to ")  from exc". How can I fix this?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6843a8cb-be93-4fef-a6f2-f49d6f7a1c98%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcH3G-JDp1g5ivCrC%3D8PXc78DVZzYfrO4KoLGWZbtyCYNw%40mail.gmail.com.


Re: filter.update

2019-10-11 Thread Adam Mičuda
Hi,
it is not working, because it is not valid python. Use 
Mydbtable.filter(column = value).update(**{mylist[0]: value}) instead. And 
keep in mind that value of mylist[0] (any dict key in general) must meet 
the some criteria to be valid dict key. See 
https://wiki.python.org/moin/DictionaryKeys for more information.

Regards
Adam

Dne pátek 11. října 2019 18:05:09 UTC+2 Luca Bertolotti napsal(a):
>
> sorry but i have a big problem
>
> I have this
>
> mylist = ['a','b','c']
>
> than Mydbtable.filter(column = value),update(mylist[0]=value)
>
> why update never accept mylist[0] there is a solution?
>
> regards
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/234f7473-96cd-41c2-94c3-6a79339efc1d%40googlegroups.com.


Save partial state of a page when reloading

2019-10-11 Thread Robert Levasseur
Hi, 

I'm very new to Django so this might be a silly question, but I'm having an 
issue with the filter functionality on my site's search page. I am using 
the django-haystack module to interface with the Whoosh search engine, and 
it functions by reloading the page while sending the query as a GET 
parameter. This means when someone runs the search, say for soccer, on the 
site it loads the page with a url /search/?q=soccer 
On the same page I have a from with a bunch of category check-boxes that I 
would like to use to filter the search results. I run into the problem 
however that if I submit the form and reload the page it does not remember 
the search text, and If I run the search and reload the page it does not 
remember which categories were selected.

Is there a way in Django for me to pull both of these pieces of information 
and mess around with them in views.py, while maintaining the state of the 
category form and search box? Sorry if this is a strange question, and 
thanks for any help!

Regards,
R. Eli

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a25b09a0-be13-4f18-8752-ea1bb6b9f1a0%40googlegroups.com.


Software Engineer position at Palo Alto Startup

2019-10-11 Thread Scott Satkin
*Are you an experienced Django developer interested in a full-time 
opportunity to join an established healthcare startup in Palo Alto 
California?*

If so, please email sc...@limbix.com, or apply online: 
https://angel.co/company/limbix/jobs/624447-senior-software-engineer

--

*SUMMARY*
Limbix is creating prescription digital therapeutics (PDTs) to increase 
efficacy and access to mental health treatment. PDTs will leverage mobile 
apps and VR to engage users in evidence-based treatments. PDTs can be 
prescribed to patients as an alternative to pharmaceutical or traditional 
therapy options.

*RESPONSIBILITIES*
We’re looking for an experienced full-stack engineer to help create a 
robust and cutting-edge platform for prescription digital therapeutics.

A partial list of responsibilities includes:

   - Architecting stable full-stack systems
   - Understanding and implementing security and data protection policies
   - Collaborate with the rest of the engineering and product team to 
   design and launch new features
   - Maintain quality and ensure responsiveness of applications
   - Maintain code integrity and organization


*QUALIFICATIONS & SKILLS*

   - 5+ years of full-stack engineering
   - Worked on a real (non-remote) team
   - Experience with:
  - Python, Django
  - Docker
  - GraphQL
   - Experience in a healthcare company (nice-to-have):
  - Quality Management Systems
  - HIPAA compliant workflows
   
*ABOUT LIMBIX*
Limbix is a small, well-funded team, located in Palo Alto that builds 
Mobile and Virtual Reality apps to improve mental health treatment by 
making it more effective, efficient, and easier to access. The team is led 
by veteran entrepreneurs and experts in creating amazingly high quality 
virtual reality content, and engaging mobile applications. The company 
sells the Limbix VR Kit to mental health clinics and hospitals to help 
clinicians and patients. The company quickly established itself as leaders 
in the VR Mental Health space by partnering with top university and 
hospital partners to build content for the Limbix VR platform. More 
recently, Limbix has embarked on a path towards FDA approval of its mobile 
application for Adolescent Depression. Sequoia led Limbix’s seed round in 
November 2016.


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7802321c-d5f1-46c7-84de-e1aff1bff50e%40googlegroups.com.


Re: MDN Locallibrary project - syntax error on 'export DJANGO_DEBUG=False'

2019-10-11 Thread John Martin
Try retyping the lines from scratch. You may have picked up a unicode 
version of single quote, or similar substitution, through copy/pasting.


John

On 11/10/2019 14:12, fishbite wrote:

Hi there,

I've been working on the MDN Locallibrary project and am just 
preparing to publish the website on Heroku.


I seem to be stumbling at the first hurdle though and hope someone can 
help.


The problem is a syntax error pointing to the following line of code 
in my settings.py file:


|
exportDJANGO_DEBUG=False
|

the following lines precede this with no errors:

|
*importos**SECRET_KEY 
=os.environ.get('DJANGO_SECRET_KEY','cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')*

|

|
*DEBUG =os.environ.get('DJANGO_DEBUG','')!='False'*
|

could someone please tell me why this is happening and how to fix it. 
The lines have been copied and pasted from the tutorial into the file, 
so I'm pretty sure there isn't a typo.


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d3b25700-4b4c-4c4f-b468-6f2d344e6951%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/59a52265-3e2f-2c3c-d587-67f2481a4660%40martinhome.org.uk.


Re: MDN Locallibrary project - syntax error on 'export DJANGO_DEBUG=False'

2019-10-11 Thread Daniel Hepper
The export statement does not belong in your settings file, you are supposed to 
type it into your shell, like you do with “python manage.py ...” commands

> Am 11.10.2019 um 15:51 schrieb fishbite :
> 
> 
> Hi there,
> 
> I've been working on the MDN Locallibrary project and am just preparing to 
> publish the website on Heroku.
> 
> I seem to be stumbling at the first hurdle though and hope someone can help.
> 
> The problem is a syntax error pointing to the following line of code in my 
> settings.py file:
> 
> export DJANGO_DEBUG=False
> 
> the following lines precede this with no errors:
> 
> import os
> SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
> 'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')
> 
> DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'
> 
> could someone please tell me why this is happening and how to fix it. The 
> lines have been copied and pasted from the tutorial into the file, so I'm 
> pretty sure there isn't a typo.
> 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/d3b25700-4b4c-4c4f-b468-6f2d344e6951%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B413ED09-95E4-4C72-B031-69DE9841E33D%40gmail.com.


Re: Software Engineer position at Palo Alto Startup

2019-10-11 Thread Chuck Yu
Thank you for your email. And sorry that I am looking for the job around
Los Angeles, CA where close to I live.

Thank you,
Chuck

On Fri, Oct 11, 2019 at 2:06 PM Scott Satkin  wrote:

> *Are you an experienced Django developer interested in a full-time
> opportunity to join an established healthcare startup in Palo Alto
> California?*
>
> If so, please email sc...@limbix.com, or apply online:
> https://angel.co/company/limbix/jobs/624447-senior-software-engineer
>
> --
>
> *SUMMARY*
> Limbix is creating prescription digital therapeutics (PDTs) to increase
> efficacy and access to mental health treatment. PDTs will leverage mobile
> apps and VR to engage users in evidence-based treatments. PDTs can be
> prescribed to patients as an alternative to pharmaceutical or traditional
> therapy options.
>
> *RESPONSIBILITIES*
> We’re looking for an experienced full-stack engineer to help create a
> robust and cutting-edge platform for prescription digital therapeutics.
>
> A partial list of responsibilities includes:
>
>- Architecting stable full-stack systems
>- Understanding and implementing security and data protection policies
>- Collaborate with the rest of the engineering and product team to
>design and launch new features
>- Maintain quality and ensure responsiveness of applications
>- Maintain code integrity and organization
>
>
> *QUALIFICATIONS & SKILLS*
>
>- 5+ years of full-stack engineering
>- Worked on a real (non-remote) team
>- Experience with:
>   - Python, Django
>   - Docker
>   - GraphQL
>- Experience in a healthcare company (nice-to-have):
>   - Quality Management Systems
>   - HIPAA compliant workflows
>
> *ABOUT LIMBIX*
> Limbix is a small, well-funded team, located in Palo Alto that builds
> Mobile and Virtual Reality apps to improve mental health treatment by
> making it more effective, efficient, and easier to access. The team is led
> by veteran entrepreneurs and experts in creating amazingly high quality
> virtual reality content, and engaging mobile applications. The company
> sells the Limbix VR Kit to mental health clinics and hospitals to help
> clinicians and patients. The company quickly established itself as leaders
> in the VR Mental Health space by partnering with top university and
> hospital partners to build content for the Limbix VR platform. More
> recently, Limbix has embarked on a path towards FDA approval of its mobile
> application for Adolescent Depression. Sequoia led Limbix’s seed round in
> November 2016.
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7802321c-d5f1-46c7-84de-e1aff1bff50e%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGu6uQQZypNuuOa2AmvO6BioZapqXbxDzfaF%3Dxc2t2huum-xaQ%40mail.gmail.com.


Re: CSS not working

2019-10-11 Thread Jani Tiainen
Hi.

As you see Django indeed found your static file.

Next step is to open up developer tools in browser and load your page. You
should be able to use it to determine was file even loaded and was your
style applied to link

Note that if I'm not mistaken plain color only affects unvisited links and
visited link may stay different colored and thus seemingly you see that it
wasn't doing "nothing".


pe 11. lokak. 2019 klo 9.30 yasar arafath Kajamydeen 
kirjoitti:

> *@ Jani - Executed the  given cmd, Please find the output and please guide
> me further ..*
>
>
> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3
> polls/style.css
> Found 'polls/style.css' here:
>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
> Looking in the following locations:
>   C:\Users\kajamydeenya\telusko\static
>   C:\Users\kajamydeenya\telusko\polls\static
>
> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>
>
>
>
> *Regards,*
> *Yasar Arafath K*
>
> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>
>> Hi.
>>
>> You could try to diagnose issue with findstatic management command:
>>
>> ./manage.py findstatic -v 3 polls/style.css
>>
>> You should get a list of paths Django tried to look for your static file
>> (stylesheet) and of course was it found.
>>
>>
>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen 
>> kirjoitti:
>>
>>> Hi All,
>>>
>>> I just added style sheet in my application but its not working , Please
>>> try to help me.
>>>
>>>
>>> Setting.py
>>>
>>>
>>>
>>> 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.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> 'polls.apps.PollsConfig',
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>>
>>>
>>> ]
>>>
>>> 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 = 'telusko.urls'
>>>
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> '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 = 'telusko.wsgi.application'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
>>> database file if using sqlite3.
>>> 'USER': '',  # Not used with sqlite3.
>>> 'PASSWORD': '',  # Not used with sqlite3.
>>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>>> sqlite3.
>>> 'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> # 
>>> https://docs.djangoproject.com/en/2.2/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.2/topics/i18n/
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> # Static fil

Re: Save partial state of a page when reloading

2019-10-11 Thread wd
hi,

I think It's not a django problem, it's a classic web developing problem.

Http is stateless, if you want to 'save' something, you need to use
1. URL param like the 'q=soccer'.
2. Use cookie/session.

I think your problem can be solved by one of the methods below:
1. Use ajax to do the search, and use javascript to update the search
result, so the page will not be reload when doing search.
2. Put the search box and category check-boxes in one form, when the user
submit to search, the browser will also submit the categories check boxes,
so you know what the user selected, you can select them again in the
response html.
3. Use javascript to remember what category the user selected, and render
the selection when the page reloaded.

On Sat, Oct 12, 2019 at 5:07 AM Robert Levasseur  wrote:

> Hi,
>
> I'm very new to Django so this might be a silly question, but I'm having
> an issue with the filter functionality on my site's search page. I am using
> the django-haystack module to interface with the Whoosh search engine, and
> it functions by reloading the page while sending the query as a GET
> parameter. This means when someone runs the search, say for soccer, on the
> site it loads the page with a url /search/?q=soccer
> On the same page I have a from with a bunch of category check-boxes that I
> would like to use to filter the search results. I run into the problem
> however that if I submit the form and reload the page it does not remember
> the search text, and If I run the search and reload the page it does not
> remember which categories were selected.
>
> Is there a way in Django for me to pull both of these pieces of
> information and mess around with them in views.py, while maintaining the
> state of the category form and search box? Sorry if this is a strange
> question, and thanks for any help!
>
> Regards,
> R. Eli
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a25b09a0-be13-4f18-8752-ea1bb6b9f1a0%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmhcqSGOs6NgkEzZAS7uL4URZRqV6X-sjqPQDBK9cH7nqQ%40mail.gmail.com.


Re: syntax error: export DJANGO_DEBUG=False

2019-10-11 Thread wd
hi,

export DJANGO_DEBUG=False
This is a shell command, you shouldn't add this to your settings.py.

On Fri, Oct 11, 2019 at 9:51 PM fishbite  wrote:

> Hi there,
>
> My first post to this group!
>
> I've built the locallibrary project following the MDN tutorial and I'm now
> preparing to deploy the site on Heroku as described in the same tutorial
> and have added these lines to my settings.py file:
>
> *import os*
> *SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
> 'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')*
>
>
> export DJANGO_DEBUG=False
>
> I get:
> SyntaxError: invalid syntax
>
> Has anyone else encountered this problem and / or know why it is occuring
> or how to resolve the issue?
>
> Thanks in advance for any help you can provide.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/779d99cf-2445-4dcf-9c37-e1f7d9ab7bf0%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmi1SwbnXRGrYAm6OCxH3XO-%2B8mMj-pf2%3DUEjtDYpzgtcQ%40mail.gmail.com.


Re: CSS not working

2019-10-11 Thread yasar arafath Kajamydeen
* Hi **yashwanth**  - The Suggested one tried already in earlier, But its 
not working .*



On Friday, October 11, 2019 at 10:28:55 PM UTC+8, yashwanth .k wrote:
>
> Hello,
> You must make a separate directory in static folder.
> in the html file try using { load staticfiles } not {load static}
>
> On Fri, Oct 11, 2019 at 11:59 AM yasar arafath Kajamydeen <
> yasa...@gmail.com > wrote:
>
>> *@ Jani - Executed the  given cmd, Please find the output and please 
>> guide me further ..*
>>
>>
>> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3 
>> polls/style.css
>> Found 'polls/style.css' here:
>>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
>> Looking in the following locations:
>>   C:\Users\kajamydeenya\telusko\static
>>   C:\Users\kajamydeenya\telusko\polls\static
>>   
>> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>>
>>
>>
>>
>> *Regards,*
>> *Yasar Arafath K*
>>
>> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>>
>>> Hi.
>>>
>>> You could try to diagnose issue with findstatic management command:
>>>
>>> ./manage.py findstatic -v 3 polls/style.css
>>>
>>> You should get a list of paths Django tried to look for your static file 
>>> (stylesheet) and of course was it found.
>>>
>>>
>>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen  
>>> kirjoitti:
>>>
 Hi All,

 I just added style sheet in my application but its not working , Please 
 try to help me.


 Setting.py



 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.2/howto/deployment/checklist/

 # SECURITY WARNING: keep the secret key used in production secret!
 SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'

 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True

 ALLOWED_HOSTS = []


 # Application definition

 INSTALLED_APPS = [
 'polls.apps.PollsConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',


 ]

 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 = 'telusko.urls'


 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [os.path.join(BASE_DIR,'templates')],
 '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 = 'telusko.wsgi.application'


 # Database
 # https://docs.djangoproject.com/en/2.2/ref/settings/#databases

 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
 database file if using sqlite3.
 'USER': '',  # Not used with sqlite3.
 'PASSWORD': '',  # Not used with sqlite3.
 'HOST': '',  # Set to empty string for localhost. Not used with 
 sqlite3.
 'PORT': '',
 }
 }


 # Password validation
 # 
 https://docs.djangoproject.com/en/2.2/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.2/topics/i18n/

 LANGUAGE_CODE = 'en-us'

 TIME_ZONE = 'UTC'