Re: Exception Value: (1048, "Column 'active_year_id' cannot be null")

2019-10-20 Thread Gil Obradors
Maybe you wan to fill this field, so last mail isn t the solution.

Can you paste the code of form? Html amb form py?

The user selects the year, or its automatically filled in view post class ?


El dl., 21 d’oct. 2019, 7:27, Gil Obradors  va
escriure:

> Hi!
> This field cant be null
>
> Add null=True, blank=True
> To parameters of active_year and solved
>
> El dg., 20 d’oct. 2019, 18:58, Rain  va
> escriure:
>
>> Hello Guys Hopefully someone can help me on this.! any help i appreciate
>> it.
>>
>> My Problem is This.. I do my research and still cant figure out what the
>> solution for this..!
>> i do Try alot of things but still cant get this right.
>> what i want is to populate the active_year_id. automatically when
>> submitting the form..
>> Thanks in Advance...
>>
>>
>> My Model Look Like This:
>> And My Views Look Like 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/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%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/CAK-JoTRHqit9_qNzw5yjDzAQW1MFWzo%2Braryi4vsXhAY-QaZ6g%40mail.gmail.com.


Re: Exception Value: (1048, "Column 'active_year_id' cannot be null")

2019-10-20 Thread Gil Obradors
Hi!
This field cant be null

Add null=True, blank=True
To parameters of active_year and solved

El dg., 20 d’oct. 2019, 18:58, Rain  va
escriure:

> Hello Guys Hopefully someone can help me on this.! any help i appreciate
> it.
>
> My Problem is This.. I do my research and still cant figure out what the
> solution for this..!
> i do Try alot of things but still cant get this right.
> what i want is to populate the active_year_id. automatically when
> submitting the form..
> Thanks in Advance...
>
>
> My Model Look Like This:
> And My Views Look Like 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/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%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/CAK-JoTQexJ0TzYHAw4X7zOoQ6Jn3qQYEvUbqtU2o-DAKndLLOw%40mail.gmail.com.


taggit in Django CBV

2019-10-20 Thread mohamed khaled


views.py
from django.shortcuts import render, get_object_or_404
from .models import Post
from django.views.generic import ListView
from taggit.models import Tag

def post_list(request, tag_slug=None):
object_list = Post.published.all()
tag = None 


if tag_slug:
tag = get_object_or_404(Tag, slug=tag_slug)
object_list = object_list.filter(tags__name__in=[tag]) # filter the 
all retrive objects depend on tags

urls.py
 path('', views.post_list, name='post_list'),
 path('tag//',views.post_list, name='post_list_by_tag'),




how can I convert this code into CBV and the results are when I click on 
any tags in website show me all posts that related to this tag in my DB 
this code above does that but I want to use CBV instead of FBV 










-- 
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/988e7873-6648-4d04-81a3-a66947501e10%40googlegroups.com.


Exception Value: (1048, "Column 'active_year_id' cannot be null")

2019-10-20 Thread Rain
Hello Guys Hopefully someone can help me on this.! any help i appreciate it.

My Problem is This.. I do my research and still cant figure out what the 
solution for this..!
i do Try alot of things but still cant get this right. 
what i want is to populate the active_year_id. automatically when 
submitting the form..
Thanks in Advance...


My Model Look Like This:
And My Views Look Like 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/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%40googlegroups.com.


Progressive Web apps. Where to put Service Workers and Manifest.json

2019-10-20 Thread Mirza Saffan
HI. I am trying to build a django progressive web app and wondering where 
to put my service worker.js file. Note I wan't to set scope that every 
app(page) can access.

-- 
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/a96e5003-33ce-4f66-a96f-804439b31624%40googlegroups.com.


Re: Complete book

2019-10-20 Thread V S V Narsimha Murthy
Thanks a lot for shaing the book. Really appreciate it.

Best Regards,

