Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-04-01 Thread Jesse Carrigan
Ken, thank you for posting the link to the Effective Django tutorial. Looks 
really useful.

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-04-01 Thread Tameen Malik


 thank's ! hmm can you answer my second question, i posted today with title 
 `what to do next`!


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Hi Tameen,

Great questions, all. I urge you to go through the entire Django tutorial
if you have not already. During my first four years with Django, I did the
tutorial once a quarter to reinforce what I was learning. That is right, I
did the tutorial sixteen times!

My answers are inline below.


On Mon, Mar 31, 2014 at 4:26 AM, Tameen Malik tame...@gmail.com wrote:

 Question 1: How to place this page in menu of home page using admin
 interface?

In the admin interface for the page, look for the fields Show in menus.


  Question 2: How to solve this error 'NoneType' object has no attribute
 'split' generates if I browse http://127.0.0.1:8000/admin/conf/setting/?

We will need a lot more context. My guess is that you have something
misconfigured. Your best bet might be to see if you can replicate the
problem with a fresh install, then copy your application into the fresh
install.

 question3 : How to access POST DATA from forms created in mezzanine
 interface?

I believe you will have to create a custom view along the lines of
https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.methodto
check for what HTTP method is being used.

hth.

ken

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik


 Hi Kenneth Bolton Thank's for quick response. Few more questions:

 In the admin interface for the page, look for the fields Show in menus. 
  -*- using admin interface if i create page i don't find this in 
 templates folder and if i create html page and store this in 
 templates/pages folder, how to show this in menu of home page?*
  
 using 
 django.http.HttpRequest.methodhttps://www.google.com/url?q=https%3A%2F%2Fdocs.djangoproject.com%2Fen%2Fdev%2Fref%2Frequest-response%2F%23django.http.HttpRequest.methodsa=Dsntz=1usg=AFQjCNF1z6ioCuRXxcKSqGqQiSmPvk2ixw
  *we return page url so that's work similar to django framework?*

 Thank's Looking forward to your reply :)

 Tameen 

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik


 Great reply. 

 

 Thank's Kenneth Bolton


  Can i ask you more question's if i face any problems further :)
  
  Regards
  Tameen 

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik


 Great reply. 

  

 Thank's Kenneth Bolton


   Can i ask you more question's if i face any problems further :)
   
   Regards
   Tameen 


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Hi Tameen,

I urge you to read the Mezzanine documentation thoroughly. As with Django,
the Mezzanine documentation is of extraordinary quality and covers the
topics you bring up much more thoroughly than I will do below. Actually,
after reading the documentation myself briefly to make sure I don't give
you bad information, I have changed my mind and will link to sections in
the docs.

On Mon, Mar 31, 2014 at 11:15 AM, Tameen Malik tame...@gmail.com wrote:

 First Scenario: I go to http://127.0.0.1:8000/admin/ page. i log-in using
my admin account. I go to `Pages`, add new
 page named `FirstPage` . This page has one submission form to get email
id , user name etc. Now i can see this
 page in my site.This goes fine. Problem is How to get data/values posted
in this form of FirstPage.

Have you tried adding a Form in the admin rather than a Page?
http://mezzanine.jupo.org/docs/content-architecture.html#page-templatesdiscusses
how to use page processors to do things with the posted form data.

 Second Scenario: I have created an html page using my editor. I save this
page to my templates folder. i want to
 bind this page to menu of home page. How to do this.

http://mezzanine.jupo.org/docs/content-architecture.html#page-templates

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Have you done the Django tutorial at
https://docs.djangoproject.com/en/1.6/intro/tutorial01/?

South is highly recommended for managing your database schema:
http://mezzanine.jupo.org/docs/model-customization.html#field-injection-caveats

I would also take a step back and go through http://effectivedjango.com/.

ken




On Mon, Mar 31, 2014 at 11:55 AM, Tameen Malik tame...@gmail.com wrote:

  Thank You!

hmmm see i have created models.py file in project have these lines:

 from django.db import modelsfrom mezzanine.pages.models import Pageclass 
 Author(Page):
 dob = models.DateField(Date of birth)
 class Book(models.Model):
 author = models.ForeignKey(Author)
 cover = models.ImageField(upload_to=authors)

 and admin.py with these:

 from django.contrib import adminfrom mezzanine.pages.admin import 
 PageAdminfrom .models import Author



 admin.site.register(Author, PageAdmin)


 Now i write these commands: python manage.py syncdb,  python manage.py
 migrate,
 and then open python shell to write  Author.objects.create(dob =
 12/12/2014)

 That generates error that author is not defined. It's true because no
 tables created in my database.!



  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik


 yes i studied first 5 chapters of djangobook.com this week. hmm i don't 
 know i just stuck here in mezzanine. Sir can't you give me small example 
 (if you can). Mezzanine documentation is not detailed or may be my mind 
 can't work unless i go through 3,4 examples! :(


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.