how to deploy django 1.8 + python 3.3 on Openshift

2015-06-24 Thread Arindam sarkar
-- 
Regards,

Arindam

Contact no. 08732822385

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


Re: Trying to do a 'return redirect' from one view to another (python 2.7.8, django1.7)

2015-06-24 Thread Stephen J. Butler
Who sends the data_required signal? It would have to handle the return
value of "send" to look for HttpResponse subclasses.

On Wed, Jun 24, 2015 at 3:42 PM, Henry Versemann 
wrote:

> Here's an abbreviated look at some code I have:
>
> @receiver(data_required)
> def StartProcessView(sender, **kwargs):
> #print 'StartProcessView ENTERED !...'
> try:
> request = kwargs.get('request')
> postcopy = request.POST.copy()
> print'\n StartProcessView - THE "postcopy" OBJECT HAS BEEN
> GOTTEN!... \n'
> #print'\n StartProcessView - PREPARING TO REDIRECT THE REQUEST TO
> THE "FinishGetRequestUrlsView"!... \n'
> #return redirect('canvas_app/finishgetrequests/')
> #return redirect('/canvas_app/finishgetrequests/')
> return redirect('finishgettingrequests')
> except:
> print ' "StartProcessView" - Unexpected Error: ',
> str(sys.exc_info()[0])
> raise
>
> def FinishGetRequestUrlsView(request):
> #print 'FinishGetRequestUrlsView ENTERED !...'
> try:
> print 'FinishGetRequestUrlsView READY!...'
> except:
> print ' "FinishGetRequestUrlsView" - Unexpected Error: ',
> str(sys.exc_info()[0])
> raise
>
> I want to get the redirect working before finishing the rest of the code
> for both views, but I have yet to get it to work at all, even once. In the
> current example above I'm using the name of the view I want to redirect
> to, to call it with and it doesn't work(I also tried doing the redirects
> using urls on previous attempts, but have those statements commented out
> here.).
>
> So I know I'm doing something wrong, but can't quite figure out where
> exactly my code is wrong.
>
> I would appreciate any help that anyone can give me.
> Thanks.
>
> Henry
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a30ecab6-a4e0-4eb7-8d2e-fe8671c4484e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Trying to do a 'return redirect' from one view to another (python 2.7.8, django1.7)

2015-06-24 Thread Henry Versemann
Here's an abbreviated look at some code I have:

@receiver(data_required)
def StartProcessView(sender, **kwargs):
#print 'StartProcessView ENTERED !...'
try:
request = kwargs.get('request')
postcopy = request.POST.copy()
print'\n StartProcessView - THE "postcopy" OBJECT HAS BEEN 
GOTTEN!... \n'
#print'\n StartProcessView - PREPARING TO REDIRECT THE REQUEST TO 
THE "FinishGetRequestUrlsView"!... \n'
#return redirect('canvas_app/finishgetrequests/')
#return redirect('/canvas_app/finishgetrequests/')
return redirect('finishgettingrequests')
except: 
print ' "StartProcessView" - Unexpected Error: ', 
str(sys.exc_info()[0])
raise
  
def FinishGetRequestUrlsView(request):
#print 'FinishGetRequestUrlsView ENTERED !...'
try:
print 'FinishGetRequestUrlsView READY!...'
except: 
print ' "FinishGetRequestUrlsView" - Unexpected Error: ', 
str(sys.exc_info()[0])
raise

I want to get the redirect working before finishing the rest of the code 
for both views, but I have yet to get it to work at all, even once. In the 
current example above I'm using the name of the view I want to redirect 
to, to call it with and it doesn't work(I also tried doing the redirects 
using urls on previous attempts, but have those statements commented out 
here.). 

So I know I'm doing something wrong, but can't quite figure out where 
exactly my code is wrong. 

I would appreciate any help that anyone can give me.
Thanks.

Henry
  

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


Re: why my button render on top of the form?

