Re: Python/Django, "The 'poster' attribute has no file associated with it"

2020-08-28 Thread RANGA BHARATH JINKA
Hi,
Add a default image in models.

On Thu, Aug 27, 2020 at 8:34 PM Tony Hall  wrote:

> I'm relatively new to programming and I'm having some trouble with the
> ImageField in my models.py.
>
> I keep getting the error in the attachment every time I load the
> local:8000.
>
> My models.py is:
>
> from django.db import models
>
> class Pilot(models.Model):
> title = models.CharField(max_length=200)
> description = models.TextField()
> count = models.IntegerField()
> writer = models.CharField(max_length=200)
> year = models.IntegerField()
> script = models.FileField(blank=True, null=True, upload_to="scripts")
> poster = models.ImageField(blank=True, null=True, upload_to="posters")
> created_at = models.DateTimeField(auto_now_add=True)
> updated_at = models.DateTimeField(auto_now=True)
>
> def __str__(self):
> return self.title
>
> @property
> def imageURL(self):
> try:
> url = self.poster.url
> except:
> url = ''
> print('URL:', url)
> return url
>
> The settings.py :
> STATIC_URL = '/static/'
>
> MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
> MEDIA_URL = '/media/'
>
> STATICFILES_DIR = [
> os.path.join(BASE_DIR, 'static')
> ]
>
> The urls.py:
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('script_app.urls')),
> ]
>
> if settings.DEBUG:
> urlpatterns += static(settings.STATIC_URL,
> document_root=settings.STATIC_ROOT)
> urlpatterns += static(settings.MEDIA_URL,
> document_root=settings.MEDIA_ROOT)
>
>
> How do 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/2aae39fa-8fe5-4f83-b139-60918022ae61n%40googlegroups.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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/CAK5m316V_u%3D6qrOMVnQgMU1aSGr7F7RMp47wgvMPjL2FLUxmew%40mail.gmail.com.


Re: plz help i found this kinda problem when i run

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

Create a templates folder in your base directory where manage.py
exists. Change the templates folder path in settings.py as 'DIRS':
[os.path.join(BASE_DIR,'templates')]

All the best


On Thu, Aug 27, 2020 at 10:04 PM Ogunsanya Opeyemi <
ogunsanyaopeye...@gmail.com> wrote:

> This means that your current_datetime.html template does not exists in any
> of those directory in the defined directory under templates in your
> setting.py file.
>
>
>
> On Thu, Aug 27, 2020 at 4:01 PM ALAKO ABIYO  wrote:
>
>>
>> Environment:
>>
>>
>> Request Method: GET
>> Request URL: http://127.0.0.1:8000/time/
>>
>> Django Version: 1.8
>> Python Version: 2.7.17
>> Installed Applications:
>> ('django.contrib.admin',
>>  'django.contrib.auth',
>>  'django.contrib.contenttypes',
>>  'django.contrib.sessions',
>>  'django.contrib.messages',
>>  'django.contrib.staticfiles')
>> Installed Middleware:
>> ('django.contrib.sessions.middleware.SessionMiddleware',
>>  'django.middleware.common.CommonMiddleware',
>>  'django.middleware.csrf.CsrfViewMiddleware',
>>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>>  'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
>>  'django.contrib.messages.middleware.MessageMiddleware',
>>  'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>  'django.middleware.security.SecurityMiddleware')
>>
>> Template Loader Error:
>> Django tried loading these templates, in this order:
>> Using loader django.template.loaders.filesystem.Loader:
>> /home/django/mysite/templates/current_datetime.html (File does not exist)
>> /home/html/example.com/current_datetime.html (File does not exist)
>> Using loader django.template.loaders.app_directories.Loader:
>> /home/aa/.local/lib/python2.7/site-packages/django/contrib/admin/templates/current_datetime.html
>> (File does not exist)
>> /home/aa/.local/lib/python2.7/site-packages/django/contrib/auth/templates/current_datetime.html
>> (File does not exist)
>>
>>
>>
>> Traceback:
>> File
>> "/home/aa/.local/lib/python2.7/site-packages/django/core/handlers/base.py"
>> in get_response
>>   132. response = wrapped_callback(request,
>> *callback_args, **callback_kwargs)
>> File "/home/aa/mysite/mysite/views.py" in current_datetime
>>   12. t=get_template('current_datetime.html')
>> File
>> "/home/aa/.local/lib/python2.7/site-packages/django/template/loader.py" in
>> get_template
>>   46. raise TemplateDoesNotExist(template_name)
>>
>> Exception Type: TemplateDoesNotExist at /time/
>> Exception Value: current_datetime.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/898d34f9-b67c-40aa-9dc9-32fab2e5f50cn%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/CABJxPrFbRGNKBYog9HCL2AdNKe5DVtN0WZ1y5x0jrhM3O%3DixMg%40mail.gmail.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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/CAK5m315b6U-Q-sVs7EH_v3U63zayO%3DczWDMs_TXWYrRd-ihVUw%40mail.gmail.com.


Re: Is it allowed to post a job vacancy here regarding django ?

2020-08-28 Thread 'BOPBO' via Django users
We're hiring Full stack and Python Developers (django)
If anyone interested please submit application here: 
https://careers.bopbo.com/apply/remotely

Wish you all the best.


On Friday, August 28, 2020 at 6:49:07 AM UTC Ogunsanya Opeyemi wrote:

> Yes i think you can
>
> On Thursday, August 27, 2020, 'BOPBO' via Django users <
> django...@googlegroups.com> wrote:
>
>> Hello There,
>>
>> Is it allowed to post a job vacancy here regarding django ?
>>
>> Thank you.
>>
>> --
>> This message (including attachments) is confidential and may be 
>> privileged, subject to copyright, trade secret, or other legal rules and 
>> may not be forwarded without the author's permission. If you are not the 
>> intended 
>> recipient, or received it in error you must not read, copy, store or 
>> disseminate this message, and please delete the message from all storage 
>> devices and notify the sender immediately.
>>
>> -- 
>> 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/a3b0c224-48f6-4d4d-b091-a24dd1e42cbdo%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>
-- 
--
This message (including attachments) is confidential and may be 
privileged, subject to copyright, trade secret, or other legal rules and 
may not be forwarded without the author's permission. If you are not the 
intended recipient, or received it in error you must not read, copy, store 
or disseminate this message, and please delete the message from all storage 
devices and notify the sender immediately.


-- 
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/6dcf8ba2-2611-4097-98b3-9571f55de10en%40googlegroups.com.


HTML Snippets instead of JSON-API

2020-08-28 Thread guettli
If you read the current articles about software development,
you get the impression that you must create
a backend API returning JSON (maybe via Django RestFramework)
and then create a GUI with React/Vue/Angular

I am a backend geek. I like Python, Django, Linux, SQL, and try to avoid 
JavaScript.

Nevertheless I want to develop a modern GUI.

By chance I found a nice library:

https://htmx.org/

This does exactly what I was looking for.

It helps you to update parts of your html page.
This way the server sends HTML to the client and htmx
inserts the snippets into the page.

At the moment I think I found the perfect library.

But maybe I am wrong.

Which alternatives exist, if you want to avoid JS
and render HTML and HTML forms with Django?

Regards,
  Thomas Güttler





-- 
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/f737d8cb-6d11-4722-8351-459b903297bbn%40googlegroups.com.


Re: Many to many field does not save in the main object

2020-08-28 Thread Annick Sakoua
 I found the mistake, I removed the 'for item in instance'  in my 
addcustomer function and Elesire suggestion about iterating in the 
{{customer.gp}} object  in my template helped me a lof. Thank you soo much.

Le mardi 25 août 2020 à 14:57:48 UTC+1, Annick Sakoua a écrit :

> Hi all,
> Please Help.
> I have been on this problem for 2 weeks now :(
> I have an object: customer  that has 1 manytomany relationship with 
> another object: gp.
> I created some gp instances in the admin page. When I select one gp in the 
> select dropdown list of existing gp  in my addcustomer form and submit my 
> form, the form is saved with all the information except the gp selected. I 
> only get the this: app.GeneralPractitioner.None  
> Here are bellow my different classes. 
>
> Thank you for your help :)
>
> *model.py*
>
> class Customer(models.Model):
> first_name = models.CharField(max_length=100)
> last_name = models.CharField(max_length=100)
> gp = models.ManyToManyField(GeneralPractitioner, help_text="Select your 
> general practitioner", related_name="customer")
>
>
> class GeneralPractitioner(models.Model):
> name = models.CharField(
> max_length=40,
> help_text="Enter the gp name)"
> )
> contact= models.CharField(max_length=11)
>
> def __str__(self):
> return self.name
>
> *in view.py*
>
> @login_required
> def add_customer(request):
> if request.method == 'POST':
>
> form = AddCustomerForm(request.POST)
> if form.is_valid():
> instance = form.save(commit=False)
> for item in instance:
> item.save()
> form.save_m2m()
> instance.author = request.user
>
> messages.success(request, f'Your form has been created!')
> return redirect('addcustomer')
> else:
> form = AddCustomerForm()
> return render(request, 'app/addcustomer.html', {'form': form})
>
> *customer_details.html*
>
> {% extends "app/base.html" %}
> {% load crispy_forms_tags %}
> {% block content %}
>
> 
> Firstname: {{customer.first_name}}
> Lastname: {{customer.last_name}}
> General practitioner: {{customer.gp}}
> 
>

-- 
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/6426a74f-6096-473e-87bf-3a1c4914392en%40googlegroups.com.


RE: HTML Snippets instead of JSON-API

2020-08-28 Thread Vishesh Mangla
You can use Django and react with the help of webpack. Sent from Mail for Windows 10 From: guettliSent: 28 August 2020 14:02To: Django usersSubject: HTML Snippets instead of JSON-API If you read the current articles about software development,you get the impression that you must createa backend API returning JSON (maybe via Django RestFramework)and then create a GUI with React/Vue/Angular I am a backend geek. I like Python, Django, Linux, SQL, and try to avoid _javascript_. Nevertheless I want to develop a modern GUI. By chance I found a nice library: https://htmx.org/ This does exactly what I was looking for. It helps you to update parts of your html page.This way the server sends HTML to the client and htmxinserts the snippets into the page. At the moment I think I found the perfect library. But maybe I am wrong. Which alternatives exist, if you want to avoid JSand render HTML and HTML forms with Django? Regards,  Thomas Güttler -- 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/f737d8cb-6d11-4722-8351-459b903297bbn%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/A08741FF-3F06-475C-8AAE-EAC6698260B2%40hxcore.ol.


material

2020-08-28 Thread السعيد حاجي سعيد
Hello and good morning, I want to start learning dejango. Is there a 
material in writing to study 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5b128545-69b3-4305-8aaf-03ec393c41b8n%40googlegroups.com.


creating a website with django

2020-08-28 Thread Kamini Shukla
i want to create a website with the help of django. pls some one help of 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2fd61f31-8604-422a-b091-e46cd9bc25d0n%40googlegroups.com.


Data Science Guide

2020-08-28 Thread Emmanuel Oppong Ntiamoah
Hello friends i have learnt Python for a while now and i want to start with 
data science. Please can you guide me as to the path, resources and tools to 
used and advice. 

-- 
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/E02ED175-CF51-4D50-A66C-64CED59734E8%40gmail.com.


Re: material

2020-08-28 Thread sakshi jain
youtube vedios online

On Fri, Aug 28, 2020, 19:23 السعيد حاجي سعيد 
wrote:

> Hello and good morning, I want to start learning dejango. Is there a
> material in writing to study 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b128545-69b3-4305-8aaf-03ec393c41b8n%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/CAJhs3iOZjZVa8-xz3SwdbtJohFKxqVPp93EO_Jrzs97%3DC7_ruA%40mail.gmail.com.


Re: creating a website with django

2020-08-28 Thread sakshi jain
plz help me also

On Fri, Aug 28, 2020, 19:23 Kamini Shukla  wrote:

> i want to create a website with the help of django. pls some one help of
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2fd61f31-8604-422a-b091-e46cd9bc25d0n%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/CAJhs3iP_YK4gCu48FkbDwSHx6bciQ%2BzZCS_N4RvWFQ71X%2BFEYA%40mail.gmail.com.


Modeling a large dictionary with synonyms and searchable values

2020-08-28 Thread Braiam
How to not use foreign key method for large dictionaries since key values
can't fulfill the unique constrain?

For smaller, static dictionaries I use choices field option, but this 
dictionary,
while I don't expect many changes, is large and have several values for a 
single
key. Users aren't supposed to know the key value for the dictionary (which 
is
defined outside of my model), so allowing them to search the description of
said key is helpful. The problem is that the same key, can have several 
values
(synonyms) which makes the foreign key method non-ideal. I could think
some ways to circumvent the unique constrain, like have a single table with
all key and another with key:values relationship, but most of them sounds 
too
complicated and makes more problems down the line, with the other 
requirements.

What I was thinking was using elasticsearch as a truth source and having a 
function
to return the unique key elements as a dict, but I'm unsure how to do that 
or if there
is a saner approach.

-- 
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/366297ad-46d5-45cd-b78e-d054f2103eafn%40googlegroups.com.


RE: material

2020-08-28 Thread Vishesh Mangla
https://www.youtube.com/watch?v=UmljXZIypDc Sent from Mail for Windows 10 From: sakshi jainSent: 28 August 2020 21:04To: django-users@googlegroups.comSubject: Re: material youtube vedios online On Fri, Aug 28, 2020, 19:23 السعيد حاجي سعيد  wrote:Hello and good morning, I want to start learning dejango. Is there a material in writing to study 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5b128545-69b3-4305-8aaf-03ec393c41b8n%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/CAJhs3iOZjZVa8-xz3SwdbtJohFKxqVPp93EO_Jrzs97%3DC7_ruA%40mail.gmail.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/8874679F-532D-4A23-9124-AB0E8CA93DE9%40hxcore.ol.


RE: Data Science Guide

2020-08-28 Thread Vishesh Mangla
https://www.youtube.com/watch?v=yzIMircGU5I&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y Sent from Mail for Windows 10 From: Emmanuel Oppong NtiamoahSent: 28 August 2020 21:05To: django-users@googlegroups.comSubject: Data Science Guide Hello friends i have learnt Python for a while now and i want to start with data science. Please can you guide me as to the path, resources and tools to used and advice.  -- 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/E02ED175-CF51-4D50-A66C-64CED59734E8%40gmail.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/1E1CEFF1-6DF6-406D-B871-EF7FDAB99152%40hxcore.ol.


Re: material

2020-08-28 Thread Balaji Shetty
Dear Participants

   🌷*I am sharing you a video to learn Python Django with development
of project and app. You can download source code of this video also from
github link*

https://www.youtube.com/watch?v=EY-XY2HDo_c

🌷 *Sourcecode*
https://github.com/balaji-shetty/Django-Sample-Proj-With-CODE-For-Begineers


Code to download source code is given in Video Description

Join Django Learner group

https://chat.whatsapp.com/K2WZmkIXSrf70WPePtPr7t



Prof Shetty Balaji
IT dept
SGGS IET Nanded. MH

https://youtu.be/EY-XY2HDo_c


On Friday, August 28, 2020, Vishesh Mangla 
wrote:

> https://www.youtube.com/watch?v=UmljXZIypDc
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
> *From: *sakshi jain 
> *Sent: *28 August 2020 21:04
> *To: *django-users@googlegroups.com
> *Subject: *Re: material
>
>
>
> youtube vedios online
>
>
>
> On Fri, Aug 28, 2020, 19:23 السعيد حاجي سعيد 
> wrote:
>
> Hello and good morning, I want to start learning dejango. Is there a
> material in writing to study 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 view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/5b128545-69b3-4305-8aaf-03ec393c41b8n%
> 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/CAJhs3iOZjZVa8-xz3SwdbtJohFKxqVPp93EO_Jrzs97%
> 3DC7_ruA%40mail.gmail.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/8874679F-532D-4A23-9124-AB0E8CA93DE9%40hxcore.ol
> 
> .
>


-- 
Mr Shetty Balaji
Asst. Prof.
IT Department
SGGS I&T
Nanded. My. India

-- 
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/CAECSbOvUznVgTWOriugNexBoKAxKQEpGbxr-6A9h51NffHokOw%40mail.gmail.com.


Re: creating a website with django

2020-08-28 Thread Chetan Ganji
https://www.youtube.com/watch?v=KsLHt3D_jsE&list=PLEsfXFp6DpzRcd-q4vR5qAgOZUuz8041S

On Fri, Aug 28, 2020, 9:04 PM sakshi jain  wrote:

> plz help me also
>
> On Fri, Aug 28, 2020, 19:23 Kamini Shukla 
> wrote:
>
>> i want to create a website with the help of django. pls some one help of
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/2fd61f31-8604-422a-b091-e46cd9bc25d0n%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/CAJhs3iP_YK4gCu48FkbDwSHx6bciQ%2BzZCS_N4RvWFQ71X%2BFEYA%40mail.gmail.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/CAMKMUjunwDgz1Jbzqv82UstTmCeyjVRmF5sP3x7ziv6cdTd6bw%40mail.gmail.com.


Re: Is it allowed to post a job vacancy here regarding django ?

2020-08-28 Thread Dylan Reinhold
I have to login with a google account and start a form before I can even
see what the job is about? That seems like a terrible way of
attracting people.

Dylan

On Fri, Aug 28, 2020 at 12:53 AM 'BOPBO' via Django users <
django-users@googlegroups.com> wrote:

> We're hiring Full stack and Python Developers (django)
> If anyone interested please submit application here:
> https://careers.bopbo.com/apply/remotely
>
> Wish you all the best.
>
>
> On Friday, August 28, 2020 at 6:49:07 AM UTC Ogunsanya Opeyemi wrote:
>
>> Yes i think you can
>>
>> On Thursday, August 27, 2020, 'BOPBO' via Django users <
>> django...@googlegroups.com> wrote:
>>
>>> Hello There,
>>>
>>> Is it allowed to post a job vacancy here regarding django ?
>>>
>>> Thank you.
>>>
>>> --
>>> This message (including attachments) is confidential and may be
>>> privileged, subject to copyright, trade secret, or other legal rules and
>>> may not be forwarded without the author's permission. If you are not the 
>>> intended
>>> recipient, or received it in error you must not read, copy, store or
>>> disseminate this message, and please delete the message from all
>>> storage devices and notify the sender immediately.
>>>
>>> --
>>> 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/a3b0c224-48f6-4d4d-b091-a24dd1e42cbdo%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> OGUNSANYA OPEYEMI
>>
>>
> --
> This message (including attachments) is confidential and may be
> privileged, subject to copyright, trade secret, or other legal rules and
> may not be forwarded without the author's permission. If you are not the 
> intended
> recipient, or received it in error you must not read, copy, store or
> disseminate this message, and please delete the message from all storage
> devices and notify the sender immediately.
>
> --
> 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/6dcf8ba2-2611-4097-98b3-9571f55de10en%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/CAHtg44BsrA%2B1U03hvojoFQOawFvNLMjkEb-Q%3DOeoGpwAtdkvfg%40mail.gmail.com.


Re: HTML Snippets instead of JSON-API

2020-08-28 Thread guettli
How does using react with the help of webpack help me to avoid JavaScript?


On Friday, 28 August 2020 at 15:48:34 UTC+2 manglav...@gmail.com wrote:

> You can use Django and react with the help of webpack.
>
>  
>
> Sent from Mail  for 
> Windows 10
>
>  
>
> *From: *guettli
> *Sent: *28 August 2020 14:02
> *To: *Django users
> *Subject: *HTML Snippets instead of JSON-API
>
>  
>
> If you read the current articles about software development,
>
> you get the impression that you must create
>
> a backend API returning JSON (maybe via Django RestFramework)
>
> and then create a GUI with React/Vue/Angular
>
>  
>
> I am a backend geek. I like Python, Django, Linux, SQL, and try to avoid 
> JavaScript.
>
>  
>
> Nevertheless I want to develop a modern GUI.
>
>  
>
> By chance I found a nice library:
>
>  
>
> https://htmx.org/
>
>  
>
> This does exactly what I was looking for.
>
>  
>
> It helps you to update parts of your html page.
>
> This way the server sends HTML to the client and htmx
>
> inserts the snippets into the page.
>
>  
>
> At the moment I think I found the perfect library.
>
>  
>
> But maybe I am wrong.
>
>  
>
> Which alternatives exist, if you want to avoid JS
>
> and render HTML and HTML forms with Django?
>
>  
>
> Regards,
>
>   Thomas Güttler
>
>  
>
>  
>
>  
>
>  
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/f737d8cb-6d11-4722-8351-459b903297bbn%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/3474e2b4-0d5f-438e-b3e4-2065b8f27e8fn%40googlegroups.com.


Re: Page 3

2020-08-28 Thread rbarh...@gmail.com
The error message claims invalid syntax and point to the equal sign between 
name and 'results.'

On Thursday, August 27, 2020 at 5:12:53 PM UTC-7 rbarh...@gmail.com wrote:

> My code inspector tells me that "from django.urls import path" is unused 
> so the path statements must not work, I guess.  But the tutorials presents 
> that code.
>
> BTW, it's Maxim who helped
>
> On Thursday, August 27, 2020 at 5:07:38 PM UTC-7 rbarh...@gmail.com wrote:
>
>> Thanks to Maxi, I could move on and immediately found a new problem on 
>> Part 3.
>>
>> I have studied this error message for over an hour and cannot figure it 
>> out.  Here is the code.  There are two pieces, one in polls/views.py and 
>> one in polls/urls.py.
>> ```
>> polls/views.py
>> from django.http import HttpResponse
>>
>> # Create your views here.
>> def index(request):
>> return HttpResponse("I have a BIG present for you.")
>>
>>
>> def detail(request, question_id):
>> return HttpResponse("You are looking at question %s." % question_id)
>>
>>
>> def results(request, question_id):
>> response = "You are looking at the results of question %s."
>> return HttpResponse(response % question_id)
>>
>> def vote(request, question_id):
>> return HttpResponse("You are voting on question %s." %
>> question_id)
>> ```
>>
>> urls.py;
>> ```
>> from django.urls import path
>>
>> from . import views
>>
>>
>> urlpatterns = [
>> # ex: /polls/
>> path('', views.index, name='index'),
>> # ex: /polls/5
>> path('/', views.detail, name='detail'),
>> # ex: /polls/5/results/
>> path('/results/'), views.results, name='results'),
>> #ex: /polls/5/vote/
>> path('/vote/', views.vote, name='vote'),
>> ]
>> ```
>> produces this error message:
>> ```
>>  File 
>> "/Users/reb/Desktop/PycharmProjects/081920/djangoProject0/mysite/polls/urls.py",
>>  
>> line 12
>> path('/results/'), views.results, name='results'),
>> ```
>> I cannot see the error.  Please help.  Thank you.
>>
>>

-- 
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/75c28487-1d92-4488-a9b7-b3e7a8cc2bc5n%40googlegroups.com.


Re: creating a website with django

2020-08-28 Thread Dheekshith Mahalingam
I too a beginner
https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/
It's a good start here! With nice explanation
This site helped me a lot.
I think it will help you too!

On Fri, 28 Aug, 2020, 7:23 pm Kamini Shukla, 
wrote:

> i want to create a website with the help of django. pls some one help of
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2fd61f31-8604-422a-b091-e46cd9bc25d0n%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/CAA6AeAFJAZpOE-a4CSJrz7MMN2jOG9wHGX8xO93ktLwKUNd6ng%40mail.gmail.com.


NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread Patrick Carra
Hello All!  I need some help with a problem I have been struggling with.  
One of you generous geniuses has the answer I'm sure of it.  I am working 
on integrating an export to csv button(link) on my template to export 
filtered data from one of my tables.  I have previously only been able to 
dump the entire table to csv which isn't exactly what I need.  So my 
thoughts were to place a button/link on the template passes a 
parameter(dictionary of my filter criteria) to a view named ExportSearch.  
The view then calls a function that I have defined to perform my filtered 
query to the table and then writes outs to csv.  In theory I thought this 
should work but I keep getting errors that I have not been able to resolve 
and I am at the end of my knowledge capacity here.  Applicable code below.  
Did I mention THANK YOU

*From searchLit/urls.py*
from django.urls import include, path
from . import views
from .views import search

app_name= "searchLit"

urlpatterns=[
path('customsearch/', views.search, name='search'),
path('customsearch//', views.search, name='search'),
path('noccustomsearch/', views.nocSearch, name='nocSearch'),
path('nocreport/export/', views.noc_export, name='noc_export'),
path('customsearch/export/', views.searchLit_export, 
name='SearchLit_export'),
path('customsearch/exportSearch//', views.exportSearch, 
name='exportSearch'),
]

*From searchLit/views.py*
def filterCircuits(params, search_vector):
circuits=[]
if(params['circuitid']==None and params['bandwidth']==None and 
params['region']==None and params['carrier']==None and 
params['status']==None and params['segmentname']==None and 
params['mrcnew']==None):
circuits=Circuitinfotable.objects.all()
else:
if(params['multipleSearch']!=None and params['multipleSearch']!=""):

circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
else:
circuits = Circuitinfotable.objects.all()
if(params['circuitid']!=None and params['circuitid']!=""):
circuits = Circuitinfotable.objects.all()

circuits=circuits.filter(circuitid__icontains=params['circuitid'])
if(params['bandwidth']!=None and params['bandwidth']!="" and 
params['bandwidth']!='Select Bandwidth'):
circuits=circuits.filter(bandwidth=params['bandwidth'])
if(params['region']!=None and params['region']!="" and 
params['region']!='Select Region'):
circuits=circuits.filter(region=params['region'])
if(params['carrier']!=None and params['carrier']!="" and 
params['carrier']!='Select Carrier'):
circuits=circuits.filter(carrier=params['carrier'])
if(params['status']!=None and params['status']!="" and 
params['status']!='Select Status'):
circuits=circuits.filter(status=params['status'])
if(params['segmentname']!=None and params['segmentname']!="" and 
params['segmentname']!='Select Segment'):
circuits=circuits.filter(segmentname=params['segmentname'])
if(params['mrcnew']!=None and params['mrcnew']!=""):
circuits=circuits.filter(mrcnew=params['mrcnew'])
if(params['diversity']!='Select Option'):
if(params['diversity']=='None'):
circuits=circuits.filter(diversity=None)
else:

circuits=circuits.filter(diversity__icontains=params['diversity'])
if(params['kmz']!='Select YES/NO'):
if(params['kmz']=='No'):
circuits=circuits.filter(kmz=None)
else:
circuits=circuits.filter(kmz__isnull=False)
return(circuits)


def search(request):
form = CircuitForm
template =  'customsearch/customsearch.html'
search_vector = SearchVector('circuitid', 'carrier', 'pathname', 
'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst', 
'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress', 
'handoffalocst',
 'handoffaloccity', 'handoffzlocaddress', 
'handoffzloccity', 'handoffzlocst', 'latestjiraticket', 
'installciopsticket', 'retermciopsticket', 'discociopsticket', 'notes', 
'diversitynotes')

params={'circuitid': request.GET.get('circuitid'),
'bandwidth': request.GET.get('bandwidth'),
'region': request.GET.get('region'),
'carrier': request.GET.get('carrier'),
'status': request.GET.get('status'),
'segmentname': request.GET.get('segmentname'),
'mrcnew': request.GET.get('mrcnew'),
'diversity': request.GET.get('diversity'),
'kmz': request.GET.get('kmz'),
'multipleSearch': request.GET.get('multipleSearch')
   }

context=filterCircuits(params, search_vector)
#encoded_params = urllib.parse.urlencode(params)
numCircuits=len(context)
paramString = str(params)
return render(request, template, {'form':form, 'filter

500 Server Error | Impossible to Fix

2020-08-28 Thread Lightning Bit
Greetings all, 

I finally finished developing a Django website. 

In the terminal I checked: 

> python manage.py check --deploy

There were no errors and the program was ready for deployment. I even ran a:

> python manage.py runserver

There were also no errors on this end. Upon successfully porting the 
website to Heroku, I unfortunately got a 500 Server Error and then after 
editing, a 400 Server Error. I resolved the 400 Server Error by returning 
to the terminal and doing the following:

>python manage.py collectstatic

This resolved the 400 Server Error after pushing the data to the Heroku 
Master. Sadly, the 500 Server Error remained. I did a bit more research and 
discovered that 500 Server Errors usually arise from a syntax error in an 
HTML file or external file. I sifted for hours and did not find a syntax 
error. 

Could there be an alternative fix to the 500 Server Error that appears on 
the website? Does anyone know how to fix this? At this point, I feel as 
though I spent months developing this website for nothing. 

Please help if possible. Thank you! 

- Lightning Bit

-- 
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/cbe73ae9-c7c7-41de-95d5-1fab09ffdc17n%40googlegroups.com.


Re: Page 3

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

 You are closing the para thesis before.
  path('/results/', views.results, name='results'),
This is the correct syntax. All the best 👍

On Sat, 29 Aug 2020, 3:03 am rbarh...@gmail.com, 
wrote:

> The error message claims invalid syntax and point to the equal sign
> between name and 'results.'
>
> On Thursday, August 27, 2020 at 5:12:53 PM UTC-7 rbarh...@gmail.com wrote:
>
>> My code inspector tells me that "from django.urls import path" is unused
>> so the path statements must not work, I guess.  But the tutorials presents
>> that code.
>>
>> BTW, it's Maxim who helped
>>
>> On Thursday, August 27, 2020 at 5:07:38 PM UTC-7 rbarh...@gmail.com
>> wrote:
>>
>>> Thanks to Maxi, I could move on and immediately found a new problem on
>>> Part 3.
>>>
>>> I have studied this error message for over an hour and cannot figure it
>>> out.  Here is the code.  There are two pieces, one in polls/views.py and
>>> one in polls/urls.py.
>>> ```
>>> polls/views.py
>>> from django.http import HttpResponse
>>>
>>> # Create your views here.
>>> def index(request):
>>> return HttpResponse("I have a BIG present for you.")
>>>
>>>
>>> def detail(request, question_id):
>>> return HttpResponse("You are looking at question %s." % question_id)
>>>
>>>
>>> def results(request, question_id):
>>> response = "You are looking at the results of question %s."
>>> return HttpResponse(response % question_id)
>>>
>>> def vote(request, question_id):
>>> return HttpResponse("You are voting on question %s." %
>>> question_id)
>>> ```
>>>
>>> urls.py;
>>> ```
>>> from django.urls import path
>>>
>>> from . import views
>>>
>>>
>>> urlpatterns = [
>>> # ex: /polls/
>>> path('', views.index, name='index'),
>>> # ex: /polls/5
>>> path('/', views.detail, name='detail'),
>>> # ex: /polls/5/results/
>>> path('/results/'), views.results, name='results'),
>>> #ex: /polls/5/vote/
>>> path('/vote/', views.vote, name='vote'),
>>> ]
>>> ```
>>> produces this error message:
>>> ```
>>>  File
>>> "/Users/reb/Desktop/PycharmProjects/081920/djangoProject0/mysite/polls/urls.py",
>>> line 12
>>> path('/results/'), views.results, name='results'),
>>> ```
>>> I cannot see the error.  Please help.  Thank you.
>>>
>>> --
> 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/75c28487-1d92-4488-a9b7-b3e7a8cc2bc5n%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/CAK5m317kf8-QBwAsCNUMSpMAdQuy5cHUi8OM-HbD3LFcECEO%2BA%40mail.gmail.com.


Re: 500 Server Error | Impossible to Fix

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

In settings turn the debug to True. Then check the error in terminal.

In heroku you have to check the logs in the terminal using heroku logs
--tail

All the best 👍

On Sat, 29 Aug 2020, 4:35 am Lightning Bit, <
thelegendofearthretu...@gmail.com> wrote:

> Greetings all,
>
> I finally finished developing a Django website.
>
> In the terminal I checked:
>
> > python manage.py check --deploy
>
> There were no errors and the program was ready for deployment. I even ran
> a:
>
> > python manage.py runserver
>
> There were also no errors on this end. Upon successfully porting the
> website to Heroku, I unfortunately got a 500 Server Error and then after
> editing, a 400 Server Error. I resolved the 400 Server Error by returning
> to the terminal and doing the following:
>
> >python manage.py collectstatic
>
> This resolved the 400 Server Error after pushing the data to the Heroku
> Master. Sadly, the 500 Server Error remained. I did a bit more research and
> discovered that 500 Server Errors usually arise from a syntax error in an
> HTML file or external file. I sifted for hours and did not find a syntax
> error.
>
> Could there be an alternative fix to the 500 Server Error that appears on
> the website? Does anyone know how to fix this? At this point, I feel as
> though I spent months developing this website for nothing.
>
> Please help if possible. Thank you!
>
> - Lightning Bit
>
> --
> 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/cbe73ae9-c7c7-41de-95d5-1fab09ffdc17n%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/CAK5m315%3DfBPaX57c%2BMMf8%2BDUmh9oVNXeN%3DuK_P6gAnLqeJDT9w%40mail.gmail.com.


Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

Please check this package. This may help you. All the best

https://django-tables2.readthedocs.io/en/latest/pages/filtering.html


On Sat, 29 Aug 2020, 4:36 am Patrick Carra,  wrote:

> Hello All!  I need some help with a problem I have been struggling with.
> One of you generous geniuses has the answer I'm sure of it.  I am working
> on integrating an export to csv button(link) on my template to export
> filtered data from one of my tables.  I have previously only been able to
> dump the entire table to csv which isn't exactly what I need.  So my
> thoughts were to place a button/link on the template passes a
> parameter(dictionary of my filter criteria) to a view named ExportSearch.
> The view then calls a function that I have defined to perform my filtered
> query to the table and then writes outs to csv.  In theory I thought this
> should work but I keep getting errors that I have not been able to resolve
> and I am at the end of my knowledge capacity here.  Applicable code below.
> Did I mention THANK YOU
>
> *From searchLit/urls.py*
> from django.urls import include, path
> from . import views
> from .views import search
>
> app_name= "searchLit"
>
> urlpatterns=[
> path('customsearch/', views.search, name='search'),
> path('customsearch//', views.search, name='search'),
> path('noccustomsearch/', views.nocSearch, name='nocSearch'),
> path('nocreport/export/', views.noc_export, name='noc_export'),
> path('customsearch/export/', views.searchLit_export,
> name='SearchLit_export'),
> path('customsearch/exportSearch//', views.exportSearch,
> name='exportSearch'),
> ]
>
> *From searchLit/views.py*
> def filterCircuits(params, search_vector):
> circuits=[]
> if(params['circuitid']==None and params['bandwidth']==None and
> params['region']==None and params['carrier']==None and
> params['status']==None and params['segmentname']==None and
> params['mrcnew']==None):
> circuits=Circuitinfotable.objects.all()
> else:
> if(params['multipleSearch']!=None and
> params['multipleSearch']!=""):
>
> circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
> else:
> circuits = Circuitinfotable.objects.all()
> if(params['circuitid']!=None and params['circuitid']!=""):
> circuits = Circuitinfotable.objects.all()
>
> circuits=circuits.filter(circuitid__icontains=params['circuitid'])
> if(params['bandwidth']!=None and params['bandwidth']!="" and
> params['bandwidth']!='Select Bandwidth'):
> circuits=circuits.filter(bandwidth=params['bandwidth'])
> if(params['region']!=None and params['region']!="" and
> params['region']!='Select Region'):
> circuits=circuits.filter(region=params['region'])
> if(params['carrier']!=None and params['carrier']!="" and
> params['carrier']!='Select Carrier'):
> circuits=circuits.filter(carrier=params['carrier'])
> if(params['status']!=None and params['status']!="" and
> params['status']!='Select Status'):
> circuits=circuits.filter(status=params['status'])
> if(params['segmentname']!=None and params['segmentname']!="" and
> params['segmentname']!='Select Segment'):
> circuits=circuits.filter(segmentname=params['segmentname'])
> if(params['mrcnew']!=None and params['mrcnew']!=""):
> circuits=circuits.filter(mrcnew=params['mrcnew'])
> if(params['diversity']!='Select Option'):
> if(params['diversity']=='None'):
> circuits=circuits.filter(diversity=None)
> else:
>
> circuits=circuits.filter(diversity__icontains=params['diversity'])
> if(params['kmz']!='Select YES/NO'):
> if(params['kmz']=='No'):
> circuits=circuits.filter(kmz=None)
> else:
> circuits=circuits.filter(kmz__isnull=False)
> return(circuits)
>
>
> def search(request):
> form = CircuitForm
> template =  'customsearch/customsearch.html'
> search_vector = SearchVector('circuitid', 'carrier', 'pathname',
> 'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst',
> 'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress',
> 'handoffalocst',
>  'handoffaloccity', 'handoffzlocaddress',
> 'handoffzloccity', 'handoffzlocst', 'latestjiraticket',
> 'installciopsticket', 'retermciopsticket', 'discociopsticket', 'notes',
> 'diversitynotes')
>
> params={'circuitid': request.GET.get('circuitid'),
> 'bandwidth': request.GET.get('bandwidth'),
> 'region': request.GET.get('region'),
> 'carrier': request.GET.get('carrier'),
> 'status': request.GET.get('status'),
> 'segmentname': request.GET.get('segmentname'),
> 'mrcnew': request.GET.get('mrcnew'),
> 'diversity': request.GET.get('diversity'),
> 'kmz': r

Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

 Check this.
 https://pypi.org/project/django-queryset-csv/


On Sat, 29 Aug 2020, 7:33 am RANGA BHARATH JINKA, 
wrote:

> Hi,
>
> Please check this package. This may help you. All the best
>
> https://django-tables2.readthedocs.io/en/latest/pages/filtering.html
>
>
> On Sat, 29 Aug 2020, 4:36 am Patrick Carra,  wrote:
>
>> Hello All!  I need some help with a problem I have been struggling with.
>> One of you generous geniuses has the answer I'm sure of it.  I am working
>> on integrating an export to csv button(link) on my template to export
>> filtered data from one of my tables.  I have previously only been able to
>> dump the entire table to csv which isn't exactly what I need.  So my
>> thoughts were to place a button/link on the template passes a
>> parameter(dictionary of my filter criteria) to a view named ExportSearch.
>> The view then calls a function that I have defined to perform my filtered
>> query to the table and then writes outs to csv.  In theory I thought this
>> should work but I keep getting errors that I have not been able to resolve
>> and I am at the end of my knowledge capacity here.  Applicable code below.
>> Did I mention THANK YOU
>>
>> *From searchLit/urls.py*
>> from django.urls import include, path
>> from . import views
>> from .views import search
>>
>> app_name= "searchLit"
>>
>> urlpatterns=[
>> path('customsearch/', views.search, name='search'),
>> path('customsearch//', views.search, name='search'),
>> path('noccustomsearch/', views.nocSearch, name='nocSearch'),
>> path('nocreport/export/', views.noc_export, name='noc_export'),
>> path('customsearch/export/', views.searchLit_export,
>> name='SearchLit_export'),
>> path('customsearch/exportSearch//', views.exportSearch,
>> name='exportSearch'),
>> ]
>>
>> *From searchLit/views.py*
>> def filterCircuits(params, search_vector):
>> circuits=[]
>> if(params['circuitid']==None and params['bandwidth']==None and
>> params['region']==None and params['carrier']==None and
>> params['status']==None and params['segmentname']==None and
>> params['mrcnew']==None):
>> circuits=Circuitinfotable.objects.all()
>> else:
>> if(params['multipleSearch']!=None and
>> params['multipleSearch']!=""):
>>
>> circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
>> else:
>> circuits = Circuitinfotable.objects.all()
>> if(params['circuitid']!=None and params['circuitid']!=""):
>> circuits = Circuitinfotable.objects.all()
>>
>> circuits=circuits.filter(circuitid__icontains=params['circuitid'])
>> if(params['bandwidth']!=None and params['bandwidth']!="" and
>> params['bandwidth']!='Select Bandwidth'):
>> circuits=circuits.filter(bandwidth=params['bandwidth'])
>> if(params['region']!=None and params['region']!="" and
>> params['region']!='Select Region'):
>> circuits=circuits.filter(region=params['region'])
>> if(params['carrier']!=None and params['carrier']!="" and
>> params['carrier']!='Select Carrier'):
>> circuits=circuits.filter(carrier=params['carrier'])
>> if(params['status']!=None and params['status']!="" and
>> params['status']!='Select Status'):
>> circuits=circuits.filter(status=params['status'])
>> if(params['segmentname']!=None and params['segmentname']!="" and
>> params['segmentname']!='Select Segment'):
>> circuits=circuits.filter(segmentname=params['segmentname'])
>> if(params['mrcnew']!=None and params['mrcnew']!=""):
>> circuits=circuits.filter(mrcnew=params['mrcnew'])
>> if(params['diversity']!='Select Option'):
>> if(params['diversity']=='None'):
>> circuits=circuits.filter(diversity=None)
>> else:
>>
>> circuits=circuits.filter(diversity__icontains=params['diversity'])
>> if(params['kmz']!='Select YES/NO'):
>> if(params['kmz']=='No'):
>> circuits=circuits.filter(kmz=None)
>> else:
>> circuits=circuits.filter(kmz__isnull=False)
>> return(circuits)
>>
>>
>> def search(request):
>> form = CircuitForm
>> template =  'customsearch/customsearch.html'
>> search_vector = SearchVector('circuitid', 'carrier', 'pathname',
>> 'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst',
>> 'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress',
>> 'handoffalocst',
>>  'handoffaloccity', 'handoffzlocaddress',
>> 'handoffzloccity', 'handoffzlocst', 'latestjiraticket',
>> 'installciopsticket', 'retermciopsticket', 'discociopsticket', 'notes',
>> 'diversitynotes')
>>
>> params={'circuitid': request.GET.get('circuitid'),
>> 'bandwidth': request.GET.get('bandwidth'),
>> 'region': request.GET.get('region'),
>> 'carrier': request.GET.get('carrier')

Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread RANGA BHARATH JINKA
Hi,

Use jQuery datatable for this. It is easy to use and has inbuilt search
and export to CSV, Excel options also.
https://datatables.net/extensions/buttons/examples/initialisation/export.html

On Sat, 29 Aug 2020, 7:54 am RANGA BHARATH JINKA, 
wrote:

> Hi,
>
>  Check this.
>  https://pypi.org/project/django-queryset-csv/
>
>
> On Sat, 29 Aug 2020, 7:33 am RANGA BHARATH JINKA, <
> bharathjink...@gmail.com> wrote:
>
>> Hi,
>>
>> Please check this package. This may help you. All the best
>>
>> https://django-tables2.readthedocs.io/en/latest/pages/filtering.html
>>
>>
>> On Sat, 29 Aug 2020, 4:36 am Patrick Carra,  wrote:
>>
>>> Hello All!  I need some help with a problem I have been struggling
>>> with.  One of you generous geniuses has the answer I'm sure of it.  I am
>>> working on integrating an export to csv button(link) on my template to
>>> export filtered data from one of my tables.  I have previously only been
>>> able to dump the entire table to csv which isn't exactly what I need.  So
>>> my thoughts were to place a button/link on the template passes a
>>> parameter(dictionary of my filter criteria) to a view named ExportSearch.
>>> The view then calls a function that I have defined to perform my filtered
>>> query to the table and then writes outs to csv.  In theory I thought this
>>> should work but I keep getting errors that I have not been able to resolve
>>> and I am at the end of my knowledge capacity here.  Applicable code below.
>>> Did I mention THANK YOU
>>>
>>> *From searchLit/urls.py*
>>> from django.urls import include, path
>>> from . import views
>>> from .views import search
>>>
>>> app_name= "searchLit"
>>>
>>> urlpatterns=[
>>> path('customsearch/', views.search, name='search'),
>>> path('customsearch//', views.search, name='search'),
>>> path('noccustomsearch/', views.nocSearch, name='nocSearch'),
>>> path('nocreport/export/', views.noc_export, name='noc_export'),
>>> path('customsearch/export/', views.searchLit_export,
>>> name='SearchLit_export'),
>>> path('customsearch/exportSearch//', views.exportSearch,
>>> name='exportSearch'),
>>> ]
>>>
>>> *From searchLit/views.py*
>>> def filterCircuits(params, search_vector):
>>> circuits=[]
>>> if(params['circuitid']==None and params['bandwidth']==None and
>>> params['region']==None and params['carrier']==None and
>>> params['status']==None and params['segmentname']==None and
>>> params['mrcnew']==None):
>>> circuits=Circuitinfotable.objects.all()
>>> else:
>>> if(params['multipleSearch']!=None and
>>> params['multipleSearch']!=""):
>>>
>>> circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
>>> else:
>>> circuits = Circuitinfotable.objects.all()
>>> if(params['circuitid']!=None and params['circuitid']!=""):
>>> circuits = Circuitinfotable.objects.all()
>>>
>>> circuits=circuits.filter(circuitid__icontains=params['circuitid'])
>>> if(params['bandwidth']!=None and params['bandwidth']!="" and
>>> params['bandwidth']!='Select Bandwidth'):
>>> circuits=circuits.filter(bandwidth=params['bandwidth'])
>>> if(params['region']!=None and params['region']!="" and
>>> params['region']!='Select Region'):
>>> circuits=circuits.filter(region=params['region'])
>>> if(params['carrier']!=None and params['carrier']!="" and
>>> params['carrier']!='Select Carrier'):
>>> circuits=circuits.filter(carrier=params['carrier'])
>>> if(params['status']!=None and params['status']!="" and
>>> params['status']!='Select Status'):
>>> circuits=circuits.filter(status=params['status'])
>>> if(params['segmentname']!=None and params['segmentname']!="" and
>>> params['segmentname']!='Select Segment'):
>>> circuits=circuits.filter(segmentname=params['segmentname'])
>>> if(params['mrcnew']!=None and params['mrcnew']!=""):
>>> circuits=circuits.filter(mrcnew=params['mrcnew'])
>>> if(params['diversity']!='Select Option'):
>>> if(params['diversity']=='None'):
>>> circuits=circuits.filter(diversity=None)
>>> else:
>>>
>>> circuits=circuits.filter(diversity__icontains=params['diversity'])
>>> if(params['kmz']!='Select YES/NO'):
>>> if(params['kmz']=='No'):
>>> circuits=circuits.filter(kmz=None)
>>> else:
>>> circuits=circuits.filter(kmz__isnull=False)
>>> return(circuits)
>>>
>>>
>>> def search(request):
>>> form = CircuitForm
>>> template =  'customsearch/customsearch.html'
>>> search_vector = SearchVector('circuitid', 'carrier', 'pathname',
>>> 'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst',
>>> 'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress',
>>> 'handoffalocst',
>>>  'handoffaloccity',
>>

Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread RANGA BHARATH JINKA
Hi,


 There is a django module.
 https://pypi.org/project/django-datatables-view/

On Sat, 29 Aug 2020, 8:25 am RANGA BHARATH JINKA, 
wrote:

> Hi,
>
> Use jQuery datatable for this. It is easy to use and has inbuilt
> search and export to CSV, Excel options also.
>
> https://datatables.net/extensions/buttons/examples/initialisation/export.html
>
> On Sat, 29 Aug 2020, 7:54 am RANGA BHARATH JINKA, <
> bharathjink...@gmail.com> wrote:
>
>> Hi,
>>
>>  Check this.
>>  https://pypi.org/project/django-queryset-csv/
>>
>>
>> On Sat, 29 Aug 2020, 7:33 am RANGA BHARATH JINKA, <
>> bharathjink...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Please check this package. This may help you. All the best
>>>
>>> https://django-tables2.readthedocs.io/en/latest/pages/filtering.html
>>>
>>>
>>> On Sat, 29 Aug 2020, 4:36 am Patrick Carra,  wrote:
>>>
 Hello All!  I need some help with a problem I have been struggling
 with.  One of you generous geniuses has the answer I'm sure of it.  I am
 working on integrating an export to csv button(link) on my template to
 export filtered data from one of my tables.  I have previously only been
 able to dump the entire table to csv which isn't exactly what I need.  So
 my thoughts were to place a button/link on the template passes a
 parameter(dictionary of my filter criteria) to a view named ExportSearch.
 The view then calls a function that I have defined to perform my filtered
 query to the table and then writes outs to csv.  In theory I thought this
 should work but I keep getting errors that I have not been able to resolve
 and I am at the end of my knowledge capacity here.  Applicable code below.
 Did I mention THANK YOU

 *From searchLit/urls.py*
 from django.urls import include, path
 from . import views
 from .views import search

 app_name= "searchLit"

 urlpatterns=[
 path('customsearch/', views.search, name='search'),
 path('customsearch//', views.search, name='search'),
 path('noccustomsearch/', views.nocSearch, name='nocSearch'),
 path('nocreport/export/', views.noc_export, name='noc_export'),
 path('customsearch/export/', views.searchLit_export,
 name='SearchLit_export'),
 path('customsearch/exportSearch//', views.exportSearch,
 name='exportSearch'),
 ]

 *From searchLit/views.py*
 def filterCircuits(params, search_vector):
 circuits=[]
 if(params['circuitid']==None and params['bandwidth']==None and
 params['region']==None and params['carrier']==None and
 params['status']==None and params['segmentname']==None and
 params['mrcnew']==None):
 circuits=Circuitinfotable.objects.all()
 else:
 if(params['multipleSearch']!=None and
 params['multipleSearch']!=""):

 circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
 else:
 circuits = Circuitinfotable.objects.all()
 if(params['circuitid']!=None and params['circuitid']!=""):
 circuits = Circuitinfotable.objects.all()

 circuits=circuits.filter(circuitid__icontains=params['circuitid'])
 if(params['bandwidth']!=None and params['bandwidth']!="" and
 params['bandwidth']!='Select Bandwidth'):
 circuits=circuits.filter(bandwidth=params['bandwidth'])
 if(params['region']!=None and params['region']!="" and
 params['region']!='Select Region'):
 circuits=circuits.filter(region=params['region'])
 if(params['carrier']!=None and params['carrier']!="" and
 params['carrier']!='Select Carrier'):
 circuits=circuits.filter(carrier=params['carrier'])
 if(params['status']!=None and params['status']!="" and
 params['status']!='Select Status'):
 circuits=circuits.filter(status=params['status'])
 if(params['segmentname']!=None and params['segmentname']!=""
 and params['segmentname']!='Select Segment'):
 circuits=circuits.filter(segmentname=params['segmentname'])
 if(params['mrcnew']!=None and params['mrcnew']!=""):
 circuits=circuits.filter(mrcnew=params['mrcnew'])
 if(params['diversity']!='Select Option'):
 if(params['diversity']=='None'):
 circuits=circuits.filter(diversity=None)
 else:

 circuits=circuits.filter(diversity__icontains=params['diversity'])
 if(params['kmz']!='Select YES/NO'):
 if(params['kmz']=='No'):
 circuits=circuits.filter(kmz=None)
 else:
 circuits=circuits.filter(kmz__isnull=False)
 return(circuits)


 def search(request):
 form = CircuitForm
 template =  'customsearch/customsearch.html'
   

Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread coolguy
You can't have the same name twice. You need to change the name for one of 
the followings:
path('customsearch/', views.search, name='search'),
path('customsearch//', views.search, name='search_xxx')

On Friday, August 28, 2020 at 7:06:09 PM UTC-4 pcar...@gmail.com wrote:

> Hello All!  I need some help with a problem I have been struggling with.  
> One of you generous geniuses has the answer I'm sure of it.  I am working 
> on integrating an export to csv button(link) on my template to export 
> filtered data from one of my tables.  I have previously only been able to 
> dump the entire table to csv which isn't exactly what I need.  So my 
> thoughts were to place a button/link on the template passes a 
> parameter(dictionary of my filter criteria) to a view named ExportSearch.  
> The view then calls a function that I have defined to perform my filtered 
> query to the table and then writes outs to csv.  In theory I thought this 
> should work but I keep getting errors that I have not been able to resolve 
> and I am at the end of my knowledge capacity here.  Applicable code below.  
> Did I mention THANK YOU
>
> *From searchLit/urls.py*
> from django.urls import include, path
> from . import views
> from .views import search
>
> app_name= "searchLit"
>
> urlpatterns=[
> path('customsearch/', views.search, name='search'),
> path('customsearch//', views.search, name='search'),
> path('noccustomsearch/', views.nocSearch, name='nocSearch'),
> path('nocreport/export/', views.noc_export, name='noc_export'),
> path('customsearch/export/', views.searchLit_export, 
> name='SearchLit_export'),
> path('customsearch/exportSearch//', views.exportSearch, 
> name='exportSearch'),
> ]
>
> *From searchLit/views.py*
> def filterCircuits(params, search_vector):
> circuits=[]
> if(params['circuitid']==None and params['bandwidth']==None and 
> params['region']==None and params['carrier']==None and 
> params['status']==None and params['segmentname']==None and 
> params['mrcnew']==None):
> circuits=Circuitinfotable.objects.all()
> else:
> if(params['multipleSearch']!=None and 
> params['multipleSearch']!=""):
> 
> circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
> else:
> circuits = Circuitinfotable.objects.all()
> if(params['circuitid']!=None and params['circuitid']!=""):
> circuits = Circuitinfotable.objects.all()
> 
> circuits=circuits.filter(circuitid__icontains=params['circuitid'])
> if(params['bandwidth']!=None and params['bandwidth']!="" and 
> params['bandwidth']!='Select Bandwidth'):
> circuits=circuits.filter(bandwidth=params['bandwidth'])
> if(params['region']!=None and params['region']!="" and 
> params['region']!='Select Region'):
> circuits=circuits.filter(region=params['region'])
> if(params['carrier']!=None and params['carrier']!="" and 
> params['carrier']!='Select Carrier'):
> circuits=circuits.filter(carrier=params['carrier'])
> if(params['status']!=None and params['status']!="" and 
> params['status']!='Select Status'):
> circuits=circuits.filter(status=params['status'])
> if(params['segmentname']!=None and params['segmentname']!="" and 
> params['segmentname']!='Select Segment'):
> circuits=circuits.filter(segmentname=params['segmentname'])
> if(params['mrcnew']!=None and params['mrcnew']!=""):
> circuits=circuits.filter(mrcnew=params['mrcnew'])
> if(params['diversity']!='Select Option'):
> if(params['diversity']=='None'):
> circuits=circuits.filter(diversity=None)
> else:
> 
> circuits=circuits.filter(diversity__icontains=params['diversity'])
> if(params['kmz']!='Select YES/NO'):
> if(params['kmz']=='No'):
> circuits=circuits.filter(kmz=None)
> else:
> circuits=circuits.filter(kmz__isnull=False)
> return(circuits)
>
>
> def search(request):
> form = CircuitForm
> template =  'customsearch/customsearch.html'
> search_vector = SearchVector('circuitid', 'carrier', 'pathname', 
> 'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst', 
> 'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress', 
> 'handoffalocst',
>  'handoffaloccity', 'handoffzlocaddress', 
> 'handoffzloccity', 'handoffzlocst', 'latestjiraticket', 
> 'installciopsticket', 'retermciopsticket', 'discociopsticket', 'notes', 
> 'diversitynotes')
>
> params={'circuitid': request.GET.get('circuitid'),
> 'bandwidth': request.GET.get('bandwidth'),
> 'region': request.GET.get('region'),
> 'carrier': request.GET.get('carrier'),
> 'status': request.GET.get('status'),
> 'segmentname': req

Re: NoReverseMatch at /searchlit/customsearch and bigger problem of exporting a filtered queryset

2020-08-28 Thread coolguy
You can't have the same name twice. You need to change the name for one of 
the followings:
path('customsearch/', views.search, name='search'),
path('customsearch//', views.search, name='search_xxx')

Reverse method requires a url identified by name parameter which must be 
unique. Its looking for search and it find it on two places so you are 
getting this error.

On Friday, August 28, 2020 at 7:06:09 PM UTC-4 pcar...@gmail.com wrote:

> Hello All!  I need some help with a problem I have been struggling with.  
> One of you generous geniuses has the answer I'm sure of it.  I am working 
> on integrating an export to csv button(link) on my template to export 
> filtered data from one of my tables.  I have previously only been able to 
> dump the entire table to csv which isn't exactly what I need.  So my 
> thoughts were to place a button/link on the template passes a 
> parameter(dictionary of my filter criteria) to a view named ExportSearch.  
> The view then calls a function that I have defined to perform my filtered 
> query to the table and then writes outs to csv.  In theory I thought this 
> should work but I keep getting errors that I have not been able to resolve 
> and I am at the end of my knowledge capacity here.  Applicable code below.  
> Did I mention THANK YOU
>
> *From searchLit/urls.py*
> from django.urls import include, path
> from . import views
> from .views import search
>
> app_name= "searchLit"
>
> urlpatterns=[
> path('customsearch/', views.search, name='search'),
> path('customsearch//', views.search, name='search'),
> path('noccustomsearch/', views.nocSearch, name='nocSearch'),
> path('nocreport/export/', views.noc_export, name='noc_export'),
> path('customsearch/export/', views.searchLit_export, 
> name='SearchLit_export'),
> path('customsearch/exportSearch//', views.exportSearch, 
> name='exportSearch'),
> ]
>
> *From searchLit/views.py*
> def filterCircuits(params, search_vector):
> circuits=[]
> if(params['circuitid']==None and params['bandwidth']==None and 
> params['region']==None and params['carrier']==None and 
> params['status']==None and params['segmentname']==None and 
> params['mrcnew']==None):
> circuits=Circuitinfotable.objects.all()
> else:
> if(params['multipleSearch']!=None and 
> params['multipleSearch']!=""):
> 
> circuits=Circuitinfotable.objects.annotate(search=search_vector).filter(search=params['multipleSearch'])
> else:
> circuits = Circuitinfotable.objects.all()
> if(params['circuitid']!=None and params['circuitid']!=""):
> circuits = Circuitinfotable.objects.all()
> 
> circuits=circuits.filter(circuitid__icontains=params['circuitid'])
> if(params['bandwidth']!=None and params['bandwidth']!="" and 
> params['bandwidth']!='Select Bandwidth'):
> circuits=circuits.filter(bandwidth=params['bandwidth'])
> if(params['region']!=None and params['region']!="" and 
> params['region']!='Select Region'):
> circuits=circuits.filter(region=params['region'])
> if(params['carrier']!=None and params['carrier']!="" and 
> params['carrier']!='Select Carrier'):
> circuits=circuits.filter(carrier=params['carrier'])
> if(params['status']!=None and params['status']!="" and 
> params['status']!='Select Status'):
> circuits=circuits.filter(status=params['status'])
> if(params['segmentname']!=None and params['segmentname']!="" and 
> params['segmentname']!='Select Segment'):
> circuits=circuits.filter(segmentname=params['segmentname'])
> if(params['mrcnew']!=None and params['mrcnew']!=""):
> circuits=circuits.filter(mrcnew=params['mrcnew'])
> if(params['diversity']!='Select Option'):
> if(params['diversity']=='None'):
> circuits=circuits.filter(diversity=None)
> else:
> 
> circuits=circuits.filter(diversity__icontains=params['diversity'])
> if(params['kmz']!='Select YES/NO'):
> if(params['kmz']=='No'):
> circuits=circuits.filter(kmz=None)
> else:
> circuits=circuits.filter(kmz__isnull=False)
> return(circuits)
>
>
> def search(request):
> form = CircuitForm
> template =  'customsearch/customsearch.html'
> search_vector = SearchVector('circuitid', 'carrier', 'pathname', 
> 'segmentname', 'segmentid', 'alocationaddress', 'alocationcity', 'alocst', 
> 'zlocationaddress', 'zlocationcity', 'zlocst', 'handoffalocaddress', 
> 'handoffalocst',
>  'handoffaloccity', 'handoffzlocaddress', 
> 'handoffzloccity', 'handoffzlocst', 'latestjiraticket', 
> 'installciopsticket', 'retermciopsticket', 'discociopsticket', 'notes', 
> 'diversitynotes')
>
> params={'circuitid': request.GET.get('circuitid'),
> 'bandwidth': request.GET.get('bandwidth'),
> 'regio

Re: creating a website with django

2020-08-28 Thread Ajeet Kumar Gupt
Hi,

Please take help from  this website. It's a very basic concept to start the
Django framework in one place and step by steps.

URL: https://www.djangopythoner.com/

Thanks & Regards





On Fri, Aug 28, 2020 at 7:35 PM sakshi jain  wrote:

> plz help me also
>
> On Fri, Aug 28, 2020, 19:23 Kamini Shukla 
> wrote:
>
>> i want to create a website with the help of django. pls some one help of
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/2fd61f31-8604-422a-b091-e46cd9bc25d0n%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/CAJhs3iP_YK4gCu48FkbDwSHx6bciQ%2BzZCS_N4RvWFQ71X%2BFEYA%40mail.gmail.com
> 
> .
>


-- 






*Thanks & Regards*
Ajeet Kumar Gupt
+91-9311232332

-- 
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/CA%2BTqRsuDgry%3DD44HVMJr-G32o3Cf1_y8oL-YEM0vjJpxwOzUiQ%40mail.gmail.com.