Re: Django frustrations :)

2014-08-16 Thread Babatunde Akinyanmi
Hi Mariusz,
You won't go far in learning anything if you back out at the slightest
resistance. When your code spews errors, you should attempt to find out
what exactly caused the errors.

That said, Django is just pure python. Nothing special and magical about
it.

My advice, anytime you hit such snags, ask for help on the group.
On 16 Aug 2014 17:54, "Mariusz Wilk"  wrote:

> Hi guys. If I seem like a spoilt brat or sth in this post then maybe I am,
> let me know.
> I'm completely new to programming. I completed Python tutorial on
> codecademy and completed about 20 'assignments' on CheckiO, but I wanted to
> actually implement what I'd learned to a larger project like a website (in
> the meantime I also got to know html/css a little bit). So I started a
> tutorial on Django but got seriously stuck plus I didn't really understand
> almost anything about what I was doing. Ok..  so I went on to another
> Django tutorial. Again, same thing. And for the third time.. same thing. By
> now I'm really frustrated by how easy it was to learn the basics of Python,
> HTML and CSS and how impossible it is to understand Django and create sth
> without 1000 errors on the way. Maybe there's something I could do that
> would help me understand Django tutorials before actually doing them? Maybe
> I need some general computer course that would help me understand all the
> jargon.
> Well, that's about it. Any advice will be 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/972bd82d-5d8f-4462-938b-ff37ffd7b3d4%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXO0pJkFk%3D3_wWW0PTJS%3D6Lumany6hH2n81%3DEW21fgrXFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: hosting django app

2014-08-22 Thread Babatunde Akinyanmi
Google Redhat Openshift
On 22 Aug 2014 09:25, "ngangsia akumbo"  wrote:

> my boss uses php to build web apps
>
> he is n9ot very convince that django can be very cheap in hosting as php.
>
> is there any way i can host a django app whic is as cheap as php?
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/30d329d4-04c6-46cb-bc9a-76844e15d90a%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPPBUVNbetYodiFJoqaCHjcm2R9ECOKRFQn-VT%2BC%3DCoXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Changing URL

2014-08-24 Thread Babatunde Akinyanmi
How did you write the link as a relative link un your template?
On 24 Aug 2014 12:30, "Jagger"  wrote:

>  Hi Everyone!
>
>
>
>  I use Python 2.7 and Django 1.6 on Xubuntu 14.04.
>
>
>  I'm a beginner. My problem is:
>
>
>  The root URLConf:
>
> from django.conf.urls import patterns, include, url
>
>
>  from django.contrib import admin
>
>
>  admin.autodiscover()
>
>
>  urlpatterns = patterns('',
>
> url(r'^admin/', include(admin.site.urls)),
>
> url(r'^', include('spweb.urls')),
>
> )
>
>
>
>  The URLConf of spweb app:
>
>
>  from django.conf.urls import patterns, url
>
>
>  from spweb import views
>
>
>  urlpatterns = patterns('',
>
> url(r'^$', views.index, name='index'),
>
> url(r'^index/$', views.index, name='index'),
>
> url(r'^contact/$', views.contact, name='contact'),
>
> )
>
>
>  In a browser the first click on a link link points to
> http://127.0.0.1:8000/index (OK, that's correct. This is what I expect to
> happen.)
>
> But the second click on the same link points to
> http://127.0.0.1:8000/index/index (That's wrong. Why did the url
> change???)
>
>
>
>  Thans for your answers!
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9df70c1b-a7c9-4f86-8d1a-9421bd014e4b%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPXYbTBNWgpX5Ofe%2B1zMA4JMZVt-c3udCmmhF94YtDf_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Changing URL

2014-08-25 Thread Babatunde Akinyanmi
Ok. I'm replying inline:

On 24 Aug 2014 18:43, "Jagger"  wrote:
>
> The link is in the base.html of spweb app:
>
> NEWS
>
This link is relative so the browser will append the href attribute to the
present URL. You should change it to:
NEWS

>>
>> On 24 Aug 2014 12:30, "Jagger"  wrote:
>>>
>>> Hi Everyone!
>>>
>>>
>>>
>>> I use Python 2.7 and Django 1.6 on Xubuntu 14.04.
>>>
>>>
>>> I'm a beginner. My problem is:
>>>
>>>
>>> The root URLConf:
>>>
>>> from django.conf.urls import patterns, include, url
>>>
>>>
>>> from django.contrib import admin
>>>
>>>
>>> admin.autodiscover()
>>>
>>>
>>> urlpatterns = patterns('',
>>>
>>> url(r'^admin/', include(admin.site.urls)),
>>>
>>> url(r'^', include('spweb.urls')),
>>>
>>> )
>>>
>>>
>>>
>>> The URLConf of spweb app:
>>>
>>>
>>> from django.conf.urls import patterns, url
>>>
>>>
>>> from spweb import views
>>>
>>>
>>> urlpatterns = patterns('',
>>>
>>> url(r'^$', views.index, name='index'),
>>>
>>> url(r'^index/$', views.index, name='index'),

Why did you give the 2 patterns the same name ('index')? Because Django can
automatically fill in the URL linked to a name by using the url template
tag:
NEWS

>>>
>>> url(r'^contact/$', views.contact, name='contact'),
>>>
>>> )
>>>
>>>
>>> In a browser the first click on a link link points to
http://127.0.0.1:8000/index (OK, that's correct. This is what I expect to
happen.)
>>>
>>> But the second click on the same link points to
http://127.0.0.1:8000/index/index (That's wrong. Why did the url change???)

BTW note that http://example.com is different fron http://example.com/.
>>>
>>>
>>>
>>> Thans for your answers!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPZG%2BJCSJfLLhdQSkD68T4Kvb4vjLkMErYYfz-mpbHdLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Changing URL

2014-08-25 Thread Babatunde Akinyanmi
On 25 Aug 2014 22:12, "Jagger"  wrote:
>
> It works. Thanks. I removed the hardcoded URLs from the templates and I
refer to index in this way:
>
> NEWS
>
> You asked why I gave the two patterns the same name.
> The website default page is 'index'. It contains the news. The News menu
also points to index.
> Pattern A maps index to root:
>
> url(r'^$', views.index, name='index')
> Pattern B is used in the menu:
>
> url(r'^index/$', views.index, name='index')
>
> Perhaps, I could use pattern A in the menu, but it wouldn't be elegant,
would it?
>
> Or is it too complicated... ?
>
> BTW, I could leave out 'name' parameter from pattern A, because I only
use pattern B in templates:
> url(r'^$', views.index)
> Do you agree?

You need to give every pattern a unique name. The name argument is optional
though so you can leave it out until you need.

>
>
> 2014. augusztus 25., hétfő 10:12:14 UTC+2 időpontban Tundebabzy a
következőt írta:
>>
>> Ok. I'm replying inline:
>>
>> On 24 Aug 2014 18:43, "Jagger"  wrote:
>> >
>> > The link is in the base.html of spweb app:
>> >
>> > NEWS
>> >
>> This link is relative so the browser will append the href attribute to
the present URL. You should change it to:
>> NEWS
>>
>> >>
>> >> On 24 Aug 2014 12:30, "Jagger"  wrote:
>> >>>
>> >>> Hi Everyone!
>> >>>
>> >>>
>> >>>
>> >>> I use Python 2.7 and Django 1.6 on Xubuntu 14.04.
>> >>>
>> >>>
>> >>> I'm a beginner. My problem is:
>> >>>
>> >>>
>> >>> The root URLConf:
>> >>>
>> >>> from django.conf.urls import patterns, include, url
>> >>>
>> >>>
>> >>> from django.contrib import admin
>> >>>
>> >>>
>> >>> admin.autodiscover()
>> >>>
>> >>>
>> >>> urlpatterns = patterns('',
>> >>>
>> >>> url(r'^admin/', include(admin.site.urls)),
>> >>>
>> >>> url(r'^', include('spweb.urls')),
>> >>>
>> >>> )
>> >>>
>> >>>
>> >>>
>> >>> The URLConf of spweb app:
>> >>>
>> >>>
>> >>> from django.conf.urls import patterns, url
>> >>>
>> >>>
>> >>> from spweb import views
>> >>>
>> >>>
>> >>> urlpatterns = patterns('',
>> >>>
>> >>> url(r'^$', views.index, name='index'),
>> >>>
>> >>> url(r'^index/$', views.index, name='index'),
>>
>> Why did you give the 2 patterns the same name ('index')? Because Django
can automatically fill in the URL linked to a name by using the url
template tag:
>> NEWS
>>
>> >>>
>> >>> url(r'^contact/$', views.contact, name='contact'),
>> >>>
>> >>> )
>> >>>
>> >>>
>> >>> In a browser the first click on a link link points to
http://127.0.0.1:8000/index (OK, that's correct. This is what I expect to
happen.)
>> >>>
>> >>> But the second click on the same link points to
http://127.0.0.1:8000/index/index (That's wrong. Why did the url change???)
>>
>> BTW note that http://example.com is different fron http://example.com/.
>> >>>
>> >>>
>> >>>
>> >>> Thans for your answers!
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/a4e03a28-7a97-4907-98f6-a8d8e056bb6f%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMH5ygd-AEqcZcLJoM3LXdjTVK8d2f7V8vncPUQigPNsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model - def __unicode__(self) - doesn't work