2015-06-24 Thread dk


found the answer,  
if its inside a table does the funcky thing...  if its pass   as_p  works 
fine.

{{ form.as_p }} did the trick =)   

sorry for all the posts

On Wednesday, June 24, 2015 at 3:23:32 PM UTC-5, dk wrote:

> I found that if the form is inside a table. then it acts funky =(
>
>
>   
> On Wednesday, June 24, 2015 at 2:12:23 PM UTC-5, dk wrote:
>
>> 
>> {% csrf_token %}
>> {{ form }}
>> 
>> 
>>
>> I expected since the form  its first than the input type submit,   I 
>> should get my form, and below the button right?
>>
>> but instead I get the button on the top,  and then the form. I am missing 
>> something?
>>
>>
>>
>>

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


Connect two Social Accounts suign Django Allauth

2015-06-24 Thread Deshraj Yadav


I am working on a Django Project and I am using django allauth. I am facing 
a problem described below:

So the current usecase is :
First a user signs with an email-Id: a...@xyz.com through his google 
account. Then he is assigned username: abcd . After he logs out and then 
when he logs in through Dropbox with the same email id , then a new entry 
is created in social_accounts table with username: abcd2. Why so ? Is it 
possible to connect these two accounts and have a single user entry ?

(Note: The user has not yet registered through simple login method.)

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


Re: why my button render on top of the form?

2015-06-24 Thread dk
I found that if the form is inside a table. then it acts funky =(


  
On Wednesday, June 24, 2015 at 2:12:23 PM UTC-5, dk wrote:

> 
> {% csrf_token %}
> {{ form }}
> 
> 
>
> I expected since the form  its first than the input type submit,   I 
> should get my form, and below the button right?
>
> but instead I get the button on the top,  and then the form. I am missing 
> something?
>
>
>
>

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


how to deploy django 1.8 on openshift

2015-06-24 Thread Arindam sarkar
-- 
Regards,

Arindam

Contact no. 08732822385

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


why my button render on top of the form?

2015-06-24 Thread dk

{% csrf_token %}
{{ form }}



I expected since the form  its first than the input type submit,   I should 
get my form, and below the button right?

but instead I get the button on the top,  and then the form. I am missing 
something?



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


Re: Atomic block termination question

2015-06-24 Thread Carl Meyer
Hi Mike,

On 06/24/2015 02:16 AM, Mike Dewhirst wrote:
> On 24/06/2015 4:43 PM, Mike Dewhirst wrote:
>> When saving a model I'm getting a TransactionManagementError - You can't
>> execute queries until the end of the 'atomic' block
>>
>> Ticket #21540 seems fairly explicit at least where Postgres is
>> concerned. TransactionManagementError prevents what I want to do and I'm
>> not a nuclear expert.
>>
>> How do I terminate the save() method code in that atomic block and then
>> immediately execute my queries?

I'm afraid this description of what you're trying to do is too vague to
be useful. Maybe some sample code would help?

TransactionManagementError is a symptom, not a cause. It means that a
database error occurred inside a transaction, which leaves the
transaction in an unpredictable state, so Postgres wants you to roll
back the transaction (or roll back to a savepoint prior to the error)
before issuing any more database queries.

Possible solutions include:

a) Figuring out why there was a database error, and fixing it so it
doesn't occur.

b) Wrapping the code that might cause a database error in its own
`transaction.atomic` block, so on error that bit of code is rolled back
and later queries within the same transaction can go forward.

> I have implemented a workaround but not sure if it is the best way. Any
> comment appreciated ...
> 
> In the model's clean() method I test for self.pk and if true, execute
> the queries which previously caused the problem. This seems to work but
> hasn't had any testing in production.

Again it's hard to tell without seeing code or traceback, but it sounds
like probably what you've done here is fix the condition that was
causing the error in the first place (that is, solution (a) above). It
sounds like you were probably trying to do some related-model queries
with an unsaved model, and now you've guarded those queries to only
occur if the model is saved. If so, that's not a workaround, it's the
best solution.

