Re: [ANNOUNCE] Django 1.5 alpha 1 released

2012-10-25 Thread Stephen Anto
Hi,

Nice to hear thank you so much for all who worked together for coming
up new version.

On Fri, Oct 26, 2012 at 1:28 AM, James Bennett wrote:

> Our first milestone on the road to Django 1.5 came today, with the
> release of the first alpha package.
>
> Blog post about it is here:
>
> https://www.djangoproject.com/weblog/2012/oct/25/15-alpha-1/
>
> Release notes are here:
>
> https://docs.djangoproject.com/en/dev/releases/1.5-alpha-1/
>
> And you can get the alpha from the downloads page:
>
> https://www.djangoproject.com/download/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Installing Djando and tutor polls app

2012-10-25 Thread Stephen Anto
Hi,

as Lachian said, It is spelling mistake for ForeignKey. Just correct your
word.

On Fri, Oct 26, 2012 at 8:56 AM, Lachlan Musicman  wrote:

> On Fri, Oct 26, 2012 at 10:39 AM, Rodrigo Morgado
>  wrote:
> > Hi everybody,
> >
> > I'm new in Django framework. I installed version 1.3.1 over Python 2.7.3
> in
> > Ubuntu.
> > I already did all steps but i have an error when i execute python
> manage.py
> > sql polls to create my table's project in mysql.
> >
> > Traceback (most recent call last):
> >   File "manage.py", line 14, in 
> > execute_manager(settings)
> >   File
> > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line
> > 438, in execute_manager
> > utility.execute()
> >   File
> > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line
> > 379, in execute
> > self.fetch_command(subcommand).run_from_argv(self.argv)
> >   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
> > line 191, in run_from_argv
> > self.execute(*args, **options.__dict__)
> >   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
> > line 219, in execute
> > self.validate()
> >   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
> > line 249, in validate
> > num_errors = get_validation_errors(s, app)
> >   File
> > "/usr/lib/python2.7/dist-packages/django/core/management/validation.py",
> > line 35, in get_validation_errors
> > for (app_name, error) in get_app_errors().items():
> >   File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py",
> line
> > 146, in get_app_errors
> > self._populate()
> >   File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py",
> line
> > 61, in _populate
> > self.load_app(app_name, True)
> >   File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py",
> line
> > 78, in load_app
> > models = import_module('.models', app_name)
> >   File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line
> > 35, in import_module
> > __import__(name)
> >   File "/home/ewok/www/webapp_camposchilenos/polls/models.py", line 9, in
> > 
> > class Choice(models.Model):
> >   File "/home/ewok/www/webapp_camposchilenos/polls/models.py", line 10,
> in
> > Choice
> > poll = models.ForeingKey(Poll)
> > AttributeError: 'module' object has no attribute 'ForeingKey'
> >
> > I checked my module and everything seems ok:
> >
> >   1 from django.db import models
> >   2
> >   3 # Create your models here.
> >   4
> >   5 class Poll(models.Model):
> >   6 question = models.CharField(max_length=200)
> >   7 pub_date = models.DateTimeField('date published')
> >   8
> >   9 class Choice(models.Model):
> >  10 poll = models.ForeingKey(Poll)
> >  11 choice = models.CharField(max_length=200)
> >  12 votes = models.IntegerField()
>
>
> It's a subtle spelling error:
> poll = models.ForeingKey(Poll)
>
> should be
>
> poll = models.ForeignKey(Poll)
>
> cheers
> L.
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Populate database from views

2012-10-25 Thread Stephen Anto
Hi,

if you have data in array list just use this

for list in array_list:
 modelObj = YourModel()
 modelObj.fieldname = list
 modelObj.save()

I believe it will help you... Thank you for visiting
http://www.f2finterview.com/web/Django/

On Thu, Oct 25, 2012 at 3:05 PM, Coulson Thabo Kgathi wrote:

> is it possible to do this?
>
> i have data that i recieve into the view from my template and i want to
> save that data which is in an array in my view to a database
>
> anybody help or link to where i can learn a way to do that
>
> thanks a lot
>
> --
> 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/-/cXkin2Cr8XEJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: a way to display a model formset in a ModelAdmin ?

2012-10-25 Thread Stephen Anto
Hi,

Create New adminmodel class and define fieldsets... For example
http://www.f2finterview.com/web/Django/22/ it is clearly explain you

On Thu, Oct 25, 2012 at 3:51 AM, Nicolas Emiliani  wrote:

> Hi,
>
> As the subject states, is there a way to display a model formset in a
> ModelForm?
>
> The thing is that I have a Verification model with its ModelAdmin, and
> then I have
> an ImageModel that has no ForeignKey to the Verification model (and I
> intend to keep
> it that way) so I can not inline it into the VerificationAdmin and I would
> like to show
> a list of Images in my VerificationAdmin based on a queryset performed (i
> assume) at
> __init__ method of VerificationAdminForm. How could this be accomplished?
>
> This is how it goes:
>
> class Image(models.Model):
>
>
> class Verification(models.Model):
>
>
> class VerificationAdminForm(forms.ModelForm):
>
>
> class VerificationAdmin(admin.ModelAdmin):
>form = VerificationAdminForm
>model = Verification
>fieldsets = [ ... ]
>
> Any ideas would be greatly appreciated.
>
> Thanks in advance.
>
> --
> Nicolas Emiliani
>
> Lo unico instantaneo en la vida es el cafe, y es bien feo.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: [ver. 1.5] Specifying custom User model (extends AbstractUser) doesn't work

2012-10-24 Thread Stephen Anto
Hi,

You can extend Default Django User model without breaking its architecture.
Just visit http://www.f2finterview.com/web/Django/21/ It will explain you
in detail.

On Wed, Oct 24, 2012 at 9:32 AM, Surya Mukherjee wrote:

> Django's standard User class isn't sufficient for my needs so I am making
> my own User class. As per the User Authentication doc page, I am
> subclassing AbstractUser (not AbstractBaseUser) to add some new stuff.
>
> 
> from django.contrib.auth.models import AbstractUser
>
> class MyUser(AbstractUser):
> test = 'Hello world'
> 
>
> Pretty simple so far. In settings.py:
> 
> # Specifies SDBUser as the custom User class for Django to use
> AUTH_USER_MODEL = 'app.MyUser'
> 
>
> But when i try to syncdb, everything breaks:
>
> [root@Surya project]# manage syncdb
> CommandError: One or more models did not validate:
> app.userprofile: 'user' defines a relation with the model 'auth.User',
> which has been swapped out. Update the relation to point at
> settings.AUTH_USER_MODEL.
> auth.user: Model has been swapped out for 'app.SDBUser' which has not been
> installed or is abstract.
> django_openid_auth.useropenid: 'user' defines a relation with the model
> 'auth.User', which has been swapped out. Update the relation to point at
> settings.AUTH_USER_MODEL.
>
> django_openid_auth is a third party OpenID library, but the first two are
> pure Django and they're still breaking. Wat do?
>
>  --
> 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/-/fLbSAxq1RysJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Billing and invoicing app?