2014-08-25 Thread Babatunde Akinyanmi
Hi Przemek,
I'm not sure there's a name attribute for Field and its subclasses.
Does removing the name attribute work?
On 25 Aug 2014 22:19, "Przemek Ciborowski"  wrote:

Hello guys,

I'm really beginner in django.
I have extremely simple example:

class Vlan(models.Model):
name = models.CharField(max_length=30, name='Vlan name')
number = models.IntegerField(default=0, name='Vlan number')

def __unicode__(self):
return self.name

When I'm trying to use admin interface, I got this error:

AttributeError at /admin/networks/vlan/add/

'Vlan' object has no attribute 'name'

Request Method:POSTRequest URL:
http://127.0.0.1:8000/admin/networks/vlan/add/Django Version:1.6.6Exception
Type:AttributeErrorException Value:

'Vlan' object has no attribute 'name'

Exception Location:D:\Scripts\Mercury\networks\models.py in __str__,
line 10Python
Executable:C:\Python\Main\Scripts\python.exePython Version:2.7.8

I'm sure that it was working a few days ago. And in meantime I did django
upgrade.
What I'm doing wrong, and how I can fix it?

Thanks in advance.
Przemek.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/50470bc3-c7a0-4afd-b655-f7a3cf8304a0%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXO244j099HJ2B0p36eeCzuJH26PUM2HZK%3DAXwm-KkKxqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model - def __unicode__(self) - doesn't work

2014-08-26 Thread Babatunde Akinyanmi
On 26 Aug 2014 14:38, "James Schneider"  wrote:
>
> Try changing the 'name' argument to 'verbose_name' like so:
>
> name = models.CharField(max_length=30, verbose_name='Vlan name')
>
> I don't believe model fields accept 'name' as a keyword arg.
This would also explain the slightly confusing error due to the overlap of
'name' appearing in multiple spots.
>

Just like I pointed out in my earlier mail. Remove the name argument or
change it to verbose_name as recommended by James

> https://docs.djangoproject.com/en/dev/ref/models/fields/#field-options
>
>
> -James
>
>
>
> On Tuesday, August 26, 2014, Przemek Ciborowski  wrote:
>>
>> So to be more clearly, let create new django project with one
application for example with name networks.
>> Add those lines to the networks/models.py:
>>
>> class Vlan(models.Model):
>>
>> name = models.CharField(max_length=30, name='Vlan name')
>>
>> def __unicode__(self):
>> return self.name
>>
>> add those two lines to networks/admin.py
>>
>> from .models import *
>> admin.site.register(Vlan)
>>
>> It should be (and was) enough to run admin interface. Unfortunately when
I'm trying to add new vlan or list current vlans I get:
>> ---
>> AttributeError at /admin/networks/vlan/add/
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Request Method:
>> POST
>> Request URL:
>> http://127.0.0.1:8000/admin/networks/vlan/add/
>> Django Version:
>> 1.6.6
>> Exception Type:
>> AttributeError
>> Exception Value:
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Exception Location:
>> C:\Scripts\Test1\networks\models.py in __unicode__, line 11
>> Python Executable:
>> C:\Python\Main\Scripts\python.exe
>> Python Version:
>> 2.7.8
>> Python Path:
>>
>> ['C:\\Scripts\\Test1',
>>  'C:\\Scripts\\Test1',
>>  'C:\\Windows\\SYSTEM32\\python27.zip',
>>  'C:\\Python\\Main\\DLLs',
>>  'C:\\Python\\Main\\lib',
>>  'C:\\Python\\Main\\lib\\plat-win',
>>  'C:\\Python\\Main\\lib\\lib-tk',
>>  'C:\\Python\\Main\\Scripts',
>>  'C:\\Python27\\Lib',
>>  'C:\\Python27\\DLLs',
>>  'C:\\Python27\\Lib\\lib-tk',
>>  'C:\\Python\\Main',
>>  'C:\\Python\\Main\\lib\\site-packages']
>>
>> Server time:
>> Tue, 26 Aug 2014 14:12:06 +0200
>>
>>
>>
>> ---
>>
>> More information here : http://dpaste.com/26QQPKZ
>>
>> Look this is code from first part of official django tutorial.
>> When I delete def __unicode__(self) method from models file, it works
fine but in vlan list I get Vlan object, Vlan object etc instead of
names.
>>
>>
>> Regards
>> Przemek.
>>
>>
>>
>>
>> W dniu poniedziałek, 25 sierpnia 2014 22:47:10 UTC+2 użytkownik Przemek
Ciborowski napisał:
>>>
>>> Hello guys,
>>>
>>> I'm really beginner in django.
>>> I have extremely simple example:
>>>
>>> class Vlan(models.Model):
>>> name = models.CharField(max_length=30, name='Vlan name')
>>> number = models.IntegerField(default=0, name='Vlan number')
>>>
>>> def __unicode__(self):
>>> return self.name
>>>
>>> When I'm trying to use admin interface, I got this error:
>>>
>>> AttributeError at /admin/networks/vlan/add/
>>>
>>> 'Vlan' object has no attribute 'name'
>>>
>>> Request Method:
>>> POST
>>> Request URL:
>>> http://127.0.0.1:8000/admin/networks/vlan/add/
>>> Django Version:
>>> 1.6.6
>>> Exception Type:
>>> AttributeError
>>> Exception Value:
>>>
>>> 'Vlan' object has no attribute 'name'
>>>
>>> Exception Location:
>>> D:\Scripts\Mercury\networks\models.py in __str__, line 10
>>> Python Executable:
>>> C:\Python\Main\Scripts\python.exe
>>> Python Version:
>>> 2.7.8
>>>
>>> I'm sure that it was working a few days ago. And in meantime I did
django upgrade.
>>> What I'm doing wrong, and how I can fix it?
>>>
>>> Thanks in advance.
>>> Przemek.
>>
>> --
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/01dd14d6-43d7-4519-bffb-b6d33a083f54%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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWRN00qpz1SRvzgC_k0av92MQyPsN0TSU1CBdBh-QFbWw%40mail.gmail.com
.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"D

Re: Model - def __unicode__(self) - doesn't work

2014-08-26 Thread Babatunde Akinyanmi
On 25 Aug 2014 23:32, "Babatunde Akinyanmi"  wrote:
>
> Hi Przemek,
> I'm not sure there's a name attribute for Field and its subclasses.
> Does removing the name attribute work?
>

Oops. I meant argument not attribute

> On 25 Aug 2014 22:19, "Przemek Ciborowski"  wrote:
>>
>> Hello guys,
>>
>> I'm really beginner in django.
>> I have extremely simple example:
>>
>> class Vlan(models.Model):
>> name = models.CharField(max_length=30, name='Vlan name')
>> number = models.IntegerField(default=0, name='Vlan number')
>>
>> def __unicode__(self):
>> return self.name
>>
>> When I'm trying to use admin interface, I got this error:
>>
>> AttributeError at /admin/networks/vlan/add/
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Request Method:
>> POST
>> Request URL:
>> http://127.0.0.1:8000/admin/networks/vlan/add/
>> Django Version:
>> 1.6.6
>> Exception Type:
>> AttributeError
>> Exception Value:
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Exception Location:
>> D:\Scripts\Mercury\networks\models.py in __str__, line 10
>> Python Executable:
>> C:\Python\Main\Scripts\python.exe
>> Python Version:
>> 2.7.8
>>
>> I'm sure that it was working a few days ago. And in meantime I did
django upgrade.
>> What I'm doing wrong, and how I can fix it?
>>
>> Thanks in advance.
>> Przemek.
>>
>> --
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/50470bc3-c7a0-4afd-b655-f7a3cf8304a0%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPDJ33DJCPVsgWECABEu_-dnmSi4GTPWtiRXKiX_s%2BuxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Djamgo wizard problem

2014-08-28 Thread Babatunde Akinyanmi
Hi Mihai,
Ee can't help you without enough information. You need to at least give the
traceback of the error
On 28 Aug 2014 21:28, "Mihai Andrei Gabara" 
wrote:

> Hi! who can help me with "wizard" problem. i have 7 steps. every step have
> the "next" and "back" buttons. the back button works up to the 4 step, in
> the next steps, it return me an error. when i finish the steps, it starts a
> new wizard but i need to change page.
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c8e7c239-9d49-49ea-ba92-ec7fa36987f8%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXOrYiKO7b%3DXKBnqJdi8Mup6Q5kRhayqkk03qYw%3DTXG0Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django admin can't display user detail view: 500 error

2014-08-28 Thread Babatunde Akinyanmi
Hi Amarshall?
We need more information. Give us the traceback
On 29 Aug 2014 01:22, "amarshall"  wrote:

> I've deployed my django application using Nginx and uWSGI.
>
> In development I can login to my django admin-> users-> [username] and it
> shows the users information. However in development once I click on a user
> I get a "server 500" error. I have the same code for both deployment and
> development. I can't think of what the problem could be ?
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/176e31ad-5b35-429b-ad61-33753bcd30c4%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMiTAyRBgs2Z%2BO4fP7u3sionYYnDvGpOXN3%3DHiSu-eY9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to call django web page with ordinary html page

2014-08-29 Thread Babatunde Akinyanmi
Why are you adding a csrf token in your context?
On 29 Aug 2014 13:05, "Pawan Soni"  wrote:

> Hi ,
>
> i have a simple html page,*p.html *which is not made in django
> application ,its just a ordinary html page  which look like..
>
> 
> 
> http://127.0.0.1:8000/test/"; method="post">
> 
> 
> 
> 
>
> In form's action i am passing the path of my django url..
>
> this is my *urls.py* file..
>
>  from django.conf.urls import patterns, include, url
> from django.contrib import admin
> from login import views
>   urlpatterns = patterns('',
>url(r'^test',views.paymentcheck_view,name="test"),
>)
>
> my *views.py.*.
>
>  def paymentcheck_view(request):
>if request.method == "POST":
> c = {}
> c.update(csrf(request))
> return render_to_response('login1/create_pay_page.html',c)
>else:
> return HttpResponse('GET')
>
> Error i got ...
>
> Forbidden (403)
>
> CSRF verification failed. Request aborted.
> 
>
> i am stuck over here,pls help me
>
> Thnx in advance
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2b21261b-c48f-43d2-8db0-810b0c7a9c02%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXOXZp59r%2BHup7rHzZraH%3Dp%2BE%3DNTOHigX6za7OWonCw%3D-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to call django web page with ordinary html page

2014-08-29 Thread Babatunde Akinyanmi
On 30 Aug 2014 07:15, "James Schneider"  wrote:
>
> I reread the OP, and it sounds like he is using a static HTML page served
elsewhere and POSTing directly to the Django app. If you disable CSRF
validation on the form view in Django, it should work. However, I would
recommend against it.
>
> Unless you have a specific reason, why not just write up a
quick TemplateView (with CSRF disabled on the FormView) or better yet a
straight FormView class and just render the exact HTML you posted with the
CSRF tag, taking advantage of the benefits that the Django framework offers?
>
> -James
>

This is exactly where i was going.
>
> On Friday, August 29, 2014, Pawan Soni  wrote:
>>
>>
>>
>> On Friday, August 29, 2014 5:47:19 PM UTC+5:30, Shubham Pansari wrote:
>>>
>>> You are missing csrf_token which is set by request for csrf
verification. After the line
>>> http://127.0.0.1:8000/test/"; method="post">
>>> in your code put {%csrf_token%} and it should work fine and also read
why it didnot worked without it from
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/  . This should
answer all your queries.
>>>
>>>
>>> On Fri, Aug 29, 2014 at 4:36 PM, Pawan Soni  wrote:

 Hi ,

 i have a simple html page,p.html which is not made in django
application ,its just a ordinary html page  which look like..

 
 
 http://127.0.0.1:8000/test/"; method="post">
 
 
 
 

 In form's action i am passing the path of my django url..

 this is my urls.py file..

  from django.conf.urls import patterns, include, url
 from django.contrib import admin
 from login import views
   urlpatterns = patterns('',
url(r'^test',views.paymentcheck_view,name="test"),
)

 my views.py..

  def paymentcheck_view(request):
if request.method == "POST":
 c = {}
 c.update(csrf(request))
 return render_to_response('login1/create_pay_page.html',c)
else:
 return HttpResponse('GET')

 Error i got ...

 Forbidden (403)

 CSRF verification failed. Request aborted.

 

 i am stuck over here,pls help me

 Thnx in advance


 
>>
>>  Thanks Shubham for guiding me and your precious
response,but my concern is that if i used simple/plain html page and if i
would use {%csrf_token %} in that page ,i think this is not working .

Did you actually try it?

>>   Is any other alternative ways to do this task.
>> 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...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/2b21261b-c48f-43d2-8db0-810b0c7a9c02%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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/ed8d597a-5897-4be2-9402-f77d464700ff%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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciX1SGsybHJvp%3DYhXR7gxYAKYdfGMw32ja3KsjzfVPF%3D9A%40mail.gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMcEbWFuyZqUuAsXF2Uw1mJ_u2ofLVqAO15H_Ba69PTHw%40mail.gmail.

Re: Django hosting

2014-09-25 Thread Babatunde Akinyanmi
Hi Sabine,
I use Redhat's Openshift.
On 25 Sep 2014 07:55, "Sabine Maennel"  wrote:

> Thank you very much for your advice Marc, it is very valuable to me,
> especially the part that my hosting provider for today does not need to be
> that of the future. My problem right now is that I am under pressure to
> launch, but just in order to open up registration for a class that won't
> start before January 2015 where the real traffic will start. So I might not
> test thoughly now, and need a quick solution now, but then I will have two
> month to prepare for January and in case I am unhappy with the hosting I
> will still be able to change then.
>
>with kind regards and thanks again that you took so much time
> for that long informative answer
>  Sabine
>
>
> Am Donnerstag, 25. September 2014 07:58:02 UTC+2 schrieb mark:
>>
>> Sabine,
>>
>> I am in the US, so take my advice with a large grain of salt. I usually
>> use Linode and Digital Ocean as a benchmarks for hosting services. There
>> prices are very reasonable and they give you all that you need - root shell
>> access to your own private virtual server. They have great up-time, and my
>> only complaint has been about their backup service, but then who would
>> really trust a hosting company to back up your critical data??? Both can
>> scale as you grow - increasing memory, disk space, bandwidth takes just a
>> few minutes. Both have European data centers...Linode in London and Digital
>> Ocean in Amsterdam.
>>
>> Anyway, Pyrox seems very expensive, and Django Europe is much closer to
>> Digital Ocean/Linode in price. I am not wild about the process limits at
>> Django Europe...I tend to think about physical things - memory, disk space,
>> bandwidth, etc. I am not a good enough sys admin to know which processes to
>> kill, and the thought of not being able to log in because I am running too
>> many processes is scary...check the FAQs at Django Europe.
>>
>> If you have built your own django app for your start-up, I don't think
>> you really need to pay for "instant-on" django a la Django Europe. You are
>> quire capable of setting up your own Django production virtual server.
>> Email and no phone is OK as long as you they have a guaranteed min/max
>> response time. I assume you will be your own sys admin, so there is not
>> much they can do for you anyway. Keep good backups and don't push to
>> production until you have tested the heck out of your new code on a
>> different, but identical, development server. Practice rolling back to an
>> earlier release BEFORE you go live. If your site just dies, and you have
>> good backups, you can create a new node, install from backups, change the
>> dns on the local name servers, and you are back live in a few minutes. Then
>> figure out with the hosting folks what went wrong and ask for a refund...;)
>>
>> Finally, you can get 2 Virtual Private Servers on AWS EC2 for *free* for
>> the first year.  After that, their pricing is STILL cheaper than Linode or
>> Digital Ocean.   But you will have to investigate that by setting up mockup
>> billing as you build your systems and evaluate your needs.  You have a
>> whole year.  Their free tier includes a good amount of startup
>> resources: http://aws.amazon.com/free/. Also, your hosting provider
>> today may not be your hosting provider tomorrowstart free, learn what
>> you need and how much you need to scale up, and then move to paid hosting.
>> AWS EC2 also has European data centers.
>>
>> Anyway, just my 2 cents on hosting. Lots of options.
>>
>> Mark
>>
>>
>> On Wed, Sep 24, 2014 at 8:40 PM, Sabine Maennel 
>> wrote:
>>
>>> I live in Switzerland and I will launch my startup shortly. It will be a
>>> very small platform in the beginning but traffic might grow all of a
>>> sudden. So regarding to hosting I am torn right now, between Pyrox, which
>>> is a small, but accessible Germ hoster and Django Europe, which is
>>> spezialized on Django and LightTTPD. They offer a one click Django install,
>>> but no phone support only tickets. Can anyone give me advice regarding
>>> hosting? Has anyone used on of these two hosters?
>>>
>>>  Thanks in advance for your advice
>>>   Sabine
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/9efbfc90-c92e-4914-afca-f39b9dee5c6a%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>