>> I need the save() to complete so I can get_or_create some 1:1 records
>> belonging to the model being saved.

Again, sample code would really illuminate what you're trying to do.

Carl

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


signature.asc
Description: OpenPGP digital signature


Re: Atomic block termination question

2015-06-24 Thread Gergely Polonkai
As for me I have a function registered for the post_save signal, so after
saving the 1:1 object gets created. If you don't mind that the 1:1 object
gets created outside of the atomic block, it should work for you, too.
On 24 Jun 2015 10:16, "Mike Dewhirst"  wrote:

> On 24/06/2015 4:43 PM, Mike Dewhirst wrote:
>
>> When saving a model I'm getting a TransactionManagementError - You can't
>> execute queries until the end of the 'atomic' block
>>
>> Ticket #21540 seems fairly explicit at least where Postgres is
>> concerned. TransactionManagementError prevents what I want to do and I'm
>> not a nuclear expert.
>>
>> How do I terminate the save() method code in that atomic block and then
>> immediately execute my queries?
>>
>
> I have implemented a workaround but not sure if it is the best way. Any
> comment appreciated ...
>
> In the model's clean() method I test for self.pk and if true, execute the
> queries which previously caused the problem. This seems to work but hasn't
> had any testing in production.
>
> Thanks again for any ideas
>
> Mike
>
>
>> I need the save() to complete so I can get_or_create some 1:1 records
>> belonging to the model being saved.
>>
>> Thanks
>>
>> Mike
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/558A676C.5080202%40dewhirst.com.au
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: How to master django?

2015-06-24 Thread Great Avenger Singh
On Wed, Jun 24, 2015 at 7:52 PM, Arindam sarkar 
wrote:

> I need to develop a online job portal. is there any opensource project
> like this .
>

There must be some, May be in Python.

-- 

Thanks
Arshpreet Singh

I am Sikh boy, Learning by doing and Learning by teaching is my religion.
--
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/

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


Re: How to master django?

2015-06-24 Thread Arindam sarkar
Thank Alan.
On Wed, Jun 24, 2015 at 7:55 PM, Alan Ávalos Hernández <
alan.aval...@gmail.com> wrote:

> Two Scoops of Django is a great book to become proficient in django.
> Although you mention that you need to get a project done, so, having
> completed the tutorial that should suffice to start your project and keep
> as a reference the django documentation (which is great)
>
> Sent from my iPhone
>
> On Jun 24, 2015, at 9:18 AM, Arindam sarkar  wrote:
>
> I have done with the django tutorial . I am having java back ground .what
> would be the efficient way to start django . I need fast track . Need to
> complete a project ASAP.
>
> --
> Regards,
>
> Arindam
>
> Contact no. 08732822385
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users
> 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGnF%2BrD0DOz6EJb%3DV7m_ZRtXYaZWB96kKCu6%2BcNinR3Z7%3DpB_w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout
> 
> .
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users
> 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/A90DA936-4231-4E30-AE78-2E43C831BDD6%40gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout
> 
> .
>



-- 
Regards,

Arindam

Contact no. 08732822385

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


Re: How to master django?

2015-06-24 Thread Alan Ávalos Hernández
Two Scoops of Django is a great book to become proficient in django. Although 
you mention that you need to get a project done, so, having completed the 
tutorial that should suffice to start your project and keep as a reference the 
django documentation (which is great)

Sent from my iPhone

> On Jun 24, 2015, at 9:18 AM, Arindam sarkar  wrote:
> 
> I have done with the django tutorial . I am having java back ground .what 
> would be the efficient way to start django . I need fast track . Need to 
> complete a project ASAP.
> 
> -- 
> Regards,
> 
> Arindam
> 
> Contact no. 08732822385
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAGnF%2BrD0DOz6EJb%3DV7m_ZRtXYaZWB96kKCu6%2BcNinR3Z7%3DpB_w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: How to master django?