2012-10-24 Thread Stephen Anto
Hi,

Why can't you try it yourself, It is very easy only

On Wed, Oct 24, 2012 at 7:38 AM, Jesramz wrote:

> Quick question, is there a good billing and invoicing app, that anyone can
> point me to?
>
> Thanks all!
>
> --
> 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/-/cg8sQsl98K0J.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Send data back to a table from template or send back to a view

2012-10-24 Thread Stephen Anto
Hi,

Are you meant form submission? if Yes...

Submit your form and get all submitted values in view method using
request.POST/GET.copy()

Thank you for visiting http://www.f2finterview.com/web/Django/

On Wed, Oct 24, 2012 at 11:35 AM, Coulson Thabo Kgathi
wrote:

> Please help i have send a dictionary to a template now i want to send the
> processed data back to the database how do i do that in template language
> or javascript
>
> --
> 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/-/aSAzhnVceMQJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 tutorial added to Django by Example

2012-10-17 Thread Stephen Anto
Could you give in detail, what issue you have faced?

On Tue, Oct 16, 2012 at 9:55 PM, go scholarship <
the.scholarship...@gmail.com> wrote:

> hi, im using django 1.4 and when i follow you tutorial
> http://lightbird.net/dbe/todo_list.html associating users with tasks did
> not work well
>
> user = models.ForeignKey(User, blank=True, null=True)
> for item in Item.objects.filter(created=obj):
> if not item.user:
> item.user = request.user
> item.save()
> return HttpResponseRedirect(reverse("admin:todo_item_changelist"))
>
> please help?
>
>  --
> 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/-/Ncj8JtWrkpIJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Is there any small and easy website example available for Django?

2012-10-09 Thread Stephen Anto
hi,

www.f2finterview.com has been fully developed by Django.

On Tue, Oct 9, 2012 at 7:19 PM, Jon Crowell wrote:

> I am also using djangobook.com.  If it is outdated and not
> recommended, then what resource should we use instead? Also, I find it
> fairly relevant and easy to follow, so I'm curious what specific
> objections there are to it. Incidentally, I'm using the version on
> github that is being updated:
> https://github.com/jacobian/djangobook.com
>
> Jon
>
>
> On Tue, Oct 9, 2012 at 9:28 AM, lacrymol...@gmail.com
>  wrote:
> >
> > First of all, djangobook.com is outdated, and not recommended, at least
> last time i checked it.
> >
> > Secondly, for what seems to be your need, i'd recommend django-cms or
> some other cms application for django since without some kind of cms app,
> building a static content site would rapidly become, imo, very repetitive
> and highly hardcoded
> >
> > -Mensaje original-
> > De: Sarbjit singh
> > Enviados:  09/10/2012 02:46:26
> > Asunto:  Is there any small and easy website example available for
> Django?
> >
> > I am very new to Django and I just finished first seven chapters from
> > Djangobook.com. I am wondering how can we implement a small static
> content
> > website using Django. I mean website should have Home Page and few other
> > pages along with some menu options. I searched a lot on google for
> example
> > of this small website, but was not successful. I could only found
> examples
> > for implementing Wiki, Blog but i am new to Django, so i am looking for
> an
> > easy example.
> >
> > Can anyone please point me to the link for such example?
> >
> >
> > --
> > 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/-/z8aE98t9ZTUJ.
> > 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.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Django users" group.
> > 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.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Problem with URL configuration - cannot use absolute URLs in my case

2012-10-09 Thread Stephen Anto
hi,

try to user url name instead of using hard coded url link. it may solve
your problem.

On Mon, Oct 8, 2012 at 8:21 PM, Ramiro Morales  wrote:

> On Sat, Oct 6, 2012 at 10:25 PM, Rohit Banga 
> wrote:
> >
> > So how do I code my url conf / view / template in order to be
> independent of
> > mywebsite name.
> > Is there anything wrong with the way I am wiring up my application.
>
> Take a look at the docs for:
>
> URL reversing:
> https://docs.djangoproject.com/en/dev/topics/http/urls/#reverse-resolution-of-urls
>
> Naming URLs:
> https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns
>
> These links point to the in-development version of the docs. This is
> because
> there has been a refactor lately to make presentation of these concepts
> more
> clear and because there hasn't been significant changes in this
> functionality
> since Django 1.4.
>
> HTH
>
> --
> Ramiro Morales
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Using email instead of username for registration and login

2012-09-24 Thread Stephen Anto
Hi,

For login with email or username in Django visit
http://www.f2finterview.com/web/Django/18/ it will give you direction

On Tue, Sep 25, 2012 at 7:27 AM, Bill Beal  wrote:

> Hi all,
>
> I want to use the email address as the username for registration and
> login.  I'm using django-registration for 2-stage registration.  I'm
> looking for an easier way than what I've come up with so far.  I can modify
> registration and activation, but then django.contrib.auth.views.login has a
> 30-character limit on the username.  I'm not looking forward to making
> username act like an email address.  Any quick fixes?
>
> --
> 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/-/E4GTF1wAPZ8J.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: reduce number of DB-Queries

2012-09-21 Thread Stephen Anto
Hi,

Try to use Django aggregation,

example given on http://f2finterview.com/web/Django/14/ for Aggregation

On Fri, Sep 21, 2012 at 2:29 PM, kloetpatra  wrote:

> Hi!
> I have the following models:
>
> class Player(models.Model):
> name = models.CharField('Name', max_length=40)
>
> def __unicode__(self):
> return self.name
>
> def goals(self):
> g = 0
> ms = Match.objects.select_related().filter(
> Q(opp1=self)|Q(opp2=self) )
> for m in ms:
> if (m.opp1==self):
> g += m.opp1_goals
> else:
> g += m.opp2_goals
> return g
>
> def matches_won(self):
> ms = Match.objects.filter( (Q(opp1=self) &
> Q(opp1_goals__gt=F('opp2_goals'))) |
> (Q(opp2=self) & Q(opp2_goals__gt=F('opp1_goals'))) ).count()
> return ms
>
> def matches_draw(self):
> ms = Match.objects.filter( (Q(opp1=self) &
> Q(opp1_goals__exact=F('opp2_goals'))) |
> (Q(opp2=self) & Q(opp2_goals__exact=F('opp1_goals'))) ).count()
> return ms
>
> def match_points(self):
> p = 0
> p += 3 * self.matches_won()
> p += 1 * self.matches_draw()
> return p
>
> def matches_played(self):
> return Match.objects.filter(Q(opp1=self) | Q(opp2=self)).count()
>
>
> class Match(models.Model):
> class Meta:
> verbose_name_plural = "Matches"
> opp1 = models.ForeignKey(Player, related_name="player1")
> opp2 = models.ForeignKey(Player, related_name="player2")
> opp1_goals = models.IntegerField("Goals P1")
> opp2_goals = models.IntegerField("Goals P2")
>
> def __unicode__(self):
> return "%s %d:%d %s"%(self.opp1.name, self.opp1_goals,
> self.opp2_goals, self.opp2.name)
>
> My problem is when want to display overall player statistics I get about
> 1200 DB-Queries.
> This is because for each player there will be 5 Queries due to
> matches_won, matches_draw, goals, matches_played functions.
> How is it possible to retrieve those "calculated properties" without
> having so much queries?
>
> --
> 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/-/-ki6lNP0IDAJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: url pattern matching