Re: Django 1.7 and Python 2.6

2014-09-27 Thread Babatunde Akinyanmi
Hi,
If you can download in your server then you can install python 2.7+ into
your virtenv.
On 27 Sep 2014 19:54, "François Schiettecatte" 
wrote:

> Hi
>
> I know that Django 1.7 does not officially run on Python 2.6:
>
>
> https://docs.djangoproject.com/en/1.7/releases/1.7/#python-compatibility
>
> Unfortunately I am stuck with Python 2.6 on a number of servers but would
> like to migrate to Django 1.7. Does anyone run that configuration? Is there
> anything in Django 1.7 which explicitly prevents it from running on Python
> 2.6? Or is this a "great if it runs, but don't care if it doesn't"
> situation.
>
> Cheers
>
> François
>
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/04A8E7D2-35CD-429A-873F-FF20C4D3D492%40gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPO7Q5Hrnkt%2BixmNuStzN1TzMU96Bd2dUKQjirBZjgiww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom User

2014-09-30 Thread Babatunde Akinyanmi
Hello Sachin,

On 30 Sep 2014 10:50, "Sachin Tiwari"  wrote:
>
> Hi
>
> I want to display a phone number field at users list page,
>
> Username  emailAddress  FirstName  LastName   staffstatus  PhoneNumber
> sachin  a...@g.com sachintiwari  True
   000

I don't mean to be rude but Is this a question?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXNE1fMzh4mp1n1bbj14p-ma3vP%3DwgekvgiGS2VP6awbWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom User

2014-09-30 Thread Babatunde Akinyanmi
Your question is vague. You need to be specific about what you want to do.
Let us see what you have tried and let us see the stack trace of any error.

Otherwise, your question seems like "hi, I want to build a car".

When you put in the details i can assure you that answers will start flying
in.
On 30 Sep 2014 11:44, "Sachin Tiwari"  wrote:

> Hi Tundebabzy,
>
> Am I asking something wrong? please help me if possible.
>
>
> On Tuesday, September 30, 2014 3:20:34 PM UTC+5:30, Sachin Tiwari wrote:
>>
>> Hi
>>
>> I want to display a phone number field at users list page,
>>
>> Username  emailAddress  FirstName  LastName   staffstatus
>> PhoneNumber
>> sachin  a...@g.com sachintiwari  True
>>000
>>
>>
>>
>>
>>  --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8acd0f1e-eb98-46fa-a6b0-3fd0dd7abb4c%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXNfFxNsJSrb2ro3RFRvvvbQkz6orJKdewgQ5R69mxVajw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please help: urgent deployment problem with django post office

2014-10-02 Thread Babatunde Akinyanmi
You should also change your email password immediately because you just
exposed it to the whole world
On 2 Oct 2014 15:52, "Erik Cederstrand"  wrote:

>
> Den 02/10/2014 kl. 16.37 skrev Sabine Maennel :
>
> > Please help!
> >
> > I want to deploy tomorrow. The problem is that django post office logs
> INTERNAL Errors into the the table "postoffice_emails". I do not know why.
> It is about some broken links. I guess I can fix the links, but still I do
> not want to spam my database with that sort of reporting.
>
> ... and what are the error messages you are seeing? If your app is
> throwing internal errors, you should see a backtrace so you can locate the
> problem.
>
> Erik
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B8302E65-BD02-4AA4-8032-1301BD66AD32%40cederstrand.dk
> .
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMV%2BzMdO7-bWONfVFnZ5xiisp0ipJSuGZfB3%2BYgHbT0-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: CSRF Token: is it okay if it is attached to my url when I enter my form?

2014-10-03 Thread Babatunde Akinyanmi
I don't think its risky to have csrf token in the url since its in open
view in the page's source anyway (I'm not a security expert so that with a
very large bag of salt). However you would have that behavior when you are
submitting a form with a GET. You should use POST to submit your form
instead of GET.
On 3 Oct 2014 14:26, "Sabine Maennel"  wrote:

> Please help: I am confused whether it is okay that it is showing in the
> url like this:
>
>
>
> http://netteachers.de/bewerbung/formular?csrfmiddlewaretoken=2jKsplZsQx5XpBfltUaDmgJjhRiCllxQ
>
>
> This happens when I enter my form ( a CreateView Model Form)? Is that oky
> or a security risk of any kind?
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2e571910-4d1d-4066-9c60-9632f2613f88%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPh7vr2TtjMitmmjsbWSDyUkxc3cSChpGf9HsbmAOn%2BSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Postgres database server

2014-10-13 Thread Babatunde Akinyanmi
Hi Sheyda,
Perhaps you need to adjust your postgres configuration file
On 13 Oct 2014 19:52, "sheyda kianimehr"  wrote:

> Hi Collin,
>  I made a Database, I can see the tables of my DBs in terminal but when I
> use this python manage.py runserver
> for connecting to server I got this error.
>
> django.db.utils.OperationalError: FATAL:  password authentication failed
> for user "postgres"
> FATAL:  password authentication failed for user "postgres"
>
> On Monday, October 13, 2014 8:36:40 AM UTC-5, Collin Anderson wrote:
>>
>> Hi Sheyda,
>>
>> What does the error message say?
>>
>> Collin
>>
>>  --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b4a5f4a6-f952-411f-b637-b3a296f1a3fd%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXOQU7SLizyL4kQQ5EX7K-c0imSZFRP90StV3Nb6HN40LQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to store static

2014-10-16 Thread Babatunde Akinyanmi
Hi,
> 
Is this verbatim?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXPXxASx2oj25TCJNzDkZdSCqTxu5WGs8kNf-Ci5PydQvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to store static

2014-10-16 Thread Babatunde Akinyanmi
Hi,
> 
Is this verbatim?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMx6x-MK%2B59VAJCHoVZmAR2gBvj3bM4gMW996pv%3D109Hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to store static

2014-10-16 Thread Babatunde Akinyanmi
On 16 Oct 2014 15:36, tundeba...@gmail.com wrote:
>
> Hi,
> > 
> Is this verbatim?

So sorry. "Slip of hand".

If you are writing your tags that way it won't work because of the double
quotation mark. Do something 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXNxc4i8L_1zVrc8U-gNCax7GMFJJjqP%3DR6X8mt2_PDQjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-03 Thread Babatunde Akinyanmi
At this point i think it will be good to paste the stacktrace here
On 3 Dec 2014 14:18, "Danish Ali"  wrote:

> I also used this method. But I got same error in this method too.
>
> def save(self, *args, **kwargs):
> self.slug = slugify(self.name)
> super(Shop, self).save(*args, **kwargs)
>
> Please let me know if this is correct or not.
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f6d948cd-c526-4d40-98f3-29ed44828b28%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXN%2BhK11jXX%2Bz2_2TQEfMUpWF2cFBcJf-r7ARc41D2eQmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multidimensional form requirements

2016-04-08 Thread Babatunde Akinyanmi
I don't know if I'm off target but.

I'm presently work on something like this where I have have to save three
models at a go. One model is a stand alone while the other two have a
foreign key to the stand alone model which is a many to one relationship.
So to implement the many to one where I can save many of the dependent
models together with the standalone models, I made use of inline formset
and no problems thus far.
On Apr 8, 2016 5:16 PM, "Scot Hacker"  wrote:

> I need to build a pretty complex / non-standard form and am looking for
> advice on the overall architecture. Consider the following models:
>
> class UserProfile(User):
>   ... standard set of fields
>
>
> class ProfileExtra():
>   ForeignKey(UserProfile)
>   extratype (e.g. skill, work experience, website, publication, etc.)
>   ... another set of fields
>
>
> The idea is that, when editing a profile, a user can add an unlimited
> number of these ProfileExtras to their profile. So a user might end up with:
>
> Profile
>   name
>   title
>   about
>   photo
> Skills
>   skill 1
>   skill 2
> Publications
>   pub1
>   pub2
>   pub3
> Jobs
>   job1
>   job2
>
>
> etc. When editing their profiles, they'll be able to add/edit/delete any
> of these *in place* without leaving the page (it'll be ajax.)
>
> So we have one core model and "n" number of related models. Obviously, a
> standard ModelForm can't encompass all of this cleanly. There are several
> things about this that just don't mesh well with Django's forms library. It
> deals with multiple model types, it deals with unknown additional numbers
> of a related model, it needs to be all ajax.
>
> I'm really not sure about the best way to put it all together. I'm
> thinking we probably won't use Django forms at all - just do standard JS to
> create/destroy html form inputs on the page dynamically. Consider the whole
> thing as one big form element, and it all gets submitted every time. In the
> receiving view, pull apart the POST request and process it all manually.
> Advantage: total control. Disadvantage: we lose all the magic provided by
> model and modelform validation.
>
> Another thought is that we could make e.g. "skills" into a single field
> and use ArrayField (we're on postgres) to store all of the related skills.
> Need to experiment with that.
>
> Have any of you solved a similar problem? Are good ways to meet the
> requirements while still being able to take advantage of Django form
> validation goodness? I'm all ears. Thanks.
>
> ./s
>
> --
> 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/9a14486b-c7fc-4a99-a0b0-03774c04ae1e%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/CA%2BWjgXN2uJ5yrPuGahV%3D0_yVYHgHspswoZyUaEhv6k6oTy_-ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forms validation

2016-05-05 Thread Babatunde Akinyanmi
Hello Lekan. I have responded inline but my answer might not be a complete
fix.

On May 5, 2016 4:56 PM, "Lekan Wahab"  wrote:
>
> Hello,
> Please, i have a model form in forms.py which am trying to validate and
update my database with. However, for some reason the form is not being
validated. I have tried everything i could think of. It just reloads the
page.
>
> views.py
>>
>> from django.shortcuts import render
>> from information.forms import ContactForm
>> from django.http import HttpResponse, HttpResponseRedirect
>>
>>
>> def index(request):
>> form_class = ContactForm
>> if request.method == 'POST':
>> form = form_class()

The above line creates an empty form because you didn't supply anything as
the data argument therefore the is_valid method will never return True. You
need to instantiate it with your POST data. Try:
 form = form_class(request.POST)
>> if form.is_valid():
>> ###Dummy text to check validation
>> return  HttpResponse('Done')
>> return render(request, 'information/index.html', {'form':
form_class})
>>

{'form': form_class}
form_class is not an object. Perhaps you meant {'form': form}
>>
>> def complete(request):
>> return HttpResponse("Thank you for contacting us")
>
>
> models.py
>
>>
>> from crispy_forms.helper import FormHelper
>> from django import forms
>> from django.core.exceptions import ValidationError
>> from django.forms import Form
>> from information.models import Contact
>> from crispy_forms.helper import FormHelper
>> from crispy_forms.layout import Layout,Fieldset, HTML
>> from crispy_forms.bootstrap import TabHolder,Tab
>>
>>
>> class ContactForm(forms.ModelForm):
>> helper = FormHelper()
>> helper.form_tag = False
>> def __init__(self):
>> super(ContactForm, self).__init__()
>> for key in self.fields:
>> self.fields[key].required= False
>> self.fields[key].label = False
>>
>>
>> class Meta:
>> fields = '__all__'
>> model =  Contact
>
>
> 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 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/CAE6v7oeD7Qb_%2BJrhiOzRTiDJ%3DqEPAY56B86nuxdZnrv2EP%2BrdQ%40mail.gmail.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/CA%2BWjgXMLEmHKdtAWBA%2BsO7zPD9XGAggUPVXsU5beqg%3Dwb2Ax5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forms validation

2016-05-06 Thread Babatunde Akinyanmi
Good morning Lekan. My response is inline...
On May 6, 2016 4:21 AM, "Lekan Wahab"  wrote:
>
> Hello Babatunde,
> Thank you for answering my question.
> I have actually done that.
> But Django throws and error whenever I I instantiate form/for_class to
ContactForm(request. POST).
> It says it's expected only a single argumen. but two was provided.
>
That means you defined your form class without any arguments. I've looked
at your form definition and that's exactly what's happening.

>> >> class ContactForm(forms.ModelForm):
>> >> helper = FormHelper()
>> >> helper.form_tag = False
>> >> def __init__(self):

# __init__ is given only one argument. You didn't supply all the other
arguments needed for the form to work properly.

>> >> super(ContactForm, self).__init__()
>> >> for key in self.fields:
>> >> self.fields[key].required= False
>> >> self.fields[key].label = False
>> >>
>> >>
>> >> class Meta:
>> >> fields = '__all__'
>> >> model =  Contact
> On 05 May 2016 10:36 PM, "Babatunde Akinyanmi" 
wrote:
>>
>> Hello Lekan. I have responded inline but my answer might not be a
complete fix.
>>
>> On May 5, 2016 4:56 PM, "Lekan Wahab"  wrote:
>> >
>> > Hello,
>> > Please, i have a model form in forms.py which am trying to validate
and update my database with. However, for some reason the form is not being
validated. I have tried everything i could think of. It just reloads the
page.
>> >
>> > views.py
>> >>
>> >> from django.shortcuts import render
>> >> from information.forms import ContactForm
>> >> from django.http import HttpResponse, HttpResponseRedirect
>> >>
>> >>
>> >> def index(request):
>> >> form_class = ContactForm
>> >> if request.method == 'POST':
>> >> form = form_class()
>>
>> The above line creates an empty form because you didn't supply anything
as the data argument therefore the is_valid method will never return True.
You need to instantiate it with your POST data. Try:
>>  form = form_class(request.POST)
>> >> if form.is_valid():
>> >> ###Dummy text to check validation
>> >> return  HttpResponse('Done')
>> >> return render(request, 'information/index.html', {'form':
form_class})
>> >>
>>
>> {'form': form_class}
>> form_class is not an object. Perhaps you meant {'form': form}
>> >>
>> >> def complete(request):
>> >> return HttpResponse("Thank you for contacting us")
>> >
>> >
>> > models.py
>> >
>> >>
>> >> from crispy_forms.helper import FormHelper
>> >> from django import forms
>> >> from django.core.exceptions import ValidationError
>> >> from django.forms import Form
>> >> from information.models import Contact
>> >> from crispy_forms.helper import FormHelper
>> >> from crispy_forms.layout import Layout,Fieldset, HTML
>> >> from crispy_forms.bootstrap import TabHolder,Tab
>> >>
>> >>
>> >> class ContactForm(forms.ModelForm):
>> >> helper = FormHelper()
>> >> helper.form_tag = False
>> >> def __init__(self):
>> >> super(ContactForm, self).__init__()
>> >> for key in self.fields:
>> >> self.fields[key].required= False
>> >> self.fields[key].label = False
>> >>
>> >>
>> >> class Meta:
>> >> fields = '__all__'
>> >> model =  Contact
>> >
>> >
>> > 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 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/CAE6v7oeD7Qb_%2BJrhiOzRTiDJ%3DqEPAY56B86nuxdZnrv2EP%2BrdQ%40mail.gmail.com
.
>> > 

Re: GSOC WITH DJANGO

2018-03-02 Thread Babatunde Akinyanmi
You need to give a proposal detailing what you want to work on. Note that
while you may ultimately improve your skills with the project, your main
goal will be to improve the project.

On 1 March 2018 at 05:25, tola temitope  wrote:

> hey, good day guys i am a Django developer thats been building for almost
> a year now and i am participating with gsoc this year with django, I want
> to improve my skills, solve problems and build the community too.
>
> --
> 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/5ab71783-19bf-479d-8f22-5eacf1d21b5b%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/CA%2BWjgXPqLsaOLmzjmf4jhpc-KBMi%2BNieTRfXLS9bYG%2B31e6KrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-16 Thread Babatunde Akinyanmi
Hi Daniella. Welcome to the django ecosystem.

As per your question, to get started with django, read the tutorial.

https://www.djangoproject.com/start/

On 16 Mar 2018 18:57, "Daniella"  wrote:

PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME THROUGH ON
HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB APPLICATION.
THANKS IN ANTICIPATION

-- 
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/e34ff9eb-f605-4b3a-a0a9-f319b4955183%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/CA%2BWjgXOuqy5X_QbzB_bc-3E7Sff3h81feYxwVTaPt8RCZmzMCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Making django.contrib.admin compatible with Bootstrap4?

2018-03-25 Thread Babatunde Akinyanmi
Hi Vincent,
I'm not sure what you mean by "compatible".

If you are asking if the Admin app can be styled with the bootstrap4, the
answer is yes. There are many third party apps that do this for you and you
can find them with a simple Google search.

If you are asking if django Admin app is going to be styled with bootstrap
by default, I'm sure the answer is no (I'm not part of the core
developers). Django's policy is to avoid dependency on third party apps.

On Sun, 25 Mar 2018, 17:50 Vincent Ng,  wrote:

> Are there any efforts right now to make Django Admin compatible with
> Bootstrap4?
>
> It's one of the most popular css frameworks out there and I think a lot of
> developers will find this useful.
>
> --
> 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/ca9aa70d-1ac5-4f9c-87ed-06065717e74d%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/CA%2BWjgXMVV_biK%3D9Bacm4-U%2BAWZSMZz_EPT1h8F6JHUqfyXK81w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Updating Django for my web based application

2018-03-31 Thread Babatunde Akinyanmi
Hi Ahmed,
I made some inline comments

On Sat, 31 Mar 2018, 10:44 Haroon Ahmed,  wrote:

> Hi,
>
> I am using python 3.4 already!
> Yes my project is big, it is almost completed now but the requirement is
> to upgrade it to latest suitable release and that release should  not be
> insecure.
>
> when i started this project, it was not written on Django 1.9.8 official
> document that its an insecure version
>

Django is built with the highest regard for security. Sometimes some
security holes might be found but they are always plugged as soon as they
are found.

> Now i am thinking that Django 2 is not LTS so what is the guaranty that it
> will be a secure Django Version!
>

If security is your concern, the latest release of django is always your
best choice.

>
>
> On Sat, Mar 31, 2018, 2:34 PM Jani Tiainen  wrote:
>
>> Hi,
>>
>> In most cases, if possible I would upgrade latest release. Main issue
>> with 1.11 to 2.0 upgrade is Python 2 support. 1.11 is the last version to
>> support Python 2.7 and starting from Django 2.0 Python 3 is required.
>>
>> Of course, if your project is a big that takes long time to upgrade,
>> sticking with LTS isn't bad choice.
>>
>> On Sat, Mar 31, 2018 at 11:45 AM, Haroon Ahmed 
>> wrote:
>>
>>> Hi,
>>>
>>> Thanks for the information!
>>>
>>> Should i upgrade to Django 2 for my project? As Django 2 is not Long
>>> Time Supported.
>>> Django 1.11 is the latest release that is Long Time Supported yet!
>>>
>>> Should I go for Django 1.11 at the moment rather then Django 2.0? What
>>> will  be your suggestion for me?
>>>
>>> What is being followed in the industry, How to decide which Django
>>> should be chosen to upgrade the application?
>>>
>>>
>>> Thanks in advance!
>>>
>>>
>>>
>>> On Fri, Mar 30, 2018, 5:12 PM Jani Tiainen  wrote:
>>>
 Hi,

 Standard procedure to update Django is to upgrade gradually all
 versions from source version to target.

 There is no single document to describe changes needed between versions
 that are apart more than one release.

 Only changelog you can find is at every release which contains changes
 from previous release.

 You can try to combine required changes to directly upgrade.

 pe 30. maaliskuuta 2018 klo 14.07 Haroon Ahmed 
 kirjoitti:

> Hi,
>
> Currently my application is developed with Django 1.9.8 and I want to
> upgrade it to 2.0.3 because
> Django 1.9.8 is an insecure version of django as mention on it
> official documentation.
>
>
> https://docs.djangoproject.com/en/1.9/internals/release-process/#backwards-compatibility-policy
>
> This document is for an insecure version of Django that is no longer
> supported. Please upgrade to a newer release!
>
>
> Its my first time to update Django Version for my application,
> I have updated the Dango 1.9.8 to Django 2.0.3 in my virtual
> environment.
> I am using Python 3.4.4
>
> I haven't changes any thing in the code yet and facing some error
>
> \virtualEnv\DjangoUp\lib\site-packages\rest_framework\routers.py",
> line 23, in 
> from django.core.urlresolvers import NoReverseMatch
> ImportError: No module named 'django.core.urlresolvers'
>
> Some question that are coming into my mind:
>
>- Do i have to update my application according to new Django
>release every time when new Django version releases?
>- Is there any article or blog written that can help me to upgrade
>Django version from Django 1.9.8 to Django 2.0.3?
>- What people follow, dose most of the developers upgrade there
>web application according to new Django version release?
>
> Any kind of help will be appreciated, Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To 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/1162960f-46e4-4c24-9e36-df1d7edbb2eb%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.
 T

Re: Request Timed Out When Generating Huge Data

2018-04-01 Thread Babatunde Akinyanmi
Hi,
How many records are we talking about? What code are you using to fetch the
records? In other words, add more information so that it's easier to
troubleshoot

On Mon, 2 Apr 2018, 02:27 tango ward,  wrote:

>
> Good day,
>
> I need suggestions on how to approach this problem.
>
> I am working on a task that needs to generate the list students per
> school. When the school has larger number of students, I am getting a
> request timed out error. I can filter the school per campus to lessen the
> number of students but the performance in displaying the list of students
> is still taking too long.
>
>
> Thanks,
> Jarvis
>
> --
> 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/CAA6wQLKn98Yq9JrbQQLVncm2pkEUzaCYm_un0zZFMXQC8ewzrg%40mail.gmail.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/CA%2BWjgXN%2B2U5UtbjPGzTO5Aff-s%2BAeDKT%3DYg1HwFr72C4KGB4SQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help: 'django.utils.six.moves' is not a package

2018-04-09 Thread Babatunde Akinyanmi
On Tue, 10 Apr 2018, 02:47 Derek Zeng,  wrote:

> I'm using django 2.0.
> What exactly is the purpose of django.utils.six.moves module?
>
Allowing a code base to be able to run on both python 2 and python 3

I have read the source but don't quite understand. Seems like a poly-fill
> of pre-existing libraries like urllib
>
>
> On Mon, Apr 9, 2018 at 3:47 PM, Avraham Serour  wrote:
>
>> sounds like django 2 removed six and some library you are using still
>> hopes it exists.
>>
>> what django version are you using?
>>
>> On Mon, Apr 9, 2018 at 3:39 AM, Derek Zeng  wrote:
>>
>>> I got the following error when running pytest in django. Help is
>>> appreciated.
>>>
>>> This is the test I run
>>>
>>> import pytest
>>> from .factories import *
>>>
>>> @pytest.mark.django_db
>>> def test_with_client(client):
>>>   PostFactory.create() # if commented out, the error is gone
>>>   response = client.get('/')
>>>
>>>   body = str(response.content)
>>>   assert 'Mysite' in body
>>>
>>> PostFactory creates a Post object in the database
>>>
>>>
>>> apps/blog/tests/test_post.py:5 (test_with_client)
>>> client = 
>>> @pytest.mark.django_db
>>> def test_with_client(client):
>>> p = PostFactory.create()
>>>
>>> > response = client.get('/')
>>> blog/tests/test_post.py:10:
>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>> _ _ _ _
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:517:
>>> in get
>>> response = super().get(path, data=data, secure=secure, **extra)
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:332:
>>> in get
>>> return self.generic('GET', path, secure=secure, **r)
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:404:
>>> in generic
>>> return self.request(**r)
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:467:
>>> in request
>>> response = self.handler(environ)
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:125:
>>> in __call__
>>> self.load_middleware()
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/core/handlers/base.py:37:
>>> in load_middleware
>>> middleware = import_string(middleware_path)
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/utils/module_loading.py:17:
>>> in import_string
>>> module = import_module(module_path)
>>> ../../../../.virtualenvs/django/lib/python3.6/importlib/__init__.py:126:
>>> in import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>> :994: in _gcd_import
>>> ???
>>> :971: in _find_and_load
>>> ???
>>> :955: in _find_and_load_unlocked
>>> ???
>>> :665: in _load_unlocked
>>> ???
>>> :678: in exec_module
>>> ???
>>> :219: in _call_with_frames_removed
>>> ???
>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>> _ _ _ _
>>> from __future__ import absolute_import
>>>
>>> import re
>>>
>>> from django import http
>>> from django.apps import apps
>>> from django.utils.cache import patch_vary_headers
>>> > from django.utils.six.moves.urllib.parse import urlparse
>>> E ModuleNotFoundError: No module named 'django.utils.six.moves.urllib';
>>> 'django.utils.six.moves' is not a package
>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/corsheaders/middleware.py:8:
>>> ModuleNotFoundError
>>>
>>> --
>>> 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/23957c7e-9aca-4494-a06a-20cbf0fc857b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/EmfIjFICjyU/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAFWa6tJVq15fdBc8u%3DP6tRsrJo5D0sHNQtZh1a6U2y4uNm38mw%40mail.gmail.com
>> 
>> .
>>
>> For more options, 

Re: Help: 'django.utils.six.moves' is not a package

2018-04-10 Thread Babatunde Akinyanmi
Do you have any module making use of six? Also is there any change in the
story if you do `python3 manage.py [command]`
On Tue, 10 Apr 2018, 18:57 Julio Biason,  wrote:

> Six is self-contained it does look anywhere, it has its own list of “how
> it was before and how it is now”.
>
> In the case of moves, it has conditions of “module urlparse is urlparse in
> python 2 and urllib.parse in python 3” and then sets its own move module to
> point to one of those, based on python version.
>
> It’s weird that it can find six, but not the “moves” module. Have you
> tried deleting your virtual end and creating it again, with the new
> versions?
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
> --
> *From:* django-users@googlegroups.com  on
> behalf of Derek Zeng 
> *Sent:* Tuesday, April 10, 2018 10:31:27 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: Help: 'django.utils.six.moves' is not a package
>
>
>
> On Tue, Apr 10, 2018, 1:39 AM Babatunde Akinyanmi 
> wrote:
>
>>
>>
>> On Tue, 10 Apr 2018, 02:47 Derek Zeng,  wrote:
>>
>>> I'm using django 2.0.
>>> What exactly is the purpose of django.utils.six.moves module?
>>>
>> Allowing a code base to be able to run on both python 2 and python 3
>>
>
> yeah, but what role does moves module play here? if an old module is not
> found here, where does it look for it?
>
>
>> I have read the source but don't quite understand. Seems like a poly-fill
>>> of pre-existing libraries like urllib
>>>
>>>
>>> On Mon, Apr 9, 2018 at 3:47 PM, Avraham Serour 
>>> wrote:
>>>
>>>> sounds like django 2 removed six and some library you are using still
>>>> hopes it exists.
>>>>
>>>> what django version are you using?
>>>>
>>>> On Mon, Apr 9, 2018 at 3:39 AM, Derek Zeng  wrote:
>>>>
>>>>> I got the following error when running pytest in django. Help is
>>>>> appreciated.
>>>>>
>>>>> This is the test I run
>>>>>
>>>>> import pytest
>>>>> from .factories import *
>>>>>
>>>>> @pytest.mark.django_db
>>>>> def test_with_client(client):
>>>>>   PostFactory.create() # if commented out, the error is gone
>>>>>   response = client.get('/')
>>>>>
>>>>>   body = str(response.content)
>>>>>   assert 'Mysite' in body
>>>>>
>>>>> PostFactory creates a Post object in the database
>>>>>
>>>>>
>>>>> apps/blog/tests/test_post.py:5 (test_with_client)
>>>>> client = 
>>>>> @pytest.mark.django_db
>>>>> def test_with_client(client):
>>>>> p = PostFactory.create()
>>>>>
>>>>> > response = client.get('/')
>>>>> blog/tests/test_post.py:10:
>>>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>>>> _ _ _ _ _
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:517:
>>>>> in get
>>>>> response = super().get(path, data=data, secure=secure, **extra)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:332:
>>>>> in get
>>>>> return self.generic('GET', path, secure=secure, **r)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:404:
>>>>> in generic
>>>>> return self.request(**r)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:467:
>>>>> in request
>>>>> response = self.handler(environ)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/test/client.py:125:
>>>>> in __call__
>>>>> self.load_middleware()
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/core/handlers/base.py:37:
>>>>> in load_middleware
>>>>> middleware = import_string(middleware_path)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/site-packages/django/utils/module_loading.py:17:
>>>>> in import_string
>>>>> module = import_module(module_path)
>>>>> ../../../../.virtualenvs/django/lib/python3.6/importlib/__init__.py:126:
>>>>> in import_module
>>>>> return _boots

Re: ARGPARSE ERROR

2018-04-12 Thread Babatunde Akinyanmi
This is not a django problem. Simply install and upgrade the apps specified
in the error message

On Thu, 12 Apr 2018, 16:03 Ank,  wrote:

> Hi all,
>
> Iḿ trying to setup Catmaid - http://catmaid.readthedocs.io/en/stable/. Iḿ
> receiving this error when installing requirements.
>
> Progressbar2 3.6.2 requires argparse, which is not installed.
> twisted 17.9.0 requires zope.interface>=3.6.0, which is not installed.
> matplotlib 2.1.0 requires backports.functools-lru-cache, which is not
> installed.
> django-rest-swagger 2.1.2 has requirement djangorestframework>=3.5.4, but
> you'll have djangorestframework 3.5.3 which is incompatible
>
>
>
>  How it can be resolved ?
>
> Best
> Ank
>
> --
> 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/1fb16f72-1837-48f1-a8f6-c7bd64ca212f%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/CA%2BWjgXMHx_zdBtc_NG%2Bn1JMfi4oxTPHy_1y2Pw75VpxfX%2BxuqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get a mentor

2017-04-08 Thread Babatunde Akinyanmi
I'd joyfully be of assistance. Email me.

On 5 Apr 2017 16:47, "Joe Landrigan"  wrote:

> Thanks Mark!  I'll take all the free mentoring I can get.  ;)  I could use
> both types of mentors, but wasn't expecting an entrepreneurial mentor on a
> Django site.  The idea is actually pretty well thought out, but I doubt
> most people in this list would care for business plans.  I have a local
> group of 143 churches that want what I'd like to build, but building is the
> difficulty.  I'm sure if I can build it I'll be able to attract churches
> outside my town.
>
> On Tuesday, April 4, 2017 at 4:04:57 PM UTC-4, mark wrote:
>>
>> Joe,
>>
>> It is not clear from your post if you just need a django mentor for
>> technical questions, or if you need a business mentor to flesh out your
>> idea. There are hundreds (thousands??) of expert django mentors on this
>> list all willing to give you free advice. Learn how to ask direct questions
>> (https://www.gerv.net/hacking/how-to-ask-good-questions/, ht
>> tp://www.catb.org/~esr/faqs/smart-questions.html) on this list and the
>> time spent spinning your wheels will vanish.
>>
>> A couple more thoughts -
>>
>> * Refine the business idea first, then tackle the technological
>> components. There are many source of business mentors in every city -
>> bankers, lawyers, accountants all have Rolodexes of successful people who
>> are retired and are willing to mentor entrepreneurs. Check with the local
>> Rotary group. Check with you college or high school alumni group. Mentors
>> do not need to be local. Before you build a better mouse trap, be sure
>> there are mice out there who want it.
>>
>> * You will need an attorney to help you get 501c3 (or some other
>> non-profit) status with the IRS - expect to pay ~$1,000 for that. The forms
>> are easy to fill out, but you want an expert to review what you have filled
>> out in order to not shoot yourself in the foot - easy to do. You first need
>> to create a local corporation or partnership before you  tackle the IRS -
>> this will cost a couple of hundred dollars.
>>
>> * Non-profit - have you suggested open sourcing your idea? You could
>> start an open source project as a way to attract developers for the django
>> development. If you plan to make money from this venture, then you would
>> have to figure out how to separate the parts of you idea that give you a
>> competitive advantage from those things that don't. Open source the ones
>> that don't.
>>
>> I can't emphasize enough the need to spend 99% of your time to refine
>> your business idea before you invest in other areas. Spend 1% learning how
>> to create a django site with the help of this list until you and your
>> business mentors are convinced you have a rock solid and defensible idea.
>>
>> Just my 2 cents and some free mentoring! ;)
>>
>> Mark
>>
>> On Tue, Apr 4, 2017 at 9:56 AM, Joe Landrigan  wrote:
>>
>>> I'm in Fort Wayne, Indiana.  I'm not aware of any meetups in the area.
>>> The nearest that I know about are in Chicago, but that's a 3 hour drive one
>>> way.
>>>
>>> On Tuesday, April 4, 2017 at 10:21:14 AM UTC-4, Avraham Serour wrote:

 Hi,

 I suggest going to local meetups, you may meet people that could mentor
 or help you on specific issues, or help you to find a mentor, they could
 either know someone or know of local mentorship programs.

 Where are you located?

 On Tue, Apr 4, 2017 at 4:26 PM, Joe Landrigan  wrote:

> I need a mentor.  I've got an idea for a non-profit that I think could
> be spectacular, and I think Django is the right platform.  But, every time
> I run into a challenge it takes me days to solve for multiple reasons: I'm
> a father of 6, my job has nothing to do with Python, and I don't know what
> I don't know.  If I had someone who has actually made a site to guide me, 
> I
> bet most of my time consuming roadblocks would be decimated. If anyone
> could suggest a good route to find a mentor, I'd be very grateful.  I've
> wasted far too much time trying to solve problems only to find a package
> that solves the problem perfectly weeks later.  Ideally, I'd like to find
> someone who has some entrepreneurial experience, but I'll take any help I
> can get!  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...@googlegroups.com.
> To post to this group, send email to django...@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/f2a34670-12ad
> -41da-af56-bf7518b2d4b1%40googlegroups.com
> 

Re: Please help me

2017-05-29 Thread Babatunde Akinyanmi
I'd love to but the problem is I don't have the time.

I suggest you start by attempting to build something. The django community
is very welcoming to beginners so if you encounter issues and you can't
find the answer on stackoverflow.com, post a message to the mailing list.
You can copy me also and if I'm free I'll reply.

Thanks

On 29 May 2017 10:22, "Opeyemi Gabriel" 
wrote:

> Hello, Am name is Gabriel, please am a novice and am interested in learn
> django. Can you please put me through
> 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 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/CACbdT%3D0uo4XApksxz8yutWAMKXccCJACnD
> 21icCahuCe%2BB993g%40mail.gmail.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/CA%2BWjgXMCDqN5651NynPeJwQ7jq0GErVtj09_UjZJU4A3DMeW6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django to serve JSON: overkill?

2018-10-27 Thread Babatunde Akinyanmi
Not necessarily. It just depends on the exact use case, the direction the
application is moving in the future, etc

On Sat, 27 Oct 2018, 14:13 Charley Paulus,  wrote:

> Hi,
>
> Is it overkill to use Django just to dispatch url requests and to reply
> with JSON (i.e. not using at all the HTML template engine)?
>
> Thanks.
>
> Best regards,
> Charley
>
> --
> 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/fac5482d-3d6d-4970-8700-61a710026ba5%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/CA%2BWjgXNN%3DJvpDVPDH_ag-Frg9O36G5mmx7zGMODF6ycV4YdB1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: please i need assistance with mine css file .Mine base.html file failed to load my style.css.

2018-11-21 Thread Babatunde Akinyanmi
Hi.

You haven't given us any useful information for assisting you. You will get
more replies if you say what you have done, show what your settings look
like, tell if your are using the development server, stuff like that.

Welcome to the django community

On Wed, 21 Nov 2018, 16:06 Obodoma Uzondu Vincent, 
wrote:

> base.html file
>
> https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css";
> integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
> crossorigin="anonymous">
> https://code.jquery.com/jquery-3.3.1.slim.min.js";
> integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
> crossorigin="anonymous">
> https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js";
> integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
> crossorigin="anonymous">
> https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js";
> integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
> crossorigin="anonymous">
> {% load static %}
> 
> 
>
>
> --
> 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/CACsKspnJ1iQMBnBn%2BKovaFBxzVFKA1GyEpKERFhcxvWSFTamEQ%40mail.gmail.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/CA%2BWjgXNy70-%2BquRPTLpAwnY9Rnc4Cm-n8NEuwMYLgDhzX%3D5%3DjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to resolve UPPER_CASE naming issues in pylint

2019-03-30 Thread Babatunde Akinyanmi
Hi,
That's pylint telling you to change the variable name 'movie_resource' to
all caps.

On Sat, 30 Mar 2019, 07:30 Dennis Alabi,  wrote:

> My program throw up this error >>Constant name "movie_resource" doesn't
> conform to UPPER_CASE naming stylepylint(invalid-name)
>
>
>
>
>
> """vidly URL Configuration
>
> The `urlpatterns` list routes URLs to views. For more information please
> see:
> https://docs.djangoproject.com/en/2.1/topics/http/urls/
> Examples:
> Function views
> 1. Add an import: from my_app import views
> 2. Add a URL to urlpatterns: path('', views.home, name='home')
> Class-based views
> 1. Add an import: from other_app.views import Home
> 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
> Including another URLconf
> 1. Import the include() function: from django.urls import include, path
> 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
> """
> from django.contrib import admin
> from django.urls import path, include
> from api.models import MovieResource
>
> movie_resource = MovieResource()
>
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('movies/', include('movies.urls')),
> path('api/', include('movie_resource.urls'))
> ]
>
> --
> 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/a91173a8-058c-4b4a-a7db-183be3567e76%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/CA%2BWjgXO_VVMvTq4r_4-%2BhbzNDVjs1HH78mN63HTcBNgUdVcd1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to resolve UPPER_CASE naming issues in pylint

