[mezzanine-users] front-end add blog post for none admin user

2015-03-31 Thread Bnh Dc
Hi everybody, I'm new to django and mezzanine.
I'm doing a project base on this website: http://itrc.hanu.vn  and my 
teacher required that the website must allow user to post new aticle from a 
front-end site. i try to use form of quick blog which include in tempalte 
but it didn't work.
can anyone tell me what should i do?

p/s: sorry for my english.

https://lh3.googleusercontent.com/-utUa6cWzObg/VRphErVrE1I/BjY/TX3EMhy7vxM/s1600/Capture.PNG

-- 
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] front-end add blog post for none admin user

2015-03-31 Thread Bnh Dc
Thank you so much!
Can I ask you some other questions?
in the code below, what form id quick-blog-form come from?
When I include form in admin\includes\quick_blog.html, it didn't appear in 
the web site as the picture in the first post. Did i miss something?


div class=module
h2{% trans Quick Post %}/h2
form method=post id=*quick-blog-form* action={% url 
admin:blog_blogpost_add %}
{% csrf_token %}
table id=quick-blog
{{ form.as_table }}
tr
tdnbsp;/td
td style=width:100%;text-align:right;
input type=submit class=save
value={% trans Save Draft %} /
/td
/tr
/table
/form
/div

On Wednesday, April 1, 2015 at 7:17:21 AM UTC+7, Mario Gudelj wrote:

 Hi Bhn,

 All you have to do is to create a form which uses the blog model like this:

 class PostForm(forms.ModelForm):
 class Meta:
 model = BlogPost

 Make sure you use either fields or exclude to only render the fields 
 you need. 

 Then you need a view which will process the form. A simple view that will 
 except the POST and save the blog post will do. 

 Just standard Django stuff really. If you tell us more about where you're 
 stuck perhaps we can help further.

 Cheers,

 M



 P: +61 2 9281 3315
 M: +61 415 193775
 E: ma...@twoblokeswithapostie.com javascript:
 W: www.twoblokeswithapostie.com




 On Tue, Mar 31, 2015 at 8:00 PM, Bnh Dc ldc...@gmail.com javascript: 
 wrote:

 Hi everybody, I'm new to django and mezzanine.
 I'm doing a project base on this website: http://itrc.hanu.vn  and my 
 teacher required that the website must allow user to post new aticle from a 
 front-end site. i try to use form of quick blog which include in tempalte 
 but it didn't work.
 can anyone tell me what should i do?

 p/s: sorry for my english.


 https://lh3.googleusercontent.com/-utUa6cWzObg/VRphErVrE1I/BjY/TX3EMhy7vxM/s1600/Capture.PNG

 -- 
 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-use...@googlegroups.com javascript:.
 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] front-end add blog post for none admin user

2015-03-31 Thread Bnh Dc
Thank Josh, I will try.

On Tuesday, March 31, 2015 at 8:55:37 PM UTC+7, Josh Cartmell wrote:

 I would make a ModelForm 
 https://docs.djangoproject.com/en/1.7/topics/forms/modelforms/#modelform 
 of the BlogPost model and then render it somewhere on the front end

 On Tue, Mar 31, 2015 at 5:00 AM, Bnh Dc ldc...@gmail.com javascript: 
 wrote:

 Hi everybody, I'm new to django and mezzanine.
 I'm doing a project base on this website: http://itrc.hanu.vn  and my 
 teacher required that the website must allow user to post new aticle from a 
 front-end site. i try to use form of quick blog which include in tempalte 
 but it didn't work.
 can anyone tell me what should i do?

 p/s: sorry for my english.


 https://lh3.googleusercontent.com/-utUa6cWzObg/VRphErVrE1I/BjY/TX3EMhy7vxM/s1600/Capture.PNG

 -- 
 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-use...@googlegroups.com javascript:.
 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.