2012-09-21 Thread Stephen Anto
Hi

url('^paperforms/$',
'view.methods', name='paperforms'),
url('^paperforms/(\w+)/$',
'view.methods', name='paperforms_with_arguments'),

It will work if you make your urls like this

On Fri, Sep 21, 2012 at 7:57 PM, Brian Patterson wrote:

> Hi Everyone,
> I'm very new to Django and just trying to explore the basics.  I'm having
> a problem with the url pattern matching.  If i go to site:
> http://mysite:8000/paperforms/
>
> I get the following error:
>
> Using the URLconf defined in mysite.urls, Django tried these URL
> patterns, in this order:
>
>1. ^admin/
>2. ^paperforms/ ^paperforms/$
>3. ^paperforms/ ^paperforms/(?P\d+)/$
>4. ^paperforms/ ^paperforms/(?P\d+)/results/$
>5. ^paperforms/ ^paperforms/(?P\d+)/vote/$
>6. ^paperforms/ ^admin/
>
> The current URL, paperforms/, didn't match any of these.
>
> Shouldn't it find a match on line # 2.
>
> thanks for your help.
>
> --
> 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/-/J4trVX-oH0AJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 often does Django need updates/patches?

2012-09-21 Thread Stephen Anto
Hi,

Try to use Django stable version which is available on Django projects
site. It is good practice.

On Fri, Sep 21, 2012 at 8:26 AM, Taylor Smith  wrote:

> Our new website is being built on Django and we are trying to figure out
> the easiest way to host and maintain the site.
> It seems there are a few managed hosting options like webfaction and
> heroku, but they will only handle the linux and database patches and
> updates.
>
> I am hoping to find out how often Django need to be updated. -- like every
> month? or more like one or twice a year?
> can a non-developer handle these updates or would we be better off hiring
> someone?
>
> any advice is much appreciated!
>
> --
> 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/-/bFVA65mLIFgJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Stephen Anto
I think it may be a import error. pls check 'goflow' which is available on
your project.

On Thu, Sep 20, 2012 at 5:02 PM, Enator24  wrote:

> After editing settings.py I am getting error
>
>
> C:\wf\mysite>python manage.py runserver
> Error: *No module named goflow.instances*
>
> Thanks.
>
>
>
> On Thursday, 20 September 2012 09:43:48 UTC+5:30, Stephen Anto wrote:
>>
>> Yes there are lot of necessary settings in settings.py based on the
>> requirement. If you need any other clarification, there are lot of docs
>> available on net, else send me your requirement in detail.
>>
>> Thank you for visiting <http://www.f2finterview.com>
>>
>> On Wed, Sep 19, 2012 at 11:52 PM, Enator24  wrote:
>>
>>> Thanks for your reply, I am able to setup the sample project, just need
>>> to know if  I need to do any thing other than specified on "
>>> https://code.djangoproject.**co**m/wiki/GoFlow_Doc<https://code.djangoproject.com/wiki/GoFlow_Doc>"
>>>
>>>
>>>
>>>
>>> On Wednesday, 19 September 2012 23:10:35 UTC+5:30, Stephen Anto wrote:
>>>
>>>> Hi,
>>>>
>>>> There are 7 steps only to start your django project..
>>>>
>>>> just visit 
>>>> http://www.f2finterview.com/web/Django/17/<http://www.f2finterview.com/web/Django/17/>
>>>>  it
>>>> may give you solution. Than you for visiting<http://www.f2finterview.com>
>>>>
>>>> On Wed, Sep 19, 2012 at 9:53 PM, Enator24  wrote:
>>>>
>>>>>  Need Help in setting up goflow, could you please elaborate initial
>>>>> Gflow setup please 
>>>>> "https://code.djangoproject.**co**m/wiki/GoFlow_Doc<https://code.djangoproject.com/wiki/GoFlow_Doc>"
>>>>> I have been referring this setup guide but still having lot of problem.
>>>>> Please let me know the exact prerequisite after I have install Django.
>>>>>
>>>>>  --
>>>>> 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/*
>>>>> *ms**g/django-users/-/-**jS7KCzcLEMJ<https://groups.google.com/d/msg/django-users/-/-jS7KCzcLEMJ>
>>>>> .
>>>>> To post to this group, send email to django...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to django-users...@**
>>>>> googlegroups.**com.
>>>>>
>>>>> For more options, visit this group at http://groups.google.com/**group
>>>>> **/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>>>> .
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards
>>>> Stephen S
>>>>
>>>>
>>>>
>>>> Website: www.f2finterview.com
>>>> Blog:  blog.f2finterview.com
>>>> Tutorial:  tutorial.f2finterview.com
>>>> Group:www.charvigroups.com
>>>>
>>>>   --
>>> 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/-/**iUE7NeZhgcQJ<https://groups.google.com/d/msg/django-users/-/iUE7NeZhgcQJ>
>>> .
>>>
>>> To post to this group, send email to django...@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users...@**
>>> googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> Stephen S
>>
>>
>>
>> Website: www.f2finterview.com
>> Blog:  blog.f2finterview.com
>> Tutorial:  tutorial.f2finterview.com
>> Group:www.charvigroups.com
>>
>>  --
> 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/-/pwjJbk0VC8YJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Issues with validation

2012-09-20 Thread Stephen Anto
Hi me too get the same problem... anyone help us..

On Tue, Sep 18, 2012 at 3:42 PM, neeraj dhiman  wrote:

> I am using two models in my app and different form for each model, when I
> tried to validate these two forms , one model is validated but other is not.
>
> model.py
>
> from django.db import models
> from django.contrib.auth.models import User
>
> class Customer(models.Model):
> user=models.OneToOneField(User)
> birthday=models.DateField()
> website=models.CharField(max_length=50)
> store=models.CharField(max_length=50)
> welcomemail=models.CharField(max_length=50)
>
>
>
>
>
>
> def __unicode__(self):
>  return self.user
>
> class Customer_check_attributes(models.Model):
> user=models.ManyToManyField(User)
> billing_add=models.CharField(max_length=50)
> shipping_add=models.CharField(max_length=50)
> payment_method=models.CharField(max_length=50)
> shipping_method=models.CharField(max_length=50)
> reward_points=models.CharField(max_length=50)
>
>
> form for first model **Customer**
>
> class Registration_Form(ModelForm):
>first_name  = forms.CharField(label=(u'First Name'))
>last_name   = forms.CharField(label=(u'Last Name'))
>username   = forms.CharField(label=(u'User Name'))
>email  = forms.EmailField(label=(u'Email Address'))
>password   = forms.CharField(label=(u'Password'),
> widget=forms.PasswordInput(render_value=False))
>
> :
>class Meta:
>   model=Customer
>
>   exclude=('user',)
>
> form for 2nd model **Customer_check_attributes**
>
> In template I am using this
> **for 1st model Customer** and it is validating the field first name
>
> 
> {% if form.first_name.errors %}{{
> form.first_name.errors }}{% endif %}
>  class="error"{% endif %}>Firstname:
> {{ form.first_name }}
> 
>
> **for 2nd model Customer_check_attributes** and it is not validating the
> field billing add
>
> 
> {% if check.billing_add.errors %}{{
> check.billing_add.errors }}{% endif %}
>  class="error"{% endif %}>Billing Address:
> {{ check.billing_add }}
> 
>
> here I am using **check** instead of form because I am storing the form in
> this and return it in context
>
>
> view.py
>
>
> from django.contrib.auth.models import User
> from customer_reg.models import Customer,Customer_check_attributes
> from django.http import HttpResponseRedirect
> from django.shortcuts import render_to_response
> from django.template import RequestContext
> from customer_reg.forms import Registration_Form,
> Check_Attribute_Form, LoginForm
> from django.contrib.auth import authenticate, login, logout
> from django.contrib.auth.decorators import login_required
>
>
> def CustomerRegistration(request):
> if request.user.is_authenticated():
> return HttpResponseRedirect('/profile/')
> if request.method == 'POST':
> form = Registration_Form(request.POST)
> if form.is_valid():
>
> user=User.objects.create_user(username=form.cleaned_data['username'],
> email=form.cleaned_data['email'], password = form.cleaned_data['password'])
> user.first_name = form.cleaned_data['first_name']
> user.last_name = form.cleaned_data['last_name']
> user.save()
>
> #customer=user.get_profile()
> #customer.birthday=form.cleaned_data['birthday']
> #customer.website=form.cleaned_data['website']
> #customer.store=form.cleaned_data['store']
> #customer.welcomemail=form.cleaned_data['welcomemail']
> #customer.save()
>
> customer=Customer(user=user,
> website=form.cleaned_data['website'],
> birthday=form.cleaned_data['birthday'], store=form.cleaned_data['store'],
> welcomemail=form.cleaned_data['welcomemail'])
> customer.save()
>
>   return HttpResponseRedirect('/profile/')
> else:
> check_form=Check_Attribute_Form()
> context={'form':form, 'check':check_form}
> return
> render_to_response('customer_register.html',context ,
> context_instance=RequestContext(request))
> else:
> ''' user is not submitting the form, show them a blank
> registration form '''
>
> form = Registration_Form()
> check_form = Check_Attribute_Form()
>  context={'form':form,'check':check_form}
>  return
> render_to_response('customer_register.html',context ,
> context_instance=RequestContext(request))
>
>
> #PROFILE#

Re: Browser get closed when clicked on others links

2012-09-20 Thread Stephen Anto
pls check browser settings.

On Tue, Sep 18, 2012 at 5:20 PM, Pervez Mulla  wrote:

> Hi,
>
> I have developed simple website with Django framework.
>
> When i want to switch to other page, the browser getting closed..:(
>
> What the problem for this ?
>
> Thank You
> Pervez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: SyntaxError Creating New Project

2012-09-20 Thread Stephen Anto
Hi Daniel,

I am not spamming. just inform you that how to create django projects with
initial steps.

I just replied for your 'SyntaxError Creating New Project' title.

I have prepared to make this answer for your questions. Is it related your
query or not?

On Thu, Sep 20, 2012 at 3:35 PM, Daniel Roseman wrote:

> On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote:
>>
>> Hi,
>>
>> Just follow these 7 steps to start new project
>> http://f2finterview.com/web/**Django/17/<http://f2finterview.com/web/Django/17/>For
>>  more
>> http://f2finterview.com/web/**Django <http://f2finterview.com/web/Django>
>>
>>
>>
> Stephen, please stop spamming this list by posting the same link to your
> site over and over again.
> --
> Daniel.
>
> --
> 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/-/DmRKpNppH9MJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 confirm email. Change value from false to true

2012-09-20 Thread Stephen Anto
Hi,

Just fllow bellow steps:

In urls.py add bellow url

urlpatterns = patterns('',
url('^meeting/$',
'meeting', name='meeting'),
url('^meeting/confirm/(\w+)/$','meeting_confirm',
name='meeting_confirm'),
)

In views.py add bellow methods

def meeting(request):
form = MeetingForm()
pDict = request.POST.copy()
if request.method == 'POST':
form = MeetingForm(pDict)
if form.is_valid():
try:
meeting_obj = Meeting()
meeting_obj.name = pDict['name']
meeting_obj.time = pDict['time']
meeting_obj.confirmed = 0
meeting_obj.save()

path = reverse('meeting_confirm'',args=[meeting_obj.id])
activation_url = u"%s%s" % (unicode(settings.CURRENT_SITE),
path)

context = {
"email":pDict['user_email']
"first_name":pDict['user_name'],
"activation_url": activation_url,
}

 emails/user/meeting_subject.txt #
 emails/user/meeting_msg.txt ###
# Above are templates files for email. You should design as
you want

subject =
render_to_string('emails/user/meeting_subject.txt', context)
subject = "".join(subject.splitlines())
message = render_to_string('emails/user/meeting_msg.txt',
context)
msg = EmailMultiAlternatives(subject,message, '
ad...@example.com',pDict['user_email'])
msg.attach_alternative(message, "text/html")
msg.send()

except:
pass

return render_to_response('meeting.html',
locals(),context_instance=RequestContext(request))

def meeting_confirm(request,id):
meeting_obj = Meeting.objects.get(id=id)
meeting_obj.confirmed = 1
meeting_obj.save()

msg = 'Meeting has been confirmed!'

return render_to_response('meeting_confirm.html',
locals(),context_instance=RequestContext(request))

I believe it may help you. For more http://f2finterview.com/web/Django/ Than
you for visiting 
On Wed, Sep 19, 2012 at 1:23 AM, enemybass  wrote:

> This is my model:
>
> from django.db import models
>
> class Meeting(models.Model):
> name = models.CharField(max_length=255)
> time = models.DateTimeField()
> confirmed = models.BooleanField(default=False)
>
> This is my form:
>
> from django import forms
>
> class MeetingForm(forms.Form):
> name = forms.CharField(max_length=100)
> time = forms.DateTimeField()
> user_name = forms.CharField(max_length=100)
> user_email = forms.EmailField()
>
> How to create a view that send a mail to user with link and when user
> clicks on this link confrimed field will change value to true?
>
> Link is my biggest problem.
>
>
>
>  --
> 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/-/01tWYQEuJ9IJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: SyntaxError Creating New Project

2012-09-19 Thread Stephen Anto
Hi,

Just follow these 7 steps to start new project
http://f2finterview.com/web/Django/17/ For more
http://f2finterview.com/web/Django

On Wed, Sep 19, 2012 at 1:49 AM, Bestrafung  wrote:

> I restarted from the beginning using the previously mentioned guide but
> also a very helpful post on the cpanel.net forums and there were some
> missed steps and minor misconfigurations. Everthing seems to be working on
> the webserver side but now have some strange permissions issues that'll go
> into another post. I hope this helps anyone else interested in setting up
> Django on a CentOS 5.x cPanel system.
>
> --
> 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/-/GukGIRK-mpwJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-19 Thread Stephen Anto
Yes there are lot of necessary settings in settings.py based on the
requirement. If you need any other clarification, there are lot of docs
available on net, else send me your requirement in detail.

Thank you for visiting <http://www.f2finterview.com>

On Wed, Sep 19, 2012 at 11:52 PM, Enator24  wrote:

> Thanks for your reply, I am able to setup the sample project, just need to
> know if  I need to do any thing other than specified on "
> https://code.djangoproject.**com/wiki/GoFlow_Doc<https://code.djangoproject.com/wiki/GoFlow_Doc>"
>
>
>
>
> On Wednesday, 19 September 2012 23:10:35 UTC+5:30, Stephen Anto wrote:
>
>> Hi,
>>
>> There are 7 steps only to start your django project..
>>
>> just visit 
>> http://www.f2finterview.**com/web/Django/17/<http://www.f2finterview.com/web/Django/17/>
>>  it
>> may give you solution. Than you for visiting<http://www.f2finterview.com>
>>
>> On Wed, Sep 19, 2012 at 9:53 PM, Enator24  wrote:
>>
>>> Need Help in setting up goflow, could you please elaborate initial Gflow
>>> setup please 
>>> "https://code.djangoproject.**com/wiki/GoFlow_Doc<https://code.djangoproject.com/wiki/GoFlow_Doc>"
>>> I have been referring this setup guide but still having lot of problem.
>>> Please let me know the exact prerequisite after I have install Django.
>>>
>>>  --
>>> 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/-/-**jS7KCzcLEMJ<https://groups.google.com/d/msg/django-users/-/-jS7KCzcLEMJ>
>>> .
>>> To post to this group, send email to django...@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> Stephen S
>>
>>
>>
>> Website: www.f2finterview.com
>> Blog:  blog.f2finterview.com
>> Tutorial:  tutorial.f2finterview.com
>> Group:www.charvigroups.com
>>
>>   --
> 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/-/iUE7NeZhgcQJ.
>
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Hello World with Django

2012-09-19 Thread Stephen Anto
Hi,

There are 7 steps only to start your django project..

just visit http://www.f2finterview.com/web/Django/17/ it may give you
solution.Than you for visiting 

On Wed, Sep 19, 2012 at 7:52 PM, Vernon Cole  wrote:

> 127.0.0.1 is -- by definition -- your local computer.  You need to
> substitute the actual address of your remote server.
>
> On Sunday, September 16, 2012 3:24:02 PM UTC-6, python@hotmail.comwrote:
>>
>>
>> Hi,
>>
>> Can someone help me in this question?
>>
>> http://stackoverflow.com/**questions/12399318/why-do-i-**
>> need-django-for-a-simple-**hello-world
>>
>> As you can see, the Flask solution is only "half answer" and the Django
>> solution in my web hosting service
>> doesn't work and, as you can imagine, I don't have access to
>> http://127.0.0.1/ because
>> this is the "localhost" of my computer and I am accessing a remote
>> server.
>>
>> Thank you in advance
>>
>>
>>
>>
>>
>>
>>  --
> 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/-/MyuzzCnSD3IJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Problems with simple "hello world" test - "ImportError: Could not import settings"

2012-09-19 Thread Stephen Anto
Hi,

There are only 7 steps ahead to say 'Hello World' via Django project.

Visit http://www.f2finterview.com/web/Django/17/ its tells how to make
simple django project with seven steps. Thank you for
visiting

On Thu, Sep 13, 2012 at 2:55 PM, DJ-Tom  wrote:

>
> Ok... GREAT! Now it works :-) (well... sort of, more below... ) but I had
>>> to restart Apache to make config changes effective... is that "normal"?
>>>
>>> I think important things like "you have to restart the webserver to make
>>> changes life" should go into the tutorial in *BIG RED LETTERS* 
>>>
>>
>>
>> The tutorial, by design, doesn't mention Apache at all. That's because
>> it's heavily recommended that you use the built-in devserver for
>> development, for precisely this reason. That's what it's for.
>>
>>
> Basically I always try to have the same environment for development as I
> also use for actual production - I'm lucky that my projects are small
> enough so i can do that :-) to avoid last minute surprises when trying to
> deploy the application to the public.
>
> --
> 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/-/qPvYvgWTXS8J.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-19 Thread Stephen Anto
Hi,

There are 7 steps only to start your django project..

just visit http://www.f2finterview.com/web/Django/17/ it may give you
solution. Than you for visiting 

On Wed, Sep 19, 2012 at 9:53 PM, Enator24  wrote:

> Need Help in setting up goflow, could you please elaborate initial Gflow
> setup please "https://code.djangoproject.com/wiki/GoFlow_Doc"; I have been
> referring this setup guide but still having lot of problem. Please let me
> know the exact prerequisite after I have install Django.
>
> --
> 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/-/-jS7KCzcLEMJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: date display problem?

2012-09-18 Thread Stephen Anto
Hi,

How to fetch data, are you fetching single row or multiple rows?

offers = Offer.objects.all()

for offer in offers:
 print offer.effective_date

If you use like above it will work. pls check your code. Thank you for
visiting  For
Django

On Wed, Sep 19, 2012 at 9:21 AM, Navnath Gadakh wrote:

> model
>class Offer(models.Model):
> product_id = models.ForeignKey(Product)
> merchant_id = models.ForeignKey(Merchant)
> offer_id = models.AutoField(primary_key=True)
> description = models.CharField(max_length=100,null=False)#Not NULL
> effective_date = models.DateField()
> expiration_date = models.DateField()
>
>
>
>
> view.py
> HTML = HTML + ""
> HTML = HTML + "Offer Description :
> "+offer.description+""
> HTML = HTML + "Coupon Number :
> "+coupon_no.coupon_detail+""
> HTML = HTML + "Effective Date :
> "+str(offer.effective_date)+""
> HTML = HTML + "Expiration Date :
> "+str(offer.expiration_date)+""
> HTML = HTML + ""
> HTML = HTML + ""
>
> at the time of create offer i print variable for expiration and effective
> date in view it worked fine.
> but in temlate it did't other fields displays.
> effective date and expiration date not displaying on browser..
>
>
>  --
> 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/-/cTFKSlnEUEsJ.
>
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Hello World with Django

2012-09-18 Thread Stephen Anto
Hi,

It is very simple to say hello world through Django projects, Only 7 steps
ahead to say... 

Pls visit http://www.f2finterview.com/web/Django/17/ its clearly guide you
step by step to say hello world via django.

Thank you for visiting  For more Django visit:
http://www.f2finterview.com/web/Django

On Mon, Sep 17, 2012 at 2:54 AM,  wrote:

>
> Hi,
>
> Can someone help me in this question?
>
>
> http://stackoverflow.com/questions/12399318/why-do-i-need-django-for-a-simple-hello-world
>
> As you can see, the Flask solution is only "half answer" and the Django
> solution in my web hosting service
> doesn't work and, as you can imagine, I don't have access to
> http://127.0.0.1/ because
> this is the "localhost" of my computer and I am accessing a remote server.
>
> Thank you in advance
>
>
>
>
>
>
>  --
> 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/-/JpWu0xcrY1MJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Abstract classes and inhertience

2012-09-16 Thread Stephen Anto
Hi,

Have you tried to fetch all data from models like

Model.objects.all()

It it is the way to fetch all data. Thank you for
visitingFor
Django 

On Mon, Sep 17, 2012 at 6:50 AM, Lachlan Musicman  wrote:

> Hola,
>
> I have an abstract base class, Person, with three children:
> Applicants, Students and Staff.
>
> I have two questions.
>
> As per docs
> ($PATH/topics/db/managers.html#custom-managers-and-model-inheritance)
> I have three managers for the Abstract class:
>
> people = models.Manager()
> men = MaleManager()
> women = FemaleManager()
>
> with the appropriate definitions.
>
> For some reason, I can't get
>
> .men.all() or .women.all() to work. Any tips?
>
> Secondly, I want the dob and gender to be using special widgets, so in
> admin.py I have:
>
> class PersonAdminForm(ModelForm):
> class Meta:
> model = Person
> widgets = {
> 'dob': SelectDateWidget(),
> 'gender': RadioSelect(),
> }
>
> but then when I add the form to the StudentAdminForm or
> ApplicantAdminForm, it fails on the first field that's not in Person.
>
> Is there anyway to have a generic admin form?
>
> cheers
> L.
>
>
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 html indention

2012-09-12 Thread Stephen Anto
Hi,
Have you installed Aptana Plugin for eclipse. If not do it and get codding
assistance..Thanks for visiting 

On Thu, Sep 13, 2012 at 2:50 AM, Sait Maraşlıoğlu wrote:

> Im using eclipse and it has some nice features about indention, but its
> only works with html css ... , as soon as I press ctrl+shift+f, it makes
> indentions.
> But if I use django tags, it gets my code worse and sometimes causes
> errors.
> is there a way to make this indentions easier?
> I know python indentions are important, and cant be decided without our
> judgement but it maybe different for django tags.
> thx.
>
> --
> 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/-/BrhpVR66bMEJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Dealing with big changelists in admin

2012-09-12 Thread Stephen Anto
Hi,

Pls refer this link <http://f2finterview.com/web/Django/15/>
http://f2finterview.com/web/Django/15/ it may give you solution

On Wed, Sep 12, 2012 at 5:31 PM, Axel Rau  wrote:

>
> Am 12.09.2012 um 10:27 schrieb Stephen Anto:
>
> > There are lots of sources available on net for Django pagination. I am
> > using django pagination on my website http://www.f2finterview.com/ for
> show
> > questions and answers.
> >
> > each request fetches only five questions and answers (Eg.
> > http://f2finterview.com/web/Django/)
> Is this lazy fetching, i.e. are the rows fetched, when I step into that
> page, or immediately?
> I tried Subclassing Paginator and slicing:
> ---
> class OneShotPaginator(Paginator):
> def __init__(self, object_list, per_page, orphans=0,
> allow_empty_first_page=True):
> super(OneShotPaginator, self).__init__(object_list[:20], per_page,
> orphans, allow_empty_first_page)
> ---
> This did not reduce the number of displayed rows to 20.
> Only the summary count at  the botton is now 20. )-8
> Any glue?
> >
> > On Wed, Sep 12, 2012 at 1:44 PM, Axel Rau  wrote:
> >
> >> I have a table with lots of IP addresses.
> >> I defined some search_fields and that works well.
> >> How can I limit the amount of fetched and displayed rows (and pages)?
> >> A filter which slices the QuerySet to display only the first 100
> results,
> >> would do it, but I do not know, how to create a filter, which produces
> no
> >> widgets and does not filter on a specific field.
>
> Axel
> ---
> PGP-Key:29E99DD6  ☀ +49 151 2300 9283  ☀ computing @ chaos claudius
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Iphone applications via django

2012-09-12 Thread Stephen Anto
Hi,

Django piston is available to convert all django data into json via handler.

You can use this json data to both web and mobile interface.

Currently I am working on the same cheers... Thanks for
visiting

On Tue, Sep 11, 2012 at 2:29 PM, Sait Maraşlıoğlu wrote:

> How do you create iphone applications via django.
> Application logic will be django but what about user interface, do we do
> that with django too?
>
> --
> 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/-/xL4mqQobAEUJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Forms, ChoiceFields and import?

2012-09-12 Thread Stephen Anto
Hi,

in forms.py import all from models.py

forms.py:

from tafe.models import *

It may solve your problem. Thanks for visiting!
and For Django
Interview questions and answers 
On Wed, Sep 12, 2012 at 6:56 AM, Lachlan Musicman  wrote:

> Hi
>
> Is there anyway to import the choices from my models.py into my
> forms.py to prevent code duplication?
>
> At the moment I've got the following, but I'm getting invalid sytax
> errors in my forms.py:
> 
> models.py :
> SESSION_CHOICES = (
> (u'0',u'Morning 1'),
> (u'1',u'Morning 2'),
> (u'2',u'Afternoon 1'),
> (u'3',u'Afternoon 2'),
> (u'4',u'Evening'),
> (u'5',u'Weekend'),
> )
> 
>
> forms.py:
>
> from django import forms
> from tafe.models import Session, Timetable, Subject
> from tafe.models import SESSION_CHOICES
>
> class SessionRecurringForm(forms.Form):
> subject = forms.ModelChoiceField(queryset=Subject.objects.all)
> timetable =
> forms.ModelChoiceField(queryset=Timtables.objects.all.ordered_by('-date')
> session_number = forms.ChoiceField(choice=SESSION_CHOICES)
>
>
> Is what I'm trying to do possible? I feel like I've seen someone do it
> before, but it was in an unrelated code snippet, and I've no idea
> where I found it...
>
> cheers
> L.
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 and LDAP

2012-09-12 Thread Stephen Anto
Hi,

Django instalation on ubuntu, I found key instructions on
http://www.f2finterview.com/web/Django/4/

for more follow django instalation guide

On Mon, Sep 10, 2012 at 11:44 PM, Tony  wrote:

> Hi everybody,
>
> I am new to Django and Python, and right now, i am going through the
> documentation. I have an assignment at my Faculty, where i need to install
> Django, 389ds LDAP server (where i have to store my users) and i need to
> somehow connect them two, so i can auth users from LDAP when logging into
> Django. i have read some documentation, and i saw a massive lines of code,
> add this, add that, and i don't get any of that.
>
> Can someone please help me with this issue, i'll be very grateful.
>
> Thank you
>
>  --
> 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/-/7ArlkeKjY0YJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: ViewDoesNotExist !?!?! It certainly does....

2012-09-12 Thread Stephen Anto
Hi,
try this

urls.py

urlpatterns = patterns('app_root',
  url(r'^url_path/$','view_name',name='url_name'),
)

view.py

def view_name(request):
your business logics
return HttpResponse()

I think it may work

On Wed, Sep 12, 2012 at 9:51 AM, Lachlan Musicman  wrote:

> Hola
>
> As per subject - I'm getting ViewDoesNotExist errors on a view that does
> exist.
>
> I've checked the spelling, indenting and it all seems legit.
>
> If I comment out the two lines that call the view in question from
> urls.py, everything is back to normal.
> ---
> tafe/urls.py
>
> from django.conf.urls import patterns, url
> from django.views.generic import DetailView, ListView
> from tafe.models import Student, Subject, Enrolment, Course, Grade,
> Timetable
>
> urlpatterns = patterns('tafe.views',
> #url(r'^$', 'index'),
> url(r'^$', ListView.as_view(queryset=Subject.objects.all()
> ...
>url(r'^session/create/$', 'session_create'),
> )
>
> tafe/views.py
>
>
> from tafe.models import Session
> from tafe.forms import SessionRecurringForm
> from django.shortcuts import render_to_response
> from django.http import HttpResponseRedirect
> import datetime
>
> def session_create(request):
>
> form = SessionRecurringForm()
>
> return render_to_response('tafe/session_create.html',{'form':form,})
>
>
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Dealing with big changelists in admin

2012-09-12 Thread Stephen Anto
Hi,

There are lots of sources available on net for Django pagination. I am
using django pagination on my website http://www.f2finterview.com/ for show
questions and answers.

each request fetches only five questions and answers (Eg.
http://f2finterview.com/web/Django/)

On Wed, Sep 12, 2012 at 1:44 PM, Axel Rau  wrote:

> I have a table with lots of IP addresses.
> I defined some search_fields and that works well.
> How can I limit the amount of fetched and displayed rows (and pages)?
> A filter which slices the QuerySet to display only the first 100 results,
> would do it, but I do not know, how to create a filter, which produces no
>  widgets and does not filter on a specific field.
>
> Axel
> ---
> PGP-Key:29E99DD6  ☀ +49 151 2300 9283  ☀ computing @ chaos claudius
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 Interview Questions

2012-09-11 Thread Stephen Anto
Hi Guys,

I really thanks to who are all gave comments on my previous post.

Now, Keep on watching on Django interview questions and 
answers<http://f2finterview.com/web/Django/>. 
I am updating questions and answers.

let me know if any feedback.

On Thursday, September 6, 2012 4:45:53 PM UTC+5:30, Stephen Anto wrote:
>
> Hi Guys,
>
> The new modified questions and answers will be updated soon
>
> Thanks for posting your valuable feedback. 
>
> On Wednesday, September 5, 2012 11:23:48 PM UTC+5:30, Amyth wrote:
>>
>> after reading this guide it seems, the interviewer who asks such 
>> questions himself is new to django or more importantly to programming. When 
>> it comes to programming or codes , most of the interviewers would ask you 
>> logic based questions instead of framework based questions as technologies 
>> like django come and go on a daily basis. if your logic is clear, you can 
>> code in any language based on any CMS' or frameworks.
>>
>> On Wed, Sep 5, 2012 at 10:31 PM, Kurtis Mullins wrote:
>>
>>> Yeah, I think this guide is a little crazy. If I'm getting interviewed 
>>> based on questions I can't answer without looking up relevant documentation 
>>> then I'd probably look bad even though the interviewer is the one lacking 
>>> the required knowledge to get the job done. 
>>>
>>> Maybe that's why I don't interview too often :) Just my 2 cents.
>>>
>>>
>>> On Wed, Sep 5, 2012 at 12:57 PM, Aaron C. de Bruyn 
>>> wrote:
>>>
>>>> I disagree with the "how to install" section.
>>>> I use Nginx and uwsgi to host Django applications.
>>>> There are other ways to deploy it too.
>>>>
>>>> The section makes it seem like the only 'real' way would be Apache.
>>>>
>>>> Lastly, it doesn't seem to touch on how a lot of people actually
>>>> install and deploy django projects.  My workflow is pretty simple
>>>> compared to what the install section says:
>>>>
>>>> apt-get install python-pip python-virtualenv virtualenvwrapper
>>>> cd code
>>>> mkvirtualenv some-django-project
>>>> pip install django
>>>> django-admin startproject somedjangoproject
>>>> cd somedjangoproject
>>>> python manage.py startapp app1
>>>>
>>>> Using virtualenv should also take care of the problem listed in
>>>> "Remove any old versions of Django".
>>>>
>>>> I'd hate for someone to not get the job because they give a
>>>> "non-textbook" answer. ;)
>>>>
>>>> -A
>>>>
>>>>
>>>> On Tue, Sep 4, 2012 at 5:10 AM, Stephen Anto  
>>>> wrote:
>>>> > Hi Guys,
>>>> >
>>>> > I have updated Django latest interview questions and answers. It may 
>>>> cover
>>>> > all technical requirements of the interview.
>>>> >
>>>> > Vist http://www.f2finterview.com/web/Django/ for latest Django 
>>>> interview
>>>> > questions and answers
>>>> >
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> django-users...@googlegroups.com.
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/django-users?hl=en.
>>>>
>>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To post to this group, send email to django...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> -- 
>> Thanks & Regards
>> 
>>
>> Amyth [Admin - Techstricks]
>> Email - aroras@gmail.com, ad...@techstricks.com
>> Twitter - @a_myth_
>> http://techstricks.com/
>>
>

-- 
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/-/8N9JtenXR88J.
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: Static files not loading when debug is false

2012-09-09 Thread Stephen Anto
Hi Singh,

I have configured static file for my projects as follows.
In settings.py

import os
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = '/site_media/'

STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/";
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

and urls.py

urlpatterns = patterns('',
# For static file serving in development. Deactivate in production
environment
(r'^site_media/(?P.*)$',
'django.views.static.serve',{'document_root': settings.MEDIA_ROOT }),

)

I believe it may help you..

On Mon, Sep 10, 2012 at 12:53 AM, Karambir Singh Nain
wrote:

> I have a fairly simple django project having some views, templates and
> static files like  css and images. My settings file include :
>
> STATIC_ROOT = '/home/karambir/Codes/projects/cdi/cdi/static'
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (
> '/home/karambir/Codes/projects/cdi/cdi/data',
> )
> TEMPLATE_DIRS = (
> '/home/karambir/Codes/projects/cdi/cdi/templates'
> )
>
> So I serve static files with  {{ STATIC_URL }} in the templates. And it is
> working fine when DEBUG is TRUE but every static file breaks when debug is
> set to false. Then I tried with django admin, it was also broken. So I run
> a ./manage.py collectstatic command. And then admin css works fine but my
> own files still not. I saw in the url of the loaded html page and it shows
> correct url and it is not loading.
> How can I know what is the main problem. What changes takes place when
> debug is set to false?
> (I'm running django1.4)
>
> 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/-/fWCsL9PUI1EJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Stephen Anto
Hi,

Try like this if you are using ubuntu

~$ python
Python 2.7.3 (default, Apr 20 2012, 22:44:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.3.1'

or

>>> django.VERSION
(1, 3, 1, 'final', 0)
>>>

Not yet getting please check your installation of Django

On Sun, Sep 9, 2012 at 11:48 PM, djangohelp wrote:

> I install it and then in the terminal when I type python -c "import
> django; print(django.get_version())"
>
>
> it says
>
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named django
> shayan-afridis-imac:~ prankster284$
>
> Please let me know what I'm doing wrong. Thanks in advance!
>
> --
> 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/-/gw9tQTwSkyYJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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: Can't Syncdb

2012-09-09 Thread Stephen Anto
Hi have you added your app in django settings

Eg. settings.py in project root

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'your.app',
)

and your project app structure should be

app
__init__.py
models.py
a.py
b.py

Pls visit http://www.f2finterview.com/web/Django/

On Sat, Sep 8, 2012 at 9:53 AM, Kollin  wrote:

> I create a project. I create app by name "app" in the project. The app
> that :
> app
> __init__.py
> models
> __init__.py
> a.py
> b.py
> but I can't syncdb the app. I use django 1.4.
> What error?
> THX
>
> --
> 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/-/o6fxby4Smw8J.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 Interview Questions

2012-09-06 Thread Stephen Anto
Hi Guys,

The new modified questions and answers will be updated soon

Thanks for posting your valuable feedback. 

On Wednesday, September 5, 2012 11:23:48 PM UTC+5:30, Amyth wrote:
>
> after reading this guide it seems, the interviewer who asks such questions 
> himself is new to django or more importantly to programming. When it comes 
> to programming or codes , most of the interviewers would ask you logic 
> based questions instead of framework based questions as technologies like 
> django come and go on a daily basis. if your logic is clear, you can code 
> in any language based on any CMS' or frameworks.
>
> On Wed, Sep 5, 2012 at 10:31 PM, Kurtis Mullins 
> 
> > wrote:
>
>> Yeah, I think this guide is a little crazy. If I'm getting interviewed 
>> based on questions I can't answer without looking up relevant documentation 
>> then I'd probably look bad even though the interviewer is the one lacking 
>> the required knowledge to get the job done. 
>>
>> Maybe that's why I don't interview too often :) Just my 2 cents.
>>
>>
>> On Wed, Sep 5, 2012 at 12:57 PM, Aaron C. de Bruyn 
>> 
>> > wrote:
>>
>>> I disagree with the "how to install" section.
>>> I use Nginx and uwsgi to host Django applications.
>>> There are other ways to deploy it too.
>>>
>>> The section makes it seem like the only 'real' way would be Apache.
>>>
>>> Lastly, it doesn't seem to touch on how a lot of people actually
>>> install and deploy django projects.  My workflow is pretty simple
>>> compared to what the install section says:
>>>
>>> apt-get install python-pip python-virtualenv virtualenvwrapper
>>> cd code
>>> mkvirtualenv some-django-project
>>> pip install django
>>> django-admin startproject somedjangoproject
>>> cd somedjangoproject
>>> python manage.py startapp app1
>>>
>>> Using virtualenv should also take care of the problem listed in
>>> "Remove any old versions of Django".
>>>
>>> I'd hate for someone to not get the job because they give a
>>> "non-textbook" answer. ;)
>>>
>>> -A
>>>
>>>
>>> On Tue, Sep 4, 2012 at 5:10 AM, Stephen Anto 
>>> > 
>>> wrote:
>>> > Hi Guys,
>>> >
>>> > I have updated Django latest interview questions and answers. It may 
>>> cover
>>> > all technical requirements of the interview.
>>> >
>>> > Vist http://www.f2finterview.com/web/Django/ for latest Django 
>>> interview
>>> > questions and answers
>>> >
>>>
>>> --
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To post to this group, send email to django...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> django-users...@googlegroups.com .
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras@gmail.com , ad...@techstricks.com
> Twitter - @a_myth_
> http://techstricks.com/
>

-- 
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/-/cpyNduikjb0J.
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 deployment questions

2012-09-04 Thread Stephen Anto
Hi Guys,

For Django related questions and 
answers Pls 
visit http://www.f2finterview.com/web/Django/

On Sunday, September 2, 2012 10:37:03 AM UTC+5:30, Mike wrote:
>
> I just started to use Fabric to automate my deployments to my staging 
> server. (and when I'm ready, to the production server as well).  I have 
> just a few questions for more experienced folks:
>
> Do you clone your whole git repository onto your server, or upload a new 
> archive each time you release?  Seems like it would be easier to switch 
> versions of the running code, by switching tags, but it would use up a lot 
> more disk space. I'd also have to have an ssh key to the central git 
> repository on the web server.  Sounds like that could be a security issue. 
> At the moment I'm programming Fabric to upload an archive, untar it, and 
> symlink it to a fixed directory where the web server expects it to be.
>
> Do you log out all users or just reset the sessions (manage.py reset 
> sessions)?
>
> 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/-/MhMSmQ31qUsJ.
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 Interview Questions

2012-09-04 Thread Stephen Anto
Hi Guys,

I have updated Django latest interview questions and 
answers. 
It may cover all technical requirements of the interview. 

Vist http://www.f2finterview.com/web/Django/ for latest Django interview 
questions and answers

On Monday, November 2, 2009 9:06:41 PM UTC+5:30, Dimitri Gnidash wrote:
>
> Hey guys, 
>
> For all those of you interviewing or being interviewed, I created a 
> quick list of sample interview questions. 
> While not comprehensive, it is a good start to review these before the 
> interview, if anything, to gain a perspective on how other people 
> might be using Django. 
>
>
> http://blog.lightsonsoftware.com/django-interview-questions-0 
>
>
> Dimitri Gnidash 
> www.lightsonsoftware.com

-- 
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/-/jubl3-wkwaUJ.
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.