Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
okay thank you lets me trying

On Mon, Nov 26, 2018 at 6:35 AM Yavin Aalto Arba 
wrote:

> It's kinda all over the place.
>
> 1. conventions:
> urlpatterns is a list not a tuple
> 2.
> 'restaurants.views',  without include? what's this for?
>
> 3. You did not close the parenthesis correctly in the second item, here's
> how its supposed to be written:
>
> path('',ListView.as_view(model=Food, template_name='restaurants/index.html',  
> name='index'))
>
>
> 4.you are using path and instead of path_re
>
>
>
> On Mon, 26 Nov 2018 at 16:03, Abba Haruna  wrote:
>
>> even if i close it is not working
>>
>> On Mon, Nov 26, 2018 at 5:54 AM Michal Petrucha <
>> michal.petru...@konk.org> wrote:
>>
>>> On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote:
>>> > # from django.conf.urls import patterns, url
>>> > from django.conf.urls.static import static
>>> > from django.views.generic import ListView
>>> > from restaurants.models import Food
>>> > from django.conf import settings
>>> >
>>> > urlpatterns = ('restaurants.views',
>>> > path('',ListView.as_view(model=Food,
>>> template_name='restaurants/index.html',
>>> > name='index'),
>>>
>>> You've got an unclosed parenthesis on the line above.
>>>
>>> > path('food/(?P<food_id>\d+)/',
>>> > 'choose_town', name='choose_town'),
>>> > path('food/(?P<food_id>\d+)/town/(?P<town_id>\d+)/',
>>> > 'choose_restaurant',
>>> > name='choose_restaurant'),
>>> > path('rest/(?P<rest_id>\d+)/',
>>> > 'restaurant',
>>> > name='restaurant'),
>>> > path('(?P<rest_id>\d+)/vote/',
>>> > 'vote',
>>> > name='vote'),
>>> > )
>>> >
>>> >
>>> > if settings.DEBUG:
>>> > urlpatterns += patterns('',
>>> > ('media/(?P.*)',
>>> > 'django.views.static.serve',
>>> > {'document_root': settings.MEDIA_ROOT}))
>>> >
>>> > On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba 
>>> > wrote:
>>> >
>>> > > did you import settings?
>>> > >
>>> > > On Mon, 26 Nov 2018 at 15:34, Abba Haruna 
>>> wrote:
>>> > >
>>> > >> if settings.DEBUG:
>>> > >> # urlpatterns += patterns('',
>>> > >> # ('media/(?P.*)',
>>> > >> # 'django.views.static.serve',
>>> > >> # {'document_root': settings.MEDIA_ROOT}))
>>> > >>
>>> > >>
>>> > >>
>>> > >> this is the result
>>> > >>
>>> > >>  File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line
>>> 22
>>> > >> if settings.DEBUG:
>>> > >>  ^
>>> > >> SyntaxError: invalid syntax
>>> > >>
>>> > >>
>>> > >> --
>>> > >> 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/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%40googlegroups.com
>>> > >> <
>>> https://groups.google.com/d/msgid/django-users/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%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 a topic in
>>> the
>>> > > Google Groups "Django users" group.
>>> > &g

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
even if i close it is not working

On Mon, Nov 26, 2018 at 5:54 AM Michal Petrucha <
michal.petru...@konk.org> wrote:

> On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote:
> > # from django.conf.urls import patterns, url
> > from django.conf.urls.static import static
> > from django.views.generic import ListView
> > from restaurants.models import Food
> > from django.conf import settings
> >
> > urlpatterns = ('restaurants.views',
> > path('',ListView.as_view(model=Food,
> template_name='restaurants/index.html',
> > name='index'),
>
> You've got an unclosed parenthesis on the line above.
>
> > path('food/(?P<food_id>\d+)/',
> > 'choose_town', name='choose_town'),
> > path('food/(?P<food_id>\d+)/town/(?P<town_id>\d+)/',
> > 'choose_restaurant',
> > name='choose_restaurant'),
> > path('rest/(?P<rest_id>\d+)/',
> > 'restaurant',
> > name='restaurant'),
> > path('(?P<rest_id>\d+)/vote/',
> > 'vote',
> > name='vote'),
> > )
> >
> >
> > if settings.DEBUG:
> > urlpatterns += patterns('',
> > ('media/(?P.*)',
> > 'django.views.static.serve',
> > {'document_root': settings.MEDIA_ROOT}))
> >
> > On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba 
> > wrote:
> >
> > > did you import settings?
> > >
> > > On Mon, 26 Nov 2018 at 15:34, Abba Haruna  wrote:
> > >
> > >> if settings.DEBUG:
> > >> # urlpatterns += patterns('',
> > >> # ('media/(?P.*)',
> > >> # 'django.views.static.serve',
> > >> # {'document_root': settings.MEDIA_ROOT}))
> > >>
> > >>
> > >>
> > >> this is the result
> > >>
> > >>  File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line 22
> > >> if settings.DEBUG:
> > >>  ^
> > >> SyntaxError: invalid syntax
> > >>
> > >>
> > >> --
> > >> 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/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%40googlegroups.com
> > >> <
> https://groups.google.com/d/msgid/django-users/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%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 a topic in the
> > > Google Groups "Django users" group.
> > > To unsubscribe from this topic, visit
> > > https://groups.google.com/d/topic/django-users/syLm4GpiFqg/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/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%40mail.gmail.com
> > > <
> https://groups.google.com/d/msgid/django-users/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%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 

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
# from django.conf.urls import patterns, url
from django.conf.urls.static import static
from django.views.generic import ListView
from restaurants.models import Food
from django.conf import settings

urlpatterns = ('restaurants.views',
path('',ListView.as_view(model=Food, template_name='restaurants/index.html',
name='index'),
path('food/(?P<food_id>\d+)/',
'choose_town', name='choose_town'),
path('food/(?P<food_id>\d+)/town/(?P<town_id>\d+)/',
'choose_restaurant',
name='choose_restaurant'),
path('rest/(?P<rest_id>\d+)/',
'restaurant',
name='restaurant'),
path('(?P<rest_id>\d+)/vote/',
'vote',
name='vote'),
)


if settings.DEBUG:
urlpatterns += patterns('',
('media/(?P.*)',
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}))

On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba 
wrote:

> did you import settings?
>
> On Mon, 26 Nov 2018 at 15:34, Abba Haruna  wrote:
>
>> if settings.DEBUG:
>> # urlpatterns += patterns('',
>> # ('media/(?P.*)',
>> # 'django.views.static.serve',
>> # {'document_root': settings.MEDIA_ROOT}))
>>
>>
>>
>> this is the result
>>
>>  File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line 22
>> if settings.DEBUG:
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>> --
>> 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/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%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 a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/syLm4GpiFqg/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/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%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/CAL67j7Gk5G0FKfMK3P7NX2PfrS7C_-88GE-5nRUm%2BtURcLtBqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
Yes lets me show you the code

On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba 
wrote:

> did you import settings?
>
> On Mon, 26 Nov 2018 at 15:34, Abba Haruna  wrote:
>
>> if settings.DEBUG:
>> # urlpatterns += patterns('',
>> # ('media/(?P.*)',
>> # 'django.views.static.serve',
>> # {'document_root': settings.MEDIA_ROOT}))
>>
>>
>>
>> this is the result
>>
>>  File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line 22
>> if settings.DEBUG:
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>> --
>> 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/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%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 a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/syLm4GpiFqg/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/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2B%2Be-ZX%3DkfFRPBe_edkvQg1vD3F89FUrHfQ-JOKpR793zHS4qA%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/CAL67j7HimVSAk%3DLzx8Lp-HjBfWtZXC5CTxie3p6TRrttZtT%3Dpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
 if settings.DEBUG:
# urlpatterns += patterns('',
# ('media/(?P.*)', 
# 'django.views.static.serve', 
# {'document_root': settings.MEDIA_ROOT})) 



this is the result 

 File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line 22
if settings.DEBUG:
 ^
SyntaxError: invalid syntax


-- 
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/9f08ad47-6d28-44ef-ba8c-7bfbb9aca8be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-26 Thread Abba Haruna
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/23a22766-8296-416c-8734-a3771eb6beb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread Abba Haruna
from django.db import models

class Food(models.Model):
name = models.CharField(max_length=30)
picture = models.ImageField(upload_to='images/', null=True)
def __unicode__(self):
return self.name
class Town(models.Model):
name = models.CharField(max_length=30)

def __unicode__(self):
return self.name
class Restaurant(models.Model):
name = models.CharField(max_length=100)
desc = models.CharField(max_length=100)
menu = models.CharField(max_length=100)
web = models.CharField(max_length=100)
phone = models.CharField(max_length=40)
address = models.CharField(max_length=100)
post_code = models.CharField(max_length=20)
picture = models.ImageField(upload_to='images/', null=True)
map = models.ImageField(upload_to='images/', null=True)
gmap_url = models.CharField(max_length=200, null=True)
food = models.ForeignKey(Food)
town = models.ForeignKey(Town)
STARS = ((1,'one'),
(2,'two'),
(3,'three'),
(4,'four'),)
votes = models.IntegerField(choices=STARS, default=4)
def __unicode__(self):
return self.name
def __str__(self):

-- 
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/de6ad3df-e330-43e1-875a-58895e245851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Modification in Fee Management System Django Project

2018-10-27 Thread Abba Haruna
Yes sir am interested

On Sat, Oct 27, 2018 at 7:27 PM mazz ahmed  wrote:

> Hi Dear!
> I am Interested in your project. Please If you want to work with me reply
> please
>
> On Sat, Oct 27, 2018 at 8:10 PM BBG  wrote:
>
>> I have one project fee management system and need some modification.
>>
>> please review this document for more information.
>>
>>
>> Strict Deadline: 30/10/2018
>> budget: 60$
>>
>>
>> If you are interested then please mail me.
>>
>>
>> https://drive.google.com/file/d/1wu-oqYJgLquucc62sC-qyf_cf1RVeTfz/view?usp=sharing
>>
>>
>> --
>> 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/42eee391-7675-407a-8796-5d471c15767d%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/CABuXbh_C%3DSyzycGybZ15uQ-gBaaKP79TLk4YOanm2%2BXk%2BZxYDg%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/CAL67j7ERo4uw1OsiQAvTgQLODPXxPpF2sPVbwvE4JrqYVtT8QQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.