Re: New language adding error('Unknown language code si.')

2018-08-30 Thread lakshitha kumara
Hello Bazan

you can be fixed this issue this override Django locale file. setting up 
your settings.py file like the below.

EXTRA_LANG_INFO = {
'si': {
'bidi': False,
'code': 'si',
'name': 'Sinhala',
'name_local': 'සිංහල',
},
'en': {
'bidi': False,
'code': 'en',
'name': 'English',
'name_local': 'English',
},
}
LANG_INFO = dict(EXTRA_LANG_INFO.items())
django.conf.locale.LANG_INFO = LANG_INFO

LANGUAGE_CODE = 'en'
LANGUAGES = [
('en', _('English')),
('si', _('Sinhala')),
]

This one fixed the issue. should remember to add all language details your 
using to EXTRA_LANG_INFO variable 

Thanks

On Thursday, August 9, 2018 at 9:01:58 PM UTC+5:30, Deniz Bazan wrote:
>
> Hi Kumara, did you  find a solution for your question, because i have same 
> problem. 
>
> Am Montag, 30. April 2018 14:04:01 UTC+2 schrieb lakshitha kumara:
>>
>> Hello Jason,
>>
>> *Thanks you for your reply but **unfortunately** that example not 
>> working any more with django 2 and python 3 .*
>>
>>
>> *Thanks*
>> On Monday, April 30, 2018 at 7:47:45 AM UTC+5:30, lakshitha kumara wrote:
>>>
>>> Hello Guys 
>>>
>>> I added new language to django . language called Sinhala. My code is 
>>> look like this.
>>>
>>> On settings page 
>>>
>>> LANGUAGE_CODE = 'en'
>>> LANGUAGES = [
>>> ('si', _('Sinhala')),
>>> ('en', _('English')),
>>> ]
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>> LOCALE_PATHS = (
>>> os.path.join(os.path.dirname(__file__), "../locale"),
>>> )
>>>
>>> On locale folder 
>>>
>>> __init__.py
>>>
>>> LANG_INFO = {
>>> 'si': {
>>> 'bidi': False,
>>> 'code': 'si',
>>> 'name': 'Sinhala',
>>> 'name_local': 'Sinhala',
>>> },
>>> }
>>> I ran this command after that 
>>>
>>> manage.py makemessages -l si
>>> manage.py compilemessages
>>>
>>>
>>> When i goes to admin URL with sinhala language its working fine i try get 
>>> all supported language give this error 
>>>
>>> {% csrf_token %}
>>> 
>>> 
>>> {% get_current_language as LANGUAGE_CODE %}
>>> {% get_available_languages as LANGUAGES %}
>>> {% get_language_info_list for LANGUAGES as languages %}
>>> {% for language in languages %}
>>> >> LANGUAGE_CODE %} selected{% endif %}>
>>> {{ language.name_local }} ({{ language.code }})
>>> 
>>> {% endfor %}
>>> 
>>> 
>>> 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/81891d8c-aec9-427f-8bc8-3cb35e387153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New language adding error('Unknown language code si.')

2018-08-30 Thread lakshitha kumara
Hello Deniz Bazan

*I fixed that issue with override Django locale file. you can try to 
setting up file this your setting.py file *

*EXTRA_LANG_INFO = {*
*'si': {*
*'bidi': False,*
*'code': 'si',*
*'name': 'Sinhala',*
*'name_local': 'සිංහල',*
*},*
*'en': {'bidi': False,'code': 'en','name': 
'English','name_local': 'English',},*
*}*