2019-03-31 Thread Babatunde Akinyanmi
Pylint is just a linter to help you maintain your coding standards.
Configure it to your taste instead of fighting it. Check pylint's
documentation for guidance.

On Sun, 31 Mar 2019, 13:09 Dennis Alabi,  wrote:

> Thanks for your reply but i change movie_resource to all caps ie
> MOVIE_RESOURCE and the problem did not stop. please look at my problem
> panel below. Actually i am trying to create an API
> [image: api_probem.png]
> Website: http://transtech.ga/
> Facebook: https://web.facebook.com/transtechno/
> Email: i...@transtech.ga
> Tell:+2348065698415
>
>
>
> On Sun, Mar 31, 2019 at 5:21 AM Babatunde Akinyanmi 
> wrote:
>
>> Hi,
>> That's pylint telling you to change the variable name 'movie_resource' to
>> all caps.
>>
>> On Sat, 30 Mar 2019, 07:30 Dennis Alabi,  wrote:
>>
>>> My program throw up this error >>Constant name "movie_resource" doesn't
>>> conform to UPPER_CASE naming stylepylint(invalid-name)
>>>
>>>
>>>
>>>
>>>
>>> """vidly URL Configuration
>>>
>>> The `urlpatterns` list routes URLs to views. For more information please
>>> see:
>>> https://docs.djangoproject.com/en/2.1/topics/http/urls/
>>> Examples:
>>> Function views
>>> 1. Add an import: from my_app import views
>>> 2. Add a URL to urlpatterns: path('', views.home, name='home')
>>> Class-based views
>>> 1. Add an import: from other_app.views import Home
>>> 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
>>> Including another URLconf
>>> 1. Import the include() function: from django.urls import include, path
>>> 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
>>> """
>>> from django.contrib import admin
>>> from django.urls import path, include
>>> from api.models import MovieResource
>>>
>>> movie_resource = MovieResource()
>>>
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('movies/', include('movies.urls')),
>>> path('api/', include('movie_resource.urls'))
>>> ]
>>>
>>> --
>>> 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/a91173a8-058c-4b4a-a7db-183be3567e76%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/a91173a8-058c-4b4a-a7db-183be3567e76%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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/CA%2BWjgXO_VVMvTq4r_4-%2BhbzNDVjs1HH78mN63HTcBNgUdVcd1A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CA%2BWjgXO_VVMvTq4r_4-%2BhbzNDVjs1HH78mN63HTcBNgUdVcd1A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> 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/CA%2B3GiJjOwxukADYL3RrEiFE%2B7aaVV%3DpJ3Uf5axZKuF2BgAd0xw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2B3GiJjOwxukADYL3RrEiFE%2B7aaVV%3DpJ3Uf5axZKuF2BgAd0xw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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/CA%2BWjgXMz71E%3DEBLvMuF6QAERCgQt47vt3wqrS59A0W1u8a%2B4Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do you make a public user create polls on the site not just the admin

