Re:

2019-12-04 Thread Karan Mittal
I think he wants to use get method. Like the search page reuslts of google.
For that just make thw {%block content %} inside the title tags of your
base template. And use get method for these kind of work where no database
interaction is happening.

Karan Mittal,
Business Analyst at techvalens
Contact me on this mail.


On Wed, 4 Dec, 2019, 5:51 AM 1351552...@qq.com, <1351552...@qq.com> wrote:

> r u mean u want to display the response?
>
> --
> wblueboat
>
>
> *From:* vaneet bawa 
> *Date:* 2019-11-27 16:35
> *To:* django-users 
> *Subject:*
> can someone please tell me that how I can display the message on the url
> from which I am getting the response
>
> --
> 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/CAKubXnycx%3DqU2h4SgRJ%3D_HEXbSqfbJ8ii2TbVQVzYGzcT9m7Qg%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/5de6fbe9.1c69fb81.8ef74.2debSMTPIN_ADDED_BROKEN%40gmr-mx.google.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/CAO24gqyv0%3Df%2BkgvJvCM0J_J_CM0cJL9FfMnsqAz3Wf6uRaSVQg%40mail.gmail.com.


Re: Why is the Django server running even when pytlinter shows that there's some bug in the code?

2019-12-04 Thread Bruckner de Villiers
Which tutorial are you following?  Is it any good?

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Aaryan Dewan 

Reply to: 
Date: Tuesday, 03 December 2019 at 16:52
To: Django users 
Subject: Re: Why is the Django server running even when pytlinter shows that 
there's some bug in the code?

 

Thanks! :)

On Tuesday, December 3, 2019 at 7:00:18 PM UTC+5:30, Bruckner de Villiers wrote:

I had the same issue and after trying various weird solutions on Stackoverflow, 
none of which worked, I found this simple solution – add this comment code to 
each line giving the error and it magically disappears:

 

# pylint: disable=no-member

 

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Aaryan Dewan 

Reply to: 
Date: Tuesday, 03 December 2019 at 14:34
To: Django users 
Subject: Why is the Django server running even when pytlinter shows that 
there's some bug in the code?

 

I was just following this tutorial, on how to make Django apps and how to 
display a database to the user. I created a simple database in models.py and 
then, I defined a function in views.py, which used Item.objects.all(). Now 
Pylinter says that 'Item' has no 'objects' member!

So this should prevent the server from running ( as its a bug after all!), but 
if I type in python manage.py runserver, the terminal shows no error and the 
server starts functioning. 

 

Please see the photo attachment to get a clearer view of the problem!

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6428642e-3d7d-4d95-b387-0894c8410897%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/29ca61e2-640f-4e9e-8264-0bb691d0729c%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/02691AA0-A6E1-4A40-8EEF-8BC16196C72A%40gmail.com.


Re:

2019-12-04 Thread Kevin Dublin
Hmm, do you mean that you would like to post a get response with a message
and it pass through the URL? Are you trying to pass it to another view?

I want to clarify because it involves changing the view, template & urls.py.

On Wed, Dec 4, 2019, 12:23 AM Karan Mittal 
wrote:

> I think he wants to use get method. Like the search page reuslts of google.
> For that just make thw {%block content %} inside the title tags of your
> base template. And use get method for these kind of work where no database
> interaction is happening.
>
> Karan Mittal,
> Business Analyst at techvalens
> Contact me on this mail.
>
>
> On Wed, 4 Dec, 2019, 5:51 AM 1351552...@qq.com, <1351552...@qq.com> wrote:
>
>> r u mean u want to display the response?
>>
>> --
>> wblueboat
>>
>>
>> *From:* vaneet bawa 
>> *Date:* 2019-11-27 16:35
>> *To:* django-users 
>> *Subject:*
>> can someone please tell me that how I can display the message on the url
>> from which I am getting the response
>>
>> --
>> 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/CAKubXnycx%3DqU2h4SgRJ%3D_HEXbSqfbJ8ii2TbVQVzYGzcT9m7Qg%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/5de6fbe9.1c69fb81.8ef74.2debSMTPIN_ADDED_BROKEN%40gmr-mx.google.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/CAO24gqyv0%3Df%2BkgvJvCM0J_J_CM0cJL9FfMnsqAz3Wf6uRaSVQg%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/CANips4%2Bw4AOLqEOXUcbq54Jehav_cibdZKFdmzaLcoJXxOYVsw%40mail.gmail.com.


Exception in thread django-main-thread:

2019-12-04 Thread Michael Mathonsi
Please help with resolving my application, i have setup the environment and 
almost finished my application when the system decided out  of knowhere to 
generate the following errors and im due for presentation by tomorrow.



Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\tamik\Anaconda3\lib\threading.py", line 917, in 
_bootstrap_inner
self.run()
  File "C:\Users\tamik\Anaconda3\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\autoreload.py", 
line 54, in wrapper
fn(*args, **kwargs)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py",
 