On Sat, Oct 19, 2019 at 7:36 PM ISAAC NELSON S.B. KARGBO <
insbkar...@njala.edu.sl> wrote:

> Try this one out
>
> On Sat, Oct 19, 2019, 13:47 Md Nayem Tushar  wrote:
>
>> Have any easy and properly complete book in django? pls ans me
>>
>> --
>> 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/b523ac3b-9aad-4c1b-a4f9-d9310b6f69da%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/CAA4EwCsFAkvbZ99z5aT9jX-R849Gkxg%3DTbSaSRvE-qUShgOL6w%40mail.gmail.com
> 
> .
>


-- 
Thanks
Narasimha Murthy

-- 
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/CAE%3D5Kz4iWorhzhdTodQqufJTg5V3CE3u2Bq69XRqvPA--dz-HA%40mail.gmail.com.


Re: AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
During handling of the above exception, another exception occurred:

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 "C:\Python35\lib\site-packages\django\core\management\__init__.py", 
line 381, in execute_from_command_line
utility.execute()
  File "C:\Python35\lib\site-packages\django\core\management\__init__.py", 
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python35\lib\site-packages\django\core\management\base.py", line 
323, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"C:\Python35\lib\site-packages\django\core\management\commands\runserver.py", 
line 60, in execute
super().execute(*args, **options)
  File "C:\Python35\lib\site-packages\django\core\management\base.py", line 
364, in execute
output = self.handle(*args, **options)
  File 
"C:\Python35\lib\site-packages\django\core\management\commands\runserver.py", 
line 95, in handle
self.run(**options)
  File 
"C:\Python35\lib\site-packages\django\core\management\commands\runserver.py", 
line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
598, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
583, in start_django
reloader.run(django_main_thread)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
301, in run
self.run_loop()
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
307, in run_loop
next(ticker)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
347, in tick
for filepath, mtime in self.snapshot_files():
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
363, in snapshot_files
for file in self.watched_files():
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
262, in watched_files
yield from iter_all_python_module_files()
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
103, in iter_all_python_module_files
return iter_modules_and_files(modules, frozenset(_error_files))
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 
124, in iter_modules_and_files
if getattr(module, '__spec__', None) is None:
SystemError:  returned a result with an error set



On Sunday, October 20, 2019 at 8:27:48 PM UTC+5:30, Abhishek Sharma wrote:
>
> I'm using Django and while run code getting below error, please help out 
> on it
>
> AttributeError: cffi library '_constant_time' has no function, constant or 
> global variable named '__spec__'
>

-- 

















The information in this
e-mail and any attachments is 
confidential and may be legally privileged. It is
intended solely for the 
addressee or addressee's. If you are not an intended
recipient, please 
delete the message and any attachments and notify the sender
of 
nondelivery. Any use or disclosure of the contents of either is 
unauthorised
and may be unlawful. All liability for viruses is excluded to 
the fullest
extent permitted by law. Any views expressed in this message 
are those of the
individual sender, except where the sender states them, 
with requisite
authority, to be those of the organisation.

-- 
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/e98263bd-05b9-4d7c-bbc7-bd1ebf9a4a83%40googlegroups.com.


AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
I'm using Django and while run code getting below error, please help out on 
it

AttributeError: cffi library '_constant_time' has no function, constant or 
global variable named '__spec__'

-- 

















The information in this
e-mail and any attachments is 
confidential and may be legally privileged. It is
intended solely for the 
addressee or addressee's. If you are not an intended
recipient, please 
delete the message and any attachments and notify the sender
of 
nondelivery. Any use or disclosure of the contents of either is 
unauthorised
and may be unlawful. All liability for viruses is excluded to 
the fullest
extent permitted by law. Any views expressed in this message 
are those of the
individual sender, except where the sender states them, 
with requisite
authority, to be those of the organisation.

-- 
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/f6cfbeac-cf93-4d4c-b1bc-50a2cc01dd7b%40googlegroups.com.