2019-06-11 Thread Babatunde Akinyanmi
Hello Progress.
Just like how you fill out a form in the Admin site, you should also create
a form in your site.

On Mon, 10 Jun 2019, 12:18 Progress Onyema, 
wrote:

> --
> 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/a4345d81-d7c6-43d5-9c47-df2181690d09%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/CA%2BWjgXMsYbv-owBBjN40GpNBnxs0iivKV1WMJgBBEc-iPB1nhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Postman-django Api help

2019-09-13 Thread Babatunde Akinyanmi
Are you talking of this postman api?
https://docs.api.getpostman.com/?version=latest

On Thu, 12 Sep 2019, 14:31 Tosin Ayoola,  wrote:

> Halo
> Good day sorry I wan work on a airline tickets reservations project using
> postman Api, but I've never used that before and can't seem to find  any
> resourceful material online, can anyone be kind enough to help me out.
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHLKn70VJMTiSRXWke%3DYW9TJ6Z_R5an9vBb3TpPmndbdOMh24A%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/CA%2BWjgXN5V3o%2BEVSeC0vr9ZNA3E37xGut_hnw9pPBBRjif_Vmdg%40mail.gmail.com.


Re: Code written by Senior Django Developers

2023-06-11 Thread Babatunde Akinyanmi
Hi Joseph,
Django is open source. Feel free to dive in. Or better still, go through
pull requests so that you can see the context for parts of the code and
also what functionality they provide.

On Sun, 11 Jun 2023 at 20:00, Joseph Balogun  wrote:

> Hi Django fam!
>
> Can you pls recommend a resource where I can get reliable Django/Python
> code?
>
> I recently learned about code transcription- that by writing and analyzing
> code written by Senior Django Developers, I can become a better programmer.
>
> Your input would be greatly appreciated.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/17f8c6ee-bf6e-42a6-9449-b2149f990672n%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/CA%2BWjgXPreEO2BsqRB5c1_jBzic%2BftNK5v1V5jse4zPaVQkjJ_A%40mail.gmail.com.


<    1   2   3