line 117, in inner_run
self.check(display_num_errors=True)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py", 
line 390, in check
include_deployment_checks=include_deployment_checks,
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py", 
line 377, in _run_checks
return checks.run_checks(**kwargs)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\registry.py", 
line 72, in run_checks
new_errors = check(app_configs=app_configs)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py", 
line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py", 
line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py", 
line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line 
584, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py", 
line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line 
577, in urlconf_module
return import_module(self.urlconf_name)
  File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project - 
Copy\newproject\newproject\urls.py", line 21, in 
path('', include('newapp.url')),
  File "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\conf.py", 
line 34, in include
urlconf_module = import_module(urlconf_module)
  File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project - 
Copy\newproject\newapp\url.py", line 2, in 
from . import views
  File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project - 
Copy\newproject\newapp\views.py", line 6, in 
from .form import userdetailsum, userdetailsu, userdetailsup, DateForm, 
formtrend
ImportError: cannot import name 'userdetailsu' from 'newapp.form' 
(C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project - 
Copy\newproject\newapp\form.py)



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


Re: Link a .css to a Html template

2019-12-04 Thread Aline Balogh
Hi Léo.

Remove the # from the html class attribute .




Em domingo, 1 de dezembro de 2019 22:27:34 UTC-3, Leó Horváth escreveu:
>
> Hi guys, I am experiencing an error while trying to Link a .css file to a 
> Html template of one of my Views. What is the correct way to do 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/54f6f836-1590-470f-8b3d-1a470f7977a4%40googlegroups.com.


Unable to create a new virtual environement 'test'

2019-12-04 Thread Hima Bindu chowdary
I had created a virtualwrapper then had to create a virtual env called test
when i ran the following command i got this :

C:\Users\User>py -m pip install virtualenv test
Requirement already satisfied: virtualenv in 
c:\users\user\appdata\local\programs\python\python38\lib\site-packages 
(16.7.8)
ERROR: Could not find a version that satisfies the requirement test (from 
versions: none)
ERROR: No matching distribution found for test

I need to create a virtual environment but it says it is already present..

-- 
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/48edad31-e33c-4460-91c0-f80b7e6adce4%40googlegroups.com.


Re: django.db.utils.ProgrammingError: relation "django_content_type" already exists

2019-12-04 Thread Naveen
Hi Ram,

https://stackoverflow.com/questions/29760817/how-can-i-resolve-django-content-type-already-exists

this might solve this issue.

Naveen

