new to django

2012-08-21 Thread maha
Hi,I am new to django. Right now I am going through the tutorial. I am 
stuck on the creating poll application. 

*Here are the settings.py ,* 

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
   'poll',
)

*here are the models.py*

from django.db import models

class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField()

*here are the urls.py,*

from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mysitee.views.home', name='home'),
# url(r'^mysitee/', include('mysitee.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
)
 i got struck, after i was running this command *python manage.py shell,* (i.e) 
while exploring the database in python shell.

do u need to show any other code, which i used.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/V262IvOrL9kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: new to django

2012-08-21 Thread maha
.don know what to do after that..

>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/m5g03N065jAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: new to django

2012-08-31 Thread maha


>
> thanks kurtis
>>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Iw461RspM4sJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New to Django, Question about Admin Page

2012-08-31 Thread maha


>
>uncomment  the admin url: url(r'^admin/', include(admin.site.urls)), 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1vTsmbJ_k-YJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New to Django, Admin Page not Loading

2012-08-31 Thread maha



urlpatterns = patterns('',
# Examples:
# url(r'^$', 'budgetmanager.views.home', name='home'),
# url(r'^budgetmanager/', include('budgetmanager.foo.
urls')),

# Uncomment the admin/doc line below to enable admin documentation:
  * uncomment*
 # url(r'^admin/', include(admin.site.urls)),
)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/W3_VMU97fmIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



poll application

2012-09-06 Thread maha
hi, rightnowi m going through the tutorial,


having problems with the tutorial part 2, line *customize the admin look 
and feel.* wat to do after that.

 can anyone guide to look forward..






thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/HHo29Ufpn-kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: poll application

2012-09-06 Thread maha


On Thursday, September 6, 2012 4:30:50 PM UTC+5:30, maha wrote:
  Hi, 
   Right now i am going through this tutorial,https://docs.djangoproject.com

> I am having problems with the tutorial part 2, line: customize the admin 
> look and feel. 
> can anyone guide to look forward..
>
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/p3-NcJCHC5MJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Tutorial

2012-09-13 Thread maha
Tell us what the urls.py and settings.py.
Have you uncomment the line django.admin.site in settings.py

On Sunday, September 9, 2012 6:32:14 AM UTC+5:30, David Perez wrote:
>
> Hi,
>
> I am new to Django, I am actually starting its tutorial. On part 2 it 
> enables the admin site, but I can't log in to it. The following error comes 
> up (see at the bottom):
>
> If I remember correctly I did not get prompt to create a superuser when I 
> wrote *python manage.py syncdb*, so I am not sure if I do not have a 
> superuser. I tried to create it with *python manage.py createsuperuser 
> --username=david* but it is not working.
>
> I am most certain it is something simple...and I tried to follow the steps 
> as exact as I could. I appreciate your help.
>
> David
>
>
> DoesNotExist at /admin/
>
> Site matching query does not exist.
>
> Request Method:GETRequest URL:http://127.0.0.1:8000/admin/Django Version:
> 1.4.1Exception Type:DoesNotExistException Value:
>
> Site matching query does not exist.
>
> Exception 
> Location:/Library/Python/2.7/site-packages/django/db/models/query.py 
> in get, line 366Python Executable:/usr/bin/pythonPython Version:2.7.1Python 
> Path:
>
> ['/Users/Dperezc/Desktop/Estudios independientes/Django/Proyecto1_Poll',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
>  '/Library/Python/2.7/site-packages']
>
> Server time:Sat, 8 Sep 2012 18:45:28 -0600
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/w-Ldx-vn6wwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to print sequence number in python

2020-11-15 Thread MAHA RAJA
ordered print
i=1
while (i>=5){
print (i)
i=i+1
}


unordered print

i=5
while (i<=1){
print (i)
i=i-1

}





On Sun, 15 Nov 2020, 10:39 pm Derek  You can also use range;
>
> >>> for i in range(0, 5):
> ... print(i + 1)
> ...
> 1
> 2
> 3
> 4
> 5
> >>>
>
> or in reverse:
>
> >>> for i in range(5, 0, -1):
> ... print(i)
> ...
> 5
> 4
> 3
> 2
> 1
> >>>
>
> On Saturday, 14 November 2020 at 21:26:04 UTC+2 vicker...@gmail.com wrote:
>
>> Python has the enumerate function for these situations.
>>
>> for i, item in enumerate(items):
>>  #your print statement here
>>
>> 'i' will give you the index of the list/iterable, and item will give you
>> the item.
>>
>> On Sat, 14 Nov 2020 at 11:57, paidjoo indo  wrote:
>>
>>> Hello I'm newbie in python, I'm learning looping in python, how to print
>>> like in bellow;
>>> Input:5
>>> 12345
>>> 2.  4
>>> 3   3
>>> 4   2
>>> 54321
>>>  Thanks guys
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAO%3D2VJmeOF5SyMZUFox_hHivTr%3DE%3Dnekj_n7FLOYjGOkPHQrbA%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/281ee4c1-23bb-4eb2-a8d3-a9bc1a13e078n%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/CAJhiZB5SR_iyZPeCfBJ8pxs2MR00rWFOSFmprE1y_57Po4rS_w%40mail.gmail.com.