2015-06-24 Thread Arindam sarkar
I need to develop a online job portal. is there any opensource project like
this .
On Wed, Jun 24, 2015 at 7:51 PM, Great Avenger Singh 
wrote:

> On Wed, Jun 24, 2015 at 7:48 PM, Arindam sarkar 
> wrote:
> > I have done with the django tutorial . I am having java back ground .what
> > would be the efficient way to start django . I need fast track . Need to
> > complete a project ASAP.
>
> IMO Django is developed to make project quite fast way So Django
> itself is the fast way. ;)
>
> May be If you can tell about your project, This list can be helpful. (I
> guess)
>
>
> --
>
> Thanks
> Arshpreet Singh
>
> I am Sikh boy, Learning by doing and Learning by teaching is my religion.
>
> --
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
>
> 
> http://tv.slashdot.org/
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users
> 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAstK2HtX%2BcQcNqMcBnOvmXQS-qag-pqG5PVTxEadRknpn4hdQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout
> 
> .
>



-- 
Regards,

Arindam

Contact no. 08732822385

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


Re: How to master django?

2015-06-24 Thread Great Avenger Singh
On Wed, Jun 24, 2015 at 7:48 PM, Arindam sarkar  wrote:
> I have done with the django tutorial . I am having java back ground .what
> would be the efficient way to start django . I need fast track . Need to
> complete a project ASAP.

IMO Django is developed to make project quite fast way So Django
itself is the fast way. ;)

May be If you can tell about your project, This list can be helpful. (I guess)


-- 

Thanks
Arshpreet Singh

I am Sikh boy, Learning by doing and Learning by teaching is my religion.
--
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/

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


How to master django?

2015-06-24 Thread Arindam sarkar
I have done with the django tutorial . I am having java back ground .what
would be the efficient way to start django . I need fast track . Need to
complete a project ASAP.

-- 
Regards,

Arindam

Contact no. 08732822385

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


Re: Templates couldn't be found after a new package installed

2015-06-24 Thread Ashish Khatkar
Can you post your urls.py, views.py and settings.py so that we can know 
what is the exact issue here ?

On Wednesday, June 24, 2015 at 4:35:49 PM UTC+5:30, entheo wrote:
>
> Just received the message after run mysite sever to which  a package 
> called 'django-polls' installed according to django-project tutorial .
>
> TemplateDoesNotExist at /polls/
>
> polls/index.html, polls/question_list.html
>
>
> I am a new starter for Django
> Can anyone help me out the question?
>

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


Templates couldn't be found after a new package installed

2015-06-24 Thread entheo
Just received the message after run mysite sever to which  a package called 
'django-polls' installed according to django-project tutorial .

TemplateDoesNotExist at /polls/

polls/index.html, polls/question_list.html


I am a new starter for Django
Can anyone help me out the question?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84001fbe-a86a-47fa-9f7a-0bac254ede9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Atomic block termination question

2015-06-24 Thread Mike Dewhirst

On 24/06/2015 4:43 PM, Mike Dewhirst wrote:

When saving a model I'm getting a TransactionManagementError - You can't
execute queries until the end of the 'atomic' block

Ticket #21540 seems fairly explicit at least where Postgres is
concerned. TransactionManagementError prevents what I want to do and I'm
not a nuclear expert.

How do I terminate the save() method code in that atomic block and then
immediately execute my queries?


I have implemented a workaround but not sure if it is the best way. Any 
comment appreciated ...


In the model's clean() method I test for self.pk and if true, execute 
the queries which previously caused the problem. This seems to work but 
hasn't had any testing in production.


Thanks again for any ideas

Mike



I need the save() to complete so I can get_or_create some 1:1 records
belonging to the model being saved.

Thanks

Mike




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