On Saturday, 30 November 2019 22:34:04 UTC+5:30, Ram wrote:
>
>  Hi,
>
> I'm blocked with this issue in my newly hosting site. Here is my scenario. 
>
>1. I've working site with MySQL database in our development localhost.
>2. I created new hosting server in Digital Ocean's Ubuntu 18.04 
>droplet with Postgres db. 
>3. I tested the server with empty database and empty Django site when 
>I build this hosting server. 
>4. I manually migrated MySQL database to Postgres using pgAdmin tool 
>and ran 'loaddata'command in virtualenv to load the data to Postgress. 
>5. 
>
>Now when I ran the following commands I see the same issue as reported 
>here. 
>6. 
>>
>>(vkenv) shami@ubuntu-wed-01:~$ ~/vkproject/manage.py makemigrations
>>No changes detected
>>(vkenv) shami@ubuntu-wed-01~$ ~/vkproject/manage.py migrate
>>Operations to perform:
>>  Apply all migrations: admin, auth, contenttypes, pages, sessions
>>Running migrations:
>>  Applying contenttypes.0001_initial...Traceback (most recent call 
>>last):
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>  
>>line 82, in _execute
>>return self.cursor.execute(sql)
>>psycopg2.errors.DuplicateTable: relation "django_content_type" 
>>already exists
>>
>>The above exception was the direct cause of the following exception:
>>
>>Traceback (most recent call last):
>>  File "/home/shami/vkproject/manage.py", line 21, in 
>>main()
>>  File "/home/shami/vkproject/manage.py", line 17, in main
>>execute_from_command_line(sys.argv)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>  
>>line 381, in execute_from_command_line
>>utility.execute()
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>  
>>line 375, in execute
>>self.fetch_command(subcommand).run_from_argv(self.argv)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>  
>>line 323, in run_from_argv
>>self.execute(*args, **cmd_options)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>  
>>line 364, in execute
>>output = self.handle(*args, **options)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>  
>>line 83, in wrapped
>>res = handle_func(*args, **kwargs)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/commands/migrate.py",
>>  
>>line 234, in handle
>>fake_initial=fake_initial,
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>  
>>line 117, in migrate
>>state = self._migrate_all_forwards(state, plan, full_plan, 
>>fake=fake, fake_initial=fake_initial)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>  
>>line 147, in _migrate_all_forwards
>>state = self.apply_migration(state, migration, fake=fake, 
>>fake_initial=fake_initial)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>  
>>line 245, in apply_migration
>>state = migration.apply(state, schema_editor)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/migration.py",
>>  
>>line 124, in apply
>>operation.database_forwards(self.app_label, schema_editor, 
>>old_state, project_state)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/operations/models.py",
>>  
>>line 92, in database_forwards
>>schema_editor.create_model(model)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>  
>>line 307, in create_model
>>self.execute(sql, params or None)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>  
>>line 137, in execute
>>cursor.execute(sql, params)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>  
>>line 99, in execute
>>return super().execute(sql, params)
>>  File 
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>  
>>line 67, in execute
>>return self._execute_with_wrappers(sql, params, 

Re: Styling in Django

2019-12-04 Thread Akshay Deep
https://vacancyjobalert.com/”>VacancyJobAlert.Com

On Tuesday, December 3, 2019 at 7:16:34 PM UTC+5:30, marshalx4 wrote:
>
> How can I use Materialize CSS with Django? Seems like bootstrap is the 
> only framework that works with little to no hassle at all.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/70b29d0a-0eb4-4edb-9a5d-b76c9cc62758%40googlegroups.com.


Re: Unable to create a new virtual environement 'test'

2019-12-04 Thread Suraj Thapa FC
Wrote the following
Virtualenv test

On Wed, 4 Dec 2019, 4:57 pm Hima Bindu chowdary, 
wrote:

> I had created a virtualwrapper then had to create a virtual env called test
> when i ran the following command i got this :
>
> C:\Users\User>py -m pip install virtualenv test
> Requirement already satisfied: virtualenv in
> c:\users\user\appdata\local\programs\python\python38\lib\site-packages
> (16.7.8)
> ERROR: Could not find a version that satisfies the requirement test (from
> versions: none)
> ERROR: No matching distribution found for test
>
> I need to create a virtual environment but it says it is already present..
>
> --
> 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/48edad31-e33c-4460-91c0-f80b7e6adce4%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/CAPjsHcFP48cOdtgttMSRUTAua2mJsKnEq_-CNY15-tqx9B5hag%40mail.gmail.com.


Re: Exception in thread django-main-thread:

2019-12-04 Thread Integr@te System
Hi Issuer,

plz check existent of userdetailsu module in newapp/form.py and add newapp
before .form in views.py file




On Wed, Dec 4, 2019, 18:27 Michael Mathonsi  wrote:

> Please help with resolving my application, i have setup the environment
> and almost finished my application when the system decided out  of knowhere
> to generate the following errors and im due for presentation by tomorrow.
>
>
>
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 917, in
> _bootstrap_inner
> self.run()
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 865, in run
> self._target(*self._args, **self._kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\autoreload.py",
> line 54, in wrapper
> fn(*args, **kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py",
> line 117, in inner_run
> self.check(display_num_errors=True)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 390, in check
> include_deployment_checks=include_deployment_checks,
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 377, in _run_checks
> return checks.run_checks(**kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\registry.py",
> line 72, in run_checks
> new_errors = check(app_configs=app_configs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 40, in check_url_namespaces_unique
> all_namespaces = _load_all_namespaces(resolver)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 57, in _load_all_namespaces
> url_patterns = getattr(resolver, 'url_patterns', [])
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 584, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 577, in urlconf_module
> return import_module(self.urlconf_name)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newproject\urls.py", line 21, in 
> path('', include('newapp.url')),
>   File "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\conf.py",
> line 34, in include
> urlconf_module = import_module(urlconf_module)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\url.py", line 2, in 
> from . import views
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\views.py", line 6, in 
> from .form import userdetailsum, userdetailsu, userdetailsup,
> DateForm, formtrend
> ImportError: cannot import name 'userdetailsu' from 'newapp.form'
> (C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\form.py)
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d84b8a6f-5917-4080-abdd-30f41cd4826d%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 

Re: Fixtures for django auth groups

2019-12-04 Thread Arulselvam K
I solved the issue, Thanks lot Tim Grahma.
Regards,
Arul

On Tue, 3 Dec 2019 at 22:41, Tim Graham  wrote:

> Take a look at
> https://docs.djangoproject.com/en/stable/howto/initial-data/.
>
> On Tuesday, December 3, 2019 at 10:31:01 AM UTC-5, Arulselvam K wrote:
>>
>> I want to create fixtures for auth groups to get some preloaded auth
>> groups. Kindly educate me on how to create fixtures fixtures for built in
>> django models
>>
>> Thanks and regards,
>> Arulselvam K
>>
> --
> 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/b36c369b-1c17-44a3-893f-87c364c0a076%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/CACMydi4_iOCkrfxJozEh4-tZYsAmjiD9umgJSt_dzSQ24dCh2g%40mail.gmail.com.


Re: Django 3.0 Released.

2019-12-04 Thread Andréas Kühne
So your question is if you should use LTS versions or use the latest
blazing version.

The answer is of course - it depends.

Do you see anything in django 3 that you need to have? In that case -
upgrade to django 3. If you only want to make sure that your application is
safe and secure and you don't need the bleeding edge functionality - keep
with the LTS:es.

It also depends on your application cycle. I currently have 2 projects
running - one is a commercial ecommerce platform. The other is a platform
for course administration. Both have completely different requirements on
technical functionality from django. On the ecommerce site we are running
on LTS versions, on the other site we are running with the latest version
of django.

I think the most important thing is to make sure that you have a secure
site regardless - so if you run the lts versions, you need to update as
soon as the next LTS comes out. And the same goes for the other versions as
well - update all the time in that case.

Regards,

Andréas


Den mån 2 dec. 2019 kl 22:18 skrev o1bigtenor :

> On Mon, Dec 2, 2019 at 6:18 AM Carlton Gibson 
> wrote:
> >
> > Django 3.0 is now available.
> >
> > https://www.djangoproject.com/weblog/2019/dec/02/django-3-released/
> >
> > With the release of Django 3.0, Django 2.2 has reached the end of
> > mainstream support. The final minor bug fix release (which is also a
> > security release), 2.2.8, was issued today. Django 2.2 is an LTS release
> and
> > will receive security and data loss fixes until April 2022. All users are
> > encouraged to upgrade before then to continue receiving fixes for
> > security issues.
> >
> > See the downloads page [1] for a table of supported versions and the
> > future release schedule.
> >
> > [1] https://www.djangoproject.com/download/#supported-versions
> >
> Greetings
>
> Thank you - - - -interesting news!
>
> I'm a little confused though - - - - I have, at least in many things
> so far that I've used,
> software I mean, tended to move from one long term service version to the
> next.
> Yet - - - Django is different - - - - it is suggested that I leave a
> long term version
> for a short term version, which will itself be followed by a short
> term version, and then
> after another period of time there will be a long term service
> version. Shortly after
> that long term service version has been reached, if the pattern used
> for the transition
> from version 2 to 3, version 4 will be offered.
>
> So - - - - what gives the best long term stability of function for use
> of Django?
>
> 1. forget long term service versions and expect to revise you code
> every 6 to 8 months
> 2. use LTS code but using it until the release of the next major
> version means that
>   interesting advancements again mean a relentless pattern of revision
> 3. don't worry about LTS and write the code and get the application to
> work well and
>  hope that I can hold things working without major security issues
> until its worth
>  redoing the application.
>
> I'm starting to think that option #3 is looking more attractive.
>
> 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/CAPpdf58DU9XPYM-FOJ1%3DSy-PObNDJ%2B2Xw8hk3sr9BxTdFYcDjg%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/CAK4qSCefG34_4peufofo%3DDRk4p0JP%2BNTFYm6t%3DnghmcYVuUzew%40mail.gmail.com.


Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-04 Thread Integr@te System
Hi Issuer,
Plz show result with errors.

Tks.

On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> I am in the process of developing a small project using django rest
> framework, and within that requirement, I need to list every table in one
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on
> my web page. But other than that, when I am trying to add other APIViews,
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that
> didn't work. 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/1895937763.9174288.1575484276499%40mail.yahoo.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/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ75Q%40mail.gmail.com.


Unable to create a new virtual environement 'test'

2019-12-04 Thread Manjunatha C
Python -m venv envname

Try with this command

-- 
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/ecfbbe3b-dda3-435e-9b29-5a7a8937ea69%40googlegroups.com.


what tool will be using for Continues integration in python projects??

2019-12-04 Thread Manjunatha C
Jenkins are using for CI in java projects. what tool will be using for python 
projects to Continues integration??

-- 
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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%40googlegroups.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
Jenkins

On Wed, 4 Dec 2019, 17:54 Manjunatha C,  wrote:

> Jenkins are using for CI in java projects. what tool will be using for
> python projects to Continues integration??
>
> --
> 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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%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/CAO_yRT3W3jhbscz_psqTmnZGnsm1RSjma_J5wiz-vkkUsh%2B75Q%40mail.gmail.com.


what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

-- 
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/2f2e5c78-509e-4a2e-8c61-7b10edb4c08a%40googlegroups.com.


Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-04 Thread 'Amitesh Sahay' via Django users
Hi,
There is no error. But based on the urls settings I could see the "QuizList" 
output to my web page. Other than that, other serializers are not being 
displayed there. Below is the serializers.py 
from rest_framework import serializers
from .models import Quiz, Question, QuizTakers, Answer, User
from django.contrib.auth import authenticate, login


class userSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = 'email'


class QuizSerializer(serializers.ModelSerializer):
class Meta:
model = Quiz()
fields = ('name', 'questions_count', 'description', 'created', 
'roll_out')

def createQuestion(self, validated_data):
return Question().objects.create_question(**validated_data)


class AnswerSerializer(serializers.ModelSerializer):
class Meta:
model = Answer()
fields = ('question', 'text', 'is_correct')


class QuestionSerializer(serializers.ModelSerializer):

class Meta:
model = Question()
fields = ('quiz', 'label', 'order')


class QuizTakerSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = QuizTakers()
fields = ('user', 'quiz', 'correct_answers', 'completed', 'timestamp')



Regards,
Amitesh 

On Thursday, 5 December, 2019, 12:19:34 am IST, Integr@te System 
 wrote:  
 
 Hi Issuer, Plz show result with errors.
Tks.
On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users 
 wrote:

I am in the process of developing a small project using django rest framework, 
and within that requirement, I need to list every table in one single page. 
Below is the code snippet.
class QuizList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Quiz.objects.all()
return Response({'quiz': queryset})


class AnswerList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Answer.objects.all()
return Response({'answer': queryset})


class QuestionList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Question.objects.all()
return Response({'question': queryset})
In the above snippet, I am able to list the very first class "QuizView" on my 
web page. But other than that, when I am trying to add other APIViews, they are 
simply not happening. Below is the HTML template:




Admin View



{% for quizez in quiz %}

{{ quizez.name }}
{% endfor %}




{% for questions in question %}
{{ questions.label }}
{% endfor %}



{% for answers in answer %}
{{ answer.text }}
{% endfor %}




I tried to put all the for loops within a single "ul", but even that didn't 
work. 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/1895937763.9174288.1575484276499%40mail.yahoo.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/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ75Q%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/2093858531.9194413.1575486878110%40mail.yahoo.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

On Wed, 4 Dec 2019, 18:36 DANIEL URBANO DE LA RUA, 
wrote:

> Jenkins
>
> On Wed, 4 Dec 2019, 17:54 Manjunatha C, 
> wrote:
>
>> Jenkins are using for CI in java projects. what tool will be using for
>> python projects to Continues integration??
>>
>> --
>> 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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%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/CAO_yRT2UDkR8Bp14ETv-SOVqNwXOS_L%3DuFk%3DFAch044_%2B95PYw%40mail.gmail.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread Integr@te System
Hi,
Pythonist(a) -pybuilder.

On Thu, Dec 5, 2019, 00:52 DANIEL URBANO DE LA RUA 
wrote:

> You can use jenkins with whatever language you use
>
> --
> 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/ac939c48-a145-4d55-9a26-443151275676%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/CAP5HUWqTvHzgjxgqES63OE49yt6_Gwp3ThwYnVJsUT9VGrtSww%40mail.gmail.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread 'Amitesh Sahay' via Django users
GIT, JENKINS, Travis CI, bitbucket. Jeera.


Regards,
Amitesh 

On Wednesday, 4 December, 2019, 11:43:45 pm IST, Integr@te System 
 wrote:  
 
 Hi,Pythonist(a) -pybuilder.
On Thu, Dec 5, 2019, 00:52 DANIEL URBANO DE LA RUA  
wrote:

You can use jenkins with whatever language you use

-- 
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/ac939c48-a145-4d55-9a26-443151275676%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/CAP5HUWqTvHzgjxgqES63OE49yt6_Gwp3ThwYnVJsUT9VGrtSww%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/792737415.9217546.1575484452404%40mail.yahoo.com.


Re: Link a .css to a Html template

2019-12-04 Thread Leó Horváth
Hi Aline,
THANK YOU VERY MUCH, you solved my 3 day dilemma, and thank you for
everyone who tried to help, you guys are awesome!
Thanks a lot,
Leó


Aline Balogh  ezt írta (időpont: 2019. dec. 4., Sze,
12:27):

> Hi Léo.
>
> Remove the # from the html class attribute .
>
> 
>
>
> Em domingo, 1 de dezembro de 2019 22:27:34 UTC-3, Leó Horváth escreveu:
>>
>> Hi guys, I am experiencing an error while trying to Link a .css file to a
>> Html template of one of my Views. What is the correct way to do 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/54f6f836-1590-470f-8b3d-1a470f7977a4%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/CAJBcW0ygUnS1OCM7b4b5qK%2B%3DbED5nuaOjr7E6U8K4AyznpsgUw%40mail.gmail.com.


reg: How to call multiple APIView in one single web page as a list of items?

2019-12-04 Thread 'Amitesh Sahay' via Django users
I am in the process of developing a small project using django rest framework, 
and within that requirement, I need to list every table in one single page. 
Below is the code snippet.
class QuizList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Quiz.objects.all()
return Response({'quiz': queryset})


class AnswerList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Answer.objects.all()
return Response({'answer': queryset})


class QuestionList(APIView):
renderer_classes = [TemplateHTMLRenderer]
template_name = 'adminView.html'

def get(self, request):
queryset = Question.objects.all()
return Response({'question': queryset})
In the above snippet, I am able to list the very first class "QuizView" on my 
web page. But other than that, when I am trying to add other APIViews, they are 
simply not happening. Below is the HTML template:




Admin View



{% for quizez in quiz %}

{{ quizez.name }}
{% endfor %}




{% for questions in question %}
{{ questions.label }}
{% endfor %}



{% for answers in answer %}
{{ answer.text }}
{% endfor %}




I tried to put all the for loops within a single "ul", but even that didn't 
work. 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/1895937763.9174288.1575484276499%40mail.yahoo.com.


what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

-- 
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/ac939c48-a145-4d55-9a26-443151275676%40googlegroups.com.


Adding drop down selection to my form and filter

2019-12-04 Thread Patrick Carra
Hello I am working on adding a drop down selection to my filters so far I 
am not having any luck. I recently changed my views.py to use a class 
instead of a def for this.  Now when I use filter.form it shows every field 
in my models.  It should only show the following fields circuitid, 
bandwidth, region, carrier, status, segmentname, and mrcnew  and each 
should be a dynamically generated drop down list from the respective model 
field only displaying distinct values.  I tried creating my own form with a 
function that would return these values using choicefield but I can't get 
this form to come into the template.  A point in the right direction would 
be much appreciated!

class Circuitinfotable(models.Model):
id1 = models.IntegerField(blank=True, null=True)
pid = models.CharField(max_length=255, blank=True, null=True)
circuitid = models.CharField(primary_key=True,max_length=255, 
blank=False, null=False)
bandwidth = models.CharField(max_length=255, blank=True, null=True)
region = models.CharField(max_length=255, blank=True, null=True)
bw = models.IntegerField(blank=True, null=True)
tableaupathname = models.CharField(max_length=255, blank=True, 
null=True)
handoffalocaddress = models.CharField(max_length=255, blank=True, 
null=True)
handoffaloccity = models.CharField(max_length=255, blank=True, 
null=True)
handoffalocst = models.CharField(max_length=255, blank=True, null=True)
alocationaddress = models.CharField(max_length=255, blank=True, 
null=True)
alocationcity = models.CharField(max_length=255, blank=True, null=True)
alocst = models.CharField(max_length=255, blank=True, null=True)
handoffzlocaddress = models.CharField(max_length=255, blank=True, 
null=True)
carrier = models.CharField(max_length=255, blank=True, null=True)
handoffzloccity = models.CharField(max_length=255, blank=True, 
null=True)
handoffzlocst = models.CharField(max_length=255, blank=True, null=True)
zlocationaddress = models.CharField(max_length=255, blank=True, 
null=True)
zlocationcity = models.CharField(max_length=255, blank=True, null=True)
zlocst = models.CharField(max_length=255, blank=True, null=True)
segmentid = models.CharField(max_length=255, blank=True, null=True)
segmenttype = models.CharField(max_length=255, blank=True, null=True)
status = models.CharField(max_length=255, blank=True, null=True)
purpose = models.CharField(max_length=255, blank=True, null=True)
installdate = models.DateField(blank=True, null=True)
termdate = models.DateField(blank=True, null=True)
termlengthmos = models.IntegerField(blank=True, null=True)
legacy = models.CharField(max_length=255, blank=True, null=True)
installciopsticket = models.CharField(max_length=255, blank=True, 
null=True)
retermciopsticket = models.CharField(max_length=255, blank=True, 
null=True)
discociopsticket = models.CharField(max_length=255, blank=True, 
null=True)
notes = models.CharField(max_length=255, blank=True, null=True)
kma = models.CharField(max_length=255, blank=True, null=True)
group = models.IntegerField(blank=True, null=True)
cktidkey = models.IntegerField(blank=True, null=True)
visiolink = models.CharField(max_length=255, blank=True, null=True)
latestjiraticket = models.CharField(max_length=255, blank=True, 
null=True)
disconnectdate = models.DateField(blank=True, null=True)
segmentname = models.CharField(max_length=255, blank=True, null=True)
mrcnew = models.TextField(blank=True, null=True)  # This field type is 
a guess.
termyrs = models.IntegerField(blank=True, null=True)
monthbudget = models.IntegerField(blank=True, null=True)
monthdisco = models.IntegerField(blank=True, null=True)
mrcold = models.TextField(blank=True, null=True)  # This field type is 
a guess.
kmz = models.CharField(max_length=255, blank=True, null=True)

def __str__(self):
return self

class Meta:
managed = False
db_table = 'circuitinfotable'



My filter.py code is below:

from .models import Circuitinfotable
from .forms import CircuitForm
import django_filters

class CircuitInfoFilter(django_filters.FilterSet.form):
class Meta:
model=Circuitinfotable
#fields = ['circuitid', 'bandwidth', 'region', 'carrier', 'status', 
'segmentname', 'mrcnew']
form=CircuitForm


My forms.py is below:
from django import forms
from .models import Circuitinfotable

def getList(item_list, keyValue):
valueList=[]
for each in item_list:
valueList.append(each[keyValue])
return valueList

class CircuitForm(forms.Form):
class Meta:
model = Circuitinfotable
fields = ('circuitid', 'bandwidth', 'region', 'carrier', 'status', 
'segmentname', 'mrcnew')

region_dict=Circuitinfotable.objects.values('region').distinct('region')

def __init__(self, *args, **kwargs):
super(CircuitForm, self).__init__(*args, 

Re: django.db.utils.ProgrammingError: relation "django_content_type" already exists

2019-12-04 Thread Ram
Hello Naveen,

I already tried that before posting my last update but the result is the
same though. Here I'm pasting the result. This is a total blocker to me. I
appreciate if someone can unblock me.

$ python manage.py migrate --fake-initial
> Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, pages, sessions
> Running migrations:
>   Applying contenttypes.0002_remove_content_type_name...Traceback (most
> recent call last):
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 84, in _execute
> return self.cursor.execute(sql, params)
> psycopg2.errors.UndefinedColumn: column "name" of relation
> "django_content_type" does not exist
>
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 381, in execute_from_command_line
> utility.execute()
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 375, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
> line 323, in run_from_argv
> self.execute(*args, **cmd_options)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
> line 364, in execute
> output = self.handle(*args, **options)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
> line 83, in wrapped
> res = handle_func(*args, **kwargs)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/commands/migrate.py",
> line 234, in handle
> fake_initial=fake_initial,
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
> line 117, in migrate
> state = self._migrate_all_forwards(state, plan, full_plan, fake=fake,
> fake_initial=fake_initial)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
> line 147, in _migrate_all_forwards
> state = self.apply_migration(state, migration, fake=fake,
> fake_initial=fake_initial)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
> line 245, in apply_migration
> state = migration.apply(state, schema_editor)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/migration.py",
> line 124, in apply
> operation.database_forwards(self.app_label, schema_editor, old_state,
> project_state)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/operations/fields.py",
> line 249, in database_forwards
> schema_editor.alter_field(from_model, from_field, to_field)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
> line 535, in alter_field
> old_db_params, new_db_params, strict)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/postgresql/schema.py",
> line 124, in _alter_field
> new_db_params, strict,
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
> line 685, in _alter_field
> params,
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
> line 137, in execute
> cursor.execute(sql, params)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 99, in execute
> return super().execute(sql, params)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 67, in execute
> return self._execute_with_wrappers(sql, params, many=False,
> executor=self._execute)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 76, in _execute_with_wrappers
> return executor(sql, params, many, context)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 84, in _execute
> return self.cursor.execute(sql, params)
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/utils.py",
> line 89, in __exit__
> raise dj_exc_value.with_traceback(traceback) from exc_value
>   File
> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
> line 84, in _execute
> return self.cursor.execute(sql, params)
> django.db.utils.ProgrammingError: column "name" of relation
> "django_content_type" does not exist
>


On Wed, Dec 4, 2019 at 4:27 AM Naveen  wrote:

> Hi Ram,
>
>
> 

How do I populate a table with data from a list file?

2019-12-04 Thread Dick Arnold
I have created a table by using css examples (similar to a spread sheet).  
However, all the examples that I have found populate the table manually  by 
typing td entries in the html file.  How can i accomplish this with 
django/Python code?  I have looked everywhere I can find, but no luck so 
far.
I had expected to find something like a FOR loop where I could simply point 
it to the list file and it would create the td entries automatically.  My 
data has a fixed number of columns, but a highly variable number of rows.

-- 
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/1cb59233-af14-4dda-8aa2-74e663e59dd2%40googlegroups.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread SUMIT KUMAR
PyCharm

*Sumi_Oneness*
about.me/sumitoneness


[image: Mailtrack]

Sender
notified by
Mailtrack

12/04/19,
10:24:46 PM

On Wed, Dec 4, 2019 at 10:24 PM Manjunatha C 
wrote:

> Jenkins are using for CI in java projects. what tool will be using for
> python projects to Continues integration??
>
> --
> 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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%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/CAG%3DDiiMmr_M0T1s8%3D0Nf%2BK5YdKy8t9VcFdGBg__76D6zuYcF9A%40mail.gmail.com.


Re: good day guys

2019-12-04 Thread Tosin Ayoola
buenos días, gracias, sí, tengo un súper usuario creado, pero no puedo
ejecutar ningún comando que use manage.py
Gracias


On Thu, Dec 5, 2019 at 1:49 AM jose angel encinas ramos <
encinasj.an...@gmail.com> wrote:

> Buenas tardes, ya creaste un super usuario en django?,
> creo que te hace falta correr python manage.py makemigrations
> despues python manage.py migrate
>
> intenta eso
>
> El mié., 4 dic. 2019 a las 17:10, Tosin Ayoola ()
> escribió:
>
>> halo guys, i'm working on a school management system that has multi user
>> (student and staffs), i've created the model, views and form but i'm
>> getting this error which i'm not familiar with. i'll b glad if anyone can
>> help out
>> below is the view, model, form and the err
>>
>> #forms
>> class StudentSignupForm(UserCreationForm):
>> class Meta(UserCreationForm.Meta):
>> model = UserRole
>> @transaction.atomic
>> def save(self):
>> user = super().save(commit=False)
>> user.is_student = True
>> if commit:
>> user.save()
>> return user
>>
>> class StaffSignupForm(UserCreationForm):
>> class Meta(UserCreationForm.Meta):
>> model = UserRole
>> @transaction.atomic
>> def save(self):
>> user = super().save(commit=False)
>> user.is_staff = True
>> if commit:
>> user.save()
>> return user
>>
>>
>> #views
>> class StudentSignUp(CreateView):
>> model = UserRole
>> form_class = StudentSignupForm
>> template_name = 'register/signup.html'
>>
>> def get_context_data(self, **kwargs):
>> kwargs['user_type'] = 'student'
>> return super().get_context_data(**kwargs)
>> def student_valid_form(self, student_form):
>> user = student_form.save()
>> login(self.request, user)
>> return redirect('students:student_index')
>>
>> class StaffSignup(CreateView):
>> model = UserRole
>> form_class = StaffSignupForm
>> template_name = 'register/signup.html'
>>
>> def get_context_data(self, **kwargs):
>> kwargs['user_type'] = 'staff'
>> return super().get_context_data(**kwargs)
>> def staff_valid_form(self, staff_form):
>> user = staff_form.save()
>> login(self.request, user)
>> return redirect('staff:staff_index')
>>
>>
>>
>>
>> #models
>>
>> class UserRole(AbstractUser):
>> is_student = models.BooleanField(default=False)
>> is_staff = models.BooleanField(default=False)
>>
>> --
>> 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/CAHLKn71OveFEozZ7J7b%3DGMBgtB7LvurcoOgbDEiTQXX%3DO%3D9zTw%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> José Ángel Encinas
> Ing. Tecnologias de la informacion
>
>
> Cel:  6622267620  <6622267620>
>
>*   Never give up...*
>  
>
> --
> 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/CAF3iVr9wFwnFA8OqUJKJWvApxXydDAKc0LVoL32o_LTBtaqTOQ%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/CAHLKn73Bt%2BfX6%3DDL0ggcJtFFxNjzieo%2Biux_8XCj%2B0uVzJtkRw%40mail.gmail.com.


Re: good day guys

2019-12-04 Thread jose angel encinas ramos
Buenas tardes, ya creaste un super usuario en django?,
creo que te hace falta correr python manage.py makemigrations
despues python manage.py migrate

intenta eso

El mié., 4 dic. 2019 a las 17:10, Tosin Ayoola ()
escribió:

> halo guys, i'm working on a school management system that has multi user
> (student and staffs), i've created the model, views and form but i'm
> getting this error which i'm not familiar with. i'll b glad if anyone can
> help out
> below is the view, model, form and the err
>
> #forms
> class StudentSignupForm(UserCreationForm):
> class Meta(UserCreationForm.Meta):
> model = UserRole
> @transaction.atomic
> def save(self):
> user = super().save(commit=False)
> user.is_student = True
> if commit:
> user.save()
> return user
>
> class StaffSignupForm(UserCreationForm):
> class Meta(UserCreationForm.Meta):
> model = UserRole
> @transaction.atomic
> def save(self):
> user = super().save(commit=False)
> user.is_staff = True
> if commit:
> user.save()
> return user
>
>
> #views
> class StudentSignUp(CreateView):
> model = UserRole
> form_class = StudentSignupForm
> template_name = 'register/signup.html'
>
> def get_context_data(self, **kwargs):
> kwargs['user_type'] = 'student'
> return super().get_context_data(**kwargs)
> def student_valid_form(self, student_form):
> user = student_form.save()
> login(self.request, user)
> return redirect('students:student_index')
>
> class StaffSignup(CreateView):
> model = UserRole
> form_class = StaffSignupForm
> template_name = 'register/signup.html'
>
> def get_context_data(self, **kwargs):
> kwargs['user_type'] = 'staff'
> return super().get_context_data(**kwargs)
> def staff_valid_form(self, staff_form):
> user = staff_form.save()
> login(self.request, user)
> return redirect('staff:staff_index')
>
>
>
>
> #models
>
> class UserRole(AbstractUser):
> is_student = models.BooleanField(default=False)
> is_staff = models.BooleanField(default=False)
>
> --
> 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/CAHLKn71OveFEozZ7J7b%3DGMBgtB7LvurcoOgbDEiTQXX%3DO%3D9zTw%40mail.gmail.com
> 
> .
>


-- 
José Ángel Encinas
Ing. Tecnologias de la informacion


Cel:  6622267620  <6622267620>

   *   Never give up...*
 

-- 
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/CAF3iVr9wFwnFA8OqUJKJWvApxXydDAKc0LVoL32o_LTBtaqTOQ%40mail.gmail.com.