On Thursday, August 9, 2018 at 9:01:58 PM UTC+5:30, Deniz Bazan wrote:
>
> Hi Kumara, did you  find a solution for your question, because i have same 
> problem. 
>
> Am Montag, 30. April 2018 14:04:01 UTC+2 schrieb lakshitha kumara:
>>
>> Hello Jason,
>>
>> *Thanks you for your reply but **unfortunately** that example not 
>> working any more with django 2 and python 3 .*
>>
>>
>> *Thanks*
>> On Monday, April 30, 2018 at 7:47:45 AM UTC+5:30, lakshitha kumara wrote:
>>>
>>> Hello Guys 
>>>
>>> I added new language to django . language called Sinhala. My code is 
>>> look like this.
>>>
>>> On settings page 
>>>
>>> LANGUAGE_CODE = 'en'
>>> LANGUAGES = [
>>> ('si', _('Sinhala')),
>>> ('en', _('English')),
>>> ]
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>> LOCALE_PATHS = (
>>> os.path.join(os.path.dirname(__file__), "../locale"),
>>> )
>>>
>>> On locale folder 
>>>
>>> __init__.py
>>>
>>> LANG_INFO = {
>>> 'si': {
>>> 'bidi': False,
>>> 'code': 'si',
>>> 'name': 'Sinhala',
>>> 'name_local': 'Sinhala',
>>> },
>>> }
>>> I ran this command after that 
>>>
>>> manage.py makemessages -l si
>>> manage.py compilemessages
>>>
>>>
>>> When i goes to admin URL with sinhala language its working fine i try get 
>>> all supported language give this error 
>>>
>>> {% csrf_token %}
>>> 
>>> 
>>> {% get_current_language as LANGUAGE_CODE %}
>>> {% get_available_languages as LANGUAGES %}
>>> {% get_language_info_list for LANGUAGES as languages %}
>>> {% for language in languages %}
>>> >> LANGUAGE_CODE %} selected{% endif %}>
>>> {{ language.name_local }} ({{ language.code }})
>>> 
>>> {% endfor %}
>>> 
>>> 
>>> 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7175788d-456f-4535-b8b6-ab63839a1005%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django

2018-08-30 Thread Mike Dewhirst

On 30/08/2018 2:57 PM, Sai Pavan Kumar wrote:

Hi Friends,
       This is pavan working as a python developer. Is there any tool 
for reports generation in django admin or in templates(dynamic filters).


Try this ...

https://www.google.com.au/search?q=django-report-generator

I will be looking for one myself in the future so it would be good to 
hear what you think.








--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/317d153c-6a0f-4acd-aa27-5adcfa797219%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fe81068a-c997-8561-e3eb-e28c967979d6%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Ldap for django

2018-08-30 Thread Mike Dewhirst

On 30/08/2018 10:28 PM, soumyajit banerjee wrote:

Hi,

I am new in django python. I want to set up lodap authentication for 
my django app. Could you please help me. I am using python 3.6 with 
django 2.1

Try this ...

https://www.google.com/search?q=django-ldap=utf-8=utf-8=firefox-b-ab

I haven't looked at LDAP in ten years so I'm not able to recommend anything.



--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73bd4a1c-86d8-4763-90d7-b7415fec992c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6fd8f195-ae1b-0db1-6d6c-53aa73c5fbbd%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Doubts on One-To-One Field

2018-08-30 Thread vineeth sagar
Actually we would be needing that information most of the time, I will have
to see the which would be favourable and also of course django  has
documented  a doubt I have. I guess I have to rtfd more carefully. Thank
you for the information. You are a savior.



On Thu, Aug 30, 2018 at 10:54 PM Michael MacIntosh <
mmacint...@linear-systems.com> wrote:

> Hello,
>
> You are correct, creating a one-to-one relationship can potentially create
> more queries and hurt performance if you are not careful.  However it can
> also speed up certain queries if you don't need that information all of the
> time.
>
> If you are worried about the performance, I would suggest looking into
> select_related and prefetch_related.  Select related will grab your Users
> and user profiles in one query, which can be faster.  Prefetch related will
> fire off a query for each prefetched item, so one for users and one for
> user profiles, which isn't useful here.
>
> https://docs.djangoproject.com/en/2.1/ref/models/querysets/#select-related
>
> On 8/30/2018 9:08 AM, vineeth sagar wrote:
>
> def userProfile(models.Model):
>   user=models.OneToOneField(User,primary_key=True)
>"""
>Other stuff
>"""
> I can query it like this
> x = userProfile.objects.get(user__id=1)(Assuming this exists)
>
> when I do a connection.queries a single query is executed.When I try to
> access the username i.e x.user.username a new query is executed again when
> I see connection.queries? Is this the expected behavior. Wouldn't this be
> bad if we have huge databases? I have a scenario where some classes have
> common information and then they have different fields based on their
> classes. I have tested this OneToOneField by the above example and for some
> reason reluctant to use this because of the new query? The other approach
> would be abstract base classes where information stored in the db would be
> duplicated but the additional query can be saved I think any thoughts?
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/afb76a5c-30c7-45f0-8f8a-96e1d30e731c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> This message has been scanned for viruses and dangerous content by
> *E.F.A. Project* , and is believed to be
> clean.
> Click here to report this message as spam.
> 
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/84470c00-3058-3c5e-d947-1ee6e231f0b6%40linear-systems.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMMZq8OP6yAoB%3D%2BC%3Dv5bMKZuLDedLs-ORHiTk970G5DTgp9a%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Doubts on One-To-One Field

2018-08-30 Thread Michael MacIntosh

Hello,

You are correct, creating a one-to-one relationship can potentially 
create more queries and hurt performance if you are not careful.  
However it can also speed up certain queries if you don't need that 
information all of the time.


If you are worried about the performance, I would suggest looking into 
select_related and prefetch_related.  Select related will grab your 
Users and user profiles in one query, which can be faster.  Prefetch 
related will fire off a query for each prefetched item, so one for users 
and one for user profiles, which isn't useful here.


https://docs.djangoproject.com/en/2.1/ref/models/querysets/#select-related


On 8/30/2018 9:08 AM, vineeth sagar wrote:

def userProfile(models.Model):
      user=models.OneToOneField(User,primary_key=True)
       """
       Other stuff
       """
I can query it like this
x = userProfile.objects.get(user__id=1)(Assuming this exists)

when I do a connection.queries a single query is executed.When I try 
to access the username i.e x.user.username a new query is executed 
again when I see connection.queries? Is this the expected behavior. 
Wouldn't this be bad if we have huge databases? I have a scenario 
where some classes have common information and then they have 
different fields based on their classes. I have tested this 
OneToOneField by the above example and for some reason reluctant to 
use this because of the new query? The other approach would be 
abstract base classes where information stored in the db would be 
duplicated but the additional query can be saved I think any thoughts?

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afb76a5c-30c7-45f0-8f8a-96e1d30e731c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

--
This message has been scanned for viruses and dangerous content by
*E.F.A. Project* , and is believed to be 
clean.
Click here to report this message as spam. 
 



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84470c00-3058-3c5e-d947-1ee6e231f0b6%40linear-systems.com.
For more options, visit https://groups.google.com/d/optout.


Doubts on One-To-One Field

2018-08-30 Thread vineeth sagar
def userProfile(models.Model):
  user=models.OneToOneField(User,primary_key=True)
   """
   Other stuff
   """
I can query it like this 
x = userProfile.objects.get(user__id=1)(Assuming this exists)

when I do a connection.queries a single query is executed.When I try to 
access the username i.e x.user.username a new query is executed again when 
I see connection.queries? Is this the expected behavior. Wouldn't this be 
bad if we have huge databases? I have a scenario where some classes have 
common information and then they have different fields based on their 
classes. I have tested this OneToOneField by the above example and for some 
reason reluctant to use this because of the new query? The other approach 
would be abstract base classes where information stored in the db would be 
duplicated but the additional query can be saved I think any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afb76a5c-30c7-45f0-8f8a-96e1d30e731c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: WSGIRequest' object has no attribute 'name'

2018-08-30 Thread Andréas Kühne
Hi,

You are probably trying to get a name property from the request object.
Like this: request.name. And the request object usually doesn't have that
property.

Regards,

Andréas


Den tors 30 aug. 2018 kl 15:50 skrev sankar ardhas :

> Hi all ,
>   I have a error when i submit a form that WSGIRequest' object has
> no attribute 'name'. what is the solution for that.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1e650abb-e867-4b7a-86f9-82f5181d93f2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCdy0wSTM%3D-jCt%3DUsU5X4XYOMJg%3D3etJBKOgA_8FQRYEsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Language code twice in url

2018-08-30 Thread Kaelig
Hi,

I'm building a multi language website using i18n. I get the language in the 
url with i18n_patterns :

urlpatterns = i18n_patterns(path('/contact/', views.contact, name='contact'
), ...)


So I can access to my page with my-domain.com/en/contact/. But when I 
submit a form (or just try to acess it with a POST request), the url 
changes to my-domain.com*/en/en/*contact/ and then return a 404 error.

Any idea ?

Thanks for your help 
Kaelig

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb102058-6c29-4a14-b3f9-d4e699067614%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ldap for django

2018-08-30 Thread soumyajit banerjee
Hi,

I am new in django python. I want to set up lodap authentication for my 
django app. Could you please help me. I am using python 3.6 with django 2.1

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73bd4a1c-86d8-4763-90d7-b7415fec992c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customise Session Engine to distribute session data storage

2018-08-30 Thread Jason
https://github.com/adw0rd/django-multi-sessions

that's a non-working project but might give you some clues how to route 
sessions to different backends.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b67629db-8314-4a3d-accc-22510ab9d6af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customise Session Engine to distribute session data storage

2018-08-30 Thread Web Architect
We were actually cache_db but the sessions were consuming too much of DB. 
Hence, we want some sessions to be persistent in DB and some to be volatile 
and not stored in DB. Hence, I was looking for some way to achieve that. 
Like I want all login sessions to be stored in DB whereas rest in cache. 

On Tuesday, August 28, 2018 at 4:37:46 PM UTC+5:30, Jason wrote:
>
> Actually, there's nothing stopping you from using redis for cache and 
> session cache.  
>
> SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
>
> will use your cache to store sessions.  and if you use cached_db instead 
> of cache, that data will persist in redis and survive restarts.
>
> On Tuesday, August 28, 2018 at 1:40:38 AM UTC-4, Web Architect wrote:
>>
>> Hi Jason,
>>
>> Thanks for the response. Why not use Django's cache backend and setting 
>> cache alias to be redis?
>>
>> Thanks. 
>>
>> On Monday, August 27, 2018 at 5:01:08 PM UTC+5:30, Jason wrote:
>>>
>>> there's an option to use redis as a session backend, which would be 
>>> faster than using a regular db, even a well tuned mysql/postgres instance
>>>
>>> https://github.com/martinrusev/django-redis-sessions
>>>
>>> On Monday, August 27, 2018 at 3:52:06 AM UTC-4, Web Architect wrote:

 Hi,

 Right now we are using the Django cache_db session engine for 
 persistent sessions and also for some speed. Is it possible to customise 
 this where I can store some session data in cache and some in DB? For 
 example, I want to store all login sessions in DB and rest like some user 
 specific data - basket etc in cache .

 Looking forward to your support

 Thanks. 

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86d58e15-ff41-48e3-b534-2bf982d59531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Base Views error importing articles.models

2018-08-30 Thread augustine tharakan
If you are writing this code in the views.py belonging to the app as that 
of models.py you don't have to specify the app name. (try this - from 
.models import Articles)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ffebdc69-c002-46a8-baf4-c54464f3a5cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django

2018-08-30 Thread Sai Pavan Kumar
Hi Friends,
   This is pavan working as a python developer. Is there any tool for 
reports generation in django admin or in templates(dynamic filters).


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/317d153c-6a0f-4acd-aa27-5adcfa797219%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django and asynchronous tasks

2018-08-30 Thread Karim
On Thu, Nov 10, 2016 at 7:05 PM Alain Muls  wrote:

> Hi All
> [...]
>

I found celery very hard to work with. I liked a lot `
https://django-q.readthedocs.io/`. Give it a go.

-- 
Karim N. Gorjux

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


Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-30 Thread Tom Forbes
Ensure you are using MySQL 5.6 or higher:
https://docs.djangoproject.com/en/2.1/ref/databases/#version-support

To find your version run SELECT VERSION();



On 30 August 2018 at 05:37:52, Sonali Vighne (sonalivig...@gmail.com) wrote:

MySQL  version-  6.0.8-alpha-community

On Wednesday, August 29, 2018 at 7:26:09 PM UTC+5:30, Tom Forbes wrote:
>
> What version of MySQL are you running?
>
> On Tuesday, 28 August 2018 07:00:52 UTC+1, Sonali Vighne wrote:
>>
>> I will paste full error and stack trace here.
>>
>> This is occurred when I am giving “python manage.py migrate” command
>>
>>
>>
>> Operations to perform:
>>
>>   Apply all migrations: admin, auth, contenttypes, sessions
>>
>> Running migrations:
>>
>> Traceback (most recent call last):
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 83, in _execute*
>>
>> return self.cursor.execute(sql)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\mysql\base.py",
>> line 71, in execute*
>>
>> return self.cursor.execute(query, args)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>> line 250, in execute*
>>
>> self.errorhandler(self, exc, value)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\connections.py",
>> line 50, in defaulterrorhandler*
>>
>> raise errorvalue
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>> line 247, in execute*
>>
>> res = self._query(query)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>> line 411, in _query*
>>
>> rowcount = self._do_query(q)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>> line 374, in _do_query*
>>
>> db.query(q)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\connections.py",
>> line 277, in query*
>>
>> _mysql.connection.query(self, query)
>>
>> _mysql_exceptions.ProgrammingError: (1064, "You have an error in your
>> SQL syntax; check the manual that corresponds to your MySQL server version
>> for the right syntax to use near '(6) NOT NULL)' at line 1")
>>
>>
>>
>> The above exception was the direct cause of the following exception:
>>
>>
>>
>> Traceback (most recent call last):
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\migrations\recorder.py",
>> line 55, in ensure_schema*
>>
>> editor.create_model(self.Migration)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\schema.py",
>> line 312, in create_model*
>>
>> self.execute(sql, params or None)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\schema.py",
>> line 133, in execute*
>>
>> cursor.execute(sql, params)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 100, in execute*
>>
>> return super().execute(sql, params)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 68, in execute*
>>
>> return self._execute_with_wrappers(sql, params, many=False,
>> executor=self._execute)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 77, in _execute_with_wrappers*
>>
>> return executor(sql, params, many, context)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 85, in _execute*
>>
>> return self.cursor.execute(sql, params)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\utils.py",
>> line 89, in __exit__*
>>
>> raise dj_exc_value.with_traceback(traceback) from exc_value
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>> line 83, in _execute*
>>
>> return self.cursor.execute(sql)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\mysql\base.py",
>> line 71, in execute*
>>
>> return self.cursor.execute(query, args)
>>
>>   *File
>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>> line 250, in execute*
>>
>> self.errorhandler(self, exc, value)
>>
>>   *File
>> 

Re: Base Views error importing articles.models

2018-08-30 Thread Jason
and I would suggest you use a text editor or IDE with python integrations 
to check for these kind of errors.  Syntax and missing references are 
easily caught

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e67f3fbd-7cce-46e8-bd80-463955a109fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-30 Thread Jason
that's not mysql, that's the workbench program you use to interact with 
mysql.  and that version of workbench was released in 2013, which makes it 
severely out of date.  combined with the fact the mysql release at that 
time was 5.1, which again is severely out of date raises suspicions on 
whether you're actually working with up to date software.




On Thursday, August 30, 2018 at 12:36:52 AM UTC-4, Sonali Vighne wrote:
>
> MySQL  version-  6.0.8-alpha-community
>
> On Wednesday, August 29, 2018 at 7:26:09 PM UTC+5:30, Tom Forbes wrote:
>>
>> What version of MySQL are you running? 
>>
>> On Tuesday, 28 August 2018 07:00:52 UTC+1, Sonali Vighne wrote:
>>>
>>> I will paste full error and stack trace here.
>>>
>>> This is occurred when I am giving “python manage.py migrate” command
>>>
>>>  
>>>
>>> Operations to perform:
>>>
>>>   Apply all migrations: admin, auth, contenttypes, sessions
>>>
>>> Running migrations:
>>>
>>> Traceback (most recent call last):
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 83, in _execute*
>>>
>>> return self.cursor.execute(sql)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\mysql\base.py",
>>>  
>>> line 71, in execute*
>>>
>>> return self.cursor.execute(query, args)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>>>  
>>> line 250, in execute*
>>>
>>> self.errorhandler(self, exc, value)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\connections.py",
>>>  
>>> line 50, in defaulterrorhandler*
>>>
>>> raise errorvalue
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>>>  
>>> line 247, in execute*
>>>
>>> res = self._query(query)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>>>  
>>> line 411, in _query*
>>>
>>> rowcount = self._do_query(q)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\cursors.py",
>>>  
>>> line 374, in _do_query*
>>>
>>> db.query(q)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\connections.py",
>>>  
>>> line 277, in query*
>>>
>>> _mysql.connection.query(self, query)
>>>
>>> _mysql_exceptions.ProgrammingError: (1064, "You have an error in your 
>>> SQL syntax; check the manual that corresponds to your MySQL server version 
>>> for the right syntax to use near '(6) NOT NULL)' at line 1")
>>>
>>>  
>>>
>>> The above exception was the direct cause of the following exception:
>>>
>>>  
>>>
>>> Traceback (most recent call last):
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\migrations\recorder.py",
>>>  
>>> line 55, in ensure_schema*
>>>
>>> editor.create_model(self.Migration)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\schema.py",
>>>  
>>> line 312, in create_model*
>>>
>>> self.execute(sql, params or None)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\schema.py",
>>>  
>>> line 133, in execute*
>>>
>>> cursor.execute(sql, params)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 100, in execute*
>>>
>>> return super().execute(sql, params)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 68, in execute*
>>>
>>> return self._execute_with_wrappers(sql, params, many=False, 
>>> executor=self._execute)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 77, in _execute_with_wrappers*
>>>
>>> return executor(sql, params, many, context)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 85, in _execute*
>>>
>>> return self.cursor.execute(sql, params)
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\utils.py",
>>>  
>>> line 89, in __exit__*
>>>
>>> raise dj_exc_value.with_traceback(traceback) from exc_value
>>>
>>>   *File 
>>> "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py",
>>>  
>>> line 83, in _execute*
>>>
>>> return self.cursor.execute(sql)
>>>
>>>   *File 
>>> 

Re: Deploying with apache2 and modwsgi

2018-08-30 Thread Joel Mathew
I finally got it working with mod_wsgi-express. I was able to get my
django project running on port 80.
However I have a new problem. The page starts loading, but takes a
very long time to load static files. If I hit refresh in the browser,
it gives a 503 error. There's nothing in apache logs. The
mod_wsgi-express page says there's a log file created in server root.
However I was unable to find it to trace the issue.
On another note, is this the right place to ask these doubts regarding
deploying django on the server? Or is there a better usergroup?

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


Re: Help with mi first hello world please problems with urls

2018-08-30 Thread Sonali Vighne

¿Dónde está tu archivo views.py? escribir la solicitud de importación en 
views.py

On Wednesday, August 22, 2018 at 10:31:19 PM UTC+5:30, Dario Coronel wrote:
>
> El problema que tengo es el siguiente soy un novato recien conociendo el 
> mundo de python y django estaba siguiendo los pasos de la documentacion 
> para crear una primera aplicacion consegui instalr django y craer con 
> startproject un projecti inicial sin problemas, mi primer problema se 
> presenta cuando configuro las urls al crear con el $python manage.py 
> startapp polls dichos archivos sigo los pasos hasta donde en el archivo 
> polls/views.py  se incrusta el siguiente codigo 
>
>
> polls/views.py
>  from django.http import HttpResponse
>
>
> def index(request):
> return HttpResponse("Hello, world. You're at the polls index.")
>
> luego sigue
> crear un archivo urls.py en el mismo directorio
>
> polls/
> __init__.py
> admin.py
> apps.py
> migrations/
> __init__.py
> models.py
> tests.py
> urls.py
> views.py
>
>
> luego sigue incrustar el codigo en el archivo
>
>
> polls/urls.py
>
> from django.urls import path
> from . import views
>
> urlpatterns = [
> path('', views.index, name='index'),
> ]
>
> seguido de agregar el siguiente codigo al siguiente directorio
>
> mysite/urls.py
>
> from django.contrib import admin
> from django.urls import include, path
>
> urlpatterns = [
> path('polls/', include('polls.urls')),
> path('admin/', admin.site.urls),
> ]
>
>
> De ahi en teoria al ejecutar en la consola $python manage.py runserver debria 
> de poder ver el hola mundo y solo me da el error de 
>
> Not Found
>
> The requested URL / was not found on this server.
>
>
>
> cual seria mi error agradecreia mucho una ayuda.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c1fa13b2-0655-4e5a-83b8-f29b448129b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can we make 1 function to check the objects need update and update them

2018-08-30 Thread Mikhailo Keda
Django store data in a database, your program could get all data from the 
database.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e46e5d3a-7b6e-458f-8f25-851d01f61e01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can we make 1 function to check the objects need update and update them

2018-08-30 Thread Anirudh choudhary
I have read it already and the best I found from the documentation is the 
signals but signals only save when save command is given and it is manually 

On Thursday, August 30, 2018 at 12:19:17 PM UTC+5:30, Mikhailo Keda wrote:
>
> Check Django documentation https://docs.djangoproject.com/en/2.1/
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7968bced-1a38-442f-93d8-9469a9fff5ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with mi first hello world please problems with urls

2018-08-30 Thread ireoluwa fakeye
Why are you returning  a string into the response ,there are different
approaches  to this .

On Thu, 30 Aug 2018, 07:36 Anirudh choudhary, 
wrote:

> if you understand English then use include() in your mysite.urls.py
> which is in from django.urls import include
>
> On Wednesday, August 22, 2018 at 10:31:19 PM UTC+5:30, Dario Coronel wrote:
>>
>> El problema que tengo es el siguiente soy un novato recien conociendo el
>> mundo de python y django estaba siguiendo los pasos de la documentacion
>> para crear una primera aplicacion consegui instalr django y craer con
>> startproject un projecti inicial sin problemas, mi primer problema se
>> presenta cuando configuro las urls al crear con el $python manage.py
>> startapp polls dichos archivos sigo los pasos hasta donde en el archivo
>> polls/views.py  se incrusta el siguiente codigo
>>
>>
>> polls/views.py
>>  from django.http import HttpResponse
>>
>>
>> def index(request):
>> return HttpResponse("Hello, world. You're at the polls index.")
>>
>> luego sigue
>> crear un archivo urls.py en el mismo directorio
>>
>> polls/
>> __init__.py
>> admin.py
>> apps.py
>> migrations/
>> __init__.py
>> models.py
>> tests.py
>> urls.py
>> views.py
>>
>>
>> luego sigue incrustar el codigo en el archivo
>>
>>
>> polls/urls.py
>>
>> from django.urls import path
>> from . import views
>>
>> urlpatterns = [
>> path('', views.index, name='index'),
>> ]
>>
>> seguido de agregar el siguiente codigo al siguiente directorio
>>
>> mysite/urls.py
>>
>> from django.contrib import admin
>> from django.urls import include, path
>>
>> urlpatterns = [
>> path('polls/', include('polls.urls')),
>> path('admin/', admin.site.urls),
>> ]
>>
>>
>> De ahi en teoria al ejecutar en la consola $python manage.py runserver 
>> debria de poder ver el hola mundo y solo me da el error de
>>
>> Not Found
>>
>> The requested URL / was not found on this server.
>>
>>
>>
>> cual seria mi error agradecreia mucho una ayuda.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fb4c03f1-8d23-4ca0-bb11-b0a0a9ba1145%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO87g12nttWapXy%2BK19wWNmiyiAh0o-1rcVMUrELM%3Dc6VtJJbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can we make 1 function to check the objects need update and update them

2018-08-30 Thread Mikhailo Keda
Check Django documentation https://docs.djangoproject.com/en/2.1/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e1366fd-fa39-4302-a8da-98cfec2c3c2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with mi first hello world please problems with urls

2018-08-30 Thread Anirudh choudhary
if you understand English then use include() in your mysite.urls.py 
which is in from django.urls import include

On Wednesday, August 22, 2018 at 10:31:19 PM UTC+5:30, Dario Coronel wrote:
>
> El problema que tengo es el siguiente soy un novato recien conociendo el 
> mundo de python y django estaba siguiendo los pasos de la documentacion 
> para crear una primera aplicacion consegui instalr django y craer con 
> startproject un projecti inicial sin problemas, mi primer problema se 
> presenta cuando configuro las urls al crear con el $python manage.py 
> startapp polls dichos archivos sigo los pasos hasta donde en el archivo 
> polls/views.py  se incrusta el siguiente codigo 
>
>
> polls/views.py
>  from django.http import HttpResponse
>
>
> def index(request):
> return HttpResponse("Hello, world. You're at the polls index.")
>
> luego sigue
> crear un archivo urls.py en el mismo directorio
>
> polls/
> __init__.py
> admin.py
> apps.py
> migrations/
> __init__.py
> models.py
> tests.py
> urls.py
> views.py
>
>
> luego sigue incrustar el codigo en el archivo
>
>
> polls/urls.py
>
> from django.urls import path
> from . import views
>
> urlpatterns = [
> path('', views.index, name='index'),
> ]
>
> seguido de agregar el siguiente codigo al siguiente directorio
>
> mysite/urls.py
>
> from django.contrib import admin
> from django.urls import include, path
>
> urlpatterns = [
> path('polls/', include('polls.urls')),
> path('admin/', admin.site.urls),
> ]
>
>
> De ahi en teoria al ejecutar en la consola $python manage.py runserver debria 
> de poder ver el hola mundo y solo me da el error de 
>
> Not Found
>
> The requested URL / was not found on this server.
>
>
>
> cual seria mi error agradecreia mucho una ayuda.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fb4c03f1-8d23-4ca0-bb11-b0a0a9ba1145%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Base Views error importing articles.models

2018-08-30 Thread Anirudh choudhary
this error means that the module articles is not in the articels and file 
name models. you may be getting this error because of spelling 

On Monday, August 27, 2018 at 7:05:43 PM UTC+5:30, Sandy Leon wrote:
>
> Hello everyone,
>
> I am trying to add another simple 'home' page to my website which is at 
> this point
> just the basic site after you finish the tutorial. I am following the 
> 'Base Views' documentation but keep getting an error when trying to import 
> 'from articles.models import Articles' the error 
> reads ModuleNotFoundError: No module named 'articles'
>
> Any help with this would be greatly appreciated!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ae5a5ba3-a67f-4093-b8b7-164c7f96d265%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can we make 1 function to check the objects need update and update them

2018-08-30 Thread Anirudh choudhary
I am Writing the program which will collect all the content and display it 
and I want this to be robust but i am not able to find in documentation 
related 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3a46800f-9c74-4b50-af0e-0542224f3f49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.