Re: Newbie: Saving User and UserProfle from same template

2015-08-02 Thread sarfaraz ahmed
It worked for me!! Please review my code... and let me know if I have
done everything correct...!!

On Sun, Aug 2, 2015 at 12:25 PM, sarfaraz ahmed 
wrote:

> Changed the edit_user to following. it works fine except... newly added
> field date_of_birth does not load data.
> Please take a look at link below
> http://pastebin.com/nXpiLMJp
>
> 
> Regards,
> Sarfaraz Ahmed
>
>
> On Sunday, 2 August 2015 01:28:37 UTC+5:30, sarfaraz ahmed wrote:
>>
>> Hello Team,
>>
>> I have extending the user with userprofile. I want to change first_name,
>> last_name and sex from userprofile using one template. I have defined form
>> and models. Please hellp this is code for edit_user view, model for user
>> profile and model forms code
>>
>>
>> ---
>>
>> class UserProfile(models.Model):
>>
>> user = models.OneToOneField(User)
>> activation_key = models.CharField(max_length=40,blank=True)
>> sex = models.CharField(max_length=6, choices=(
>> ('male', 'Male'),
>> ('female', 'Female'),))
>> key_expires = models.DateTimeField(default=datetime.date.today())
>>
>> def __str__(self):
>> return self.user.username
>>
>> class Meta:
>> verbose_name_plural=u'User profiles'
>>
>> ---
>> class UserProfileForm(forms.ModelForm):
>> class Meta:
>>model=User
>>fields =('first_name','last_name')
>>
>> class UserProfileForm1(forms.ModelForm):
>> class Meta:
>>model=UserProfile
>>fields=('sex',)
>>
>>
>> --
>> def edit_user(request):
>> args={}
>> if request.method=="POST":
>> form=UserProfileForm(request.POST, instance=request.user)
>>
>> if form.is_valid():
>> form.save()
>> form1=UserProfileForm1(request.POST, instance=request.user)
>> if form1.is_valid():
>> form1.save()
>> UserProfile.save()
>> return HttpResponseRedirect('/useraccount/edit_user')
>> else:
>> form=UserProfileForm()
>> form1=UserProfileForm1()
>>
>> args['form']=form
>> args['form1']=form1
>>
>> return render(request,'useraccount/edit_user.html',args)
>>
>> Now the i go to edit user view it load blank and do nothing when I click
>> on save. Please help
>>
>> Regards,
>> Sarfaraz Ahmed
>>
>> --
> 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/ded7528b-5ca4-46bb-b222-7039892c23b5%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks with regards,
Sarfaraz Ahmed

-- 
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/CAEPJdiwOFX1aZfuhEiEs4yBrKurkG2k4%2BkT7OTg3Z0b4wzEQGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introduction to Pulpo-Forms

2015-08-02 Thread sarfaraz ahmed
Demos looks great. Can you post some videos showing actual
implementationsin some project. I am planning to work on project which
need to capture geo-location ..

I think this will be awesome..

Great work...!!

Regards,
Sarfaraz Ahmed

On Sat, Aug 1, 2015 at 2:55 AM, Luciano Ferrari  wrote:

> Excellent Fabio!!!
>
> Thanks for the suggestion we will take that into account.
>
> Luciano
>
>
> El viernes, 31 de julio de 2015, 17:30:07 (UTC-3), Fabio Caritas
> Barrionuevo da Luz escribió:
>>
>> interesting, thanks for sharing.
>>
>> personally, I think that the organization of files on package is somewhat
>> confusing.
>>
>> said that, you can use a template (skeleton) as a base to create and
>> better organize the package.
>> I like these two
>>
>> for a django package:
>>
>> https://github.com/pydanny/cookiecutter-djangopackage
>>
>> or more generic to any python package:
>>
>> https://github.com/ionelmc/cookiecutter-pylibrary
>>
>> It is quite easy to generate a new project skeleton:
>>
>> pip install cookiecutter
>>
>> cookiecutter https://github.com/pydanny/cookiecutter-djangopackage
>>
>> or
>>
>> cookiecutter https://github.com/ionelmc/cookiecutter-pylibrary
>>
>>
>>
>> Em quinta-feira, 30 de julho de 2015 18:46:12 UTC-3, Luciano Ferrari
>> escreveu:
>>>
>>> Last April we finished the development of a dynamic form builder, called
>>> pulpo-forms, to use within a Django Project. Today we’re excited to
>>> announce that we’re making the source code available on GitHub
>>> .
>>>
>>> Here is a short list with the most important features of this new open
>>> source tool:
>>>
>>>- Enable users to create forms with an easy drag&drop UI
>>>- Angular directives to render the form
>>>and the dashboard
>>>- Multi pages forms.
>>>- RESTful API
>>>- Customizable fields validations such as required, length,etc.
>>>- Conditional enable for fields based on other field values (e.g. in
>>>a food preferences survey, hide the *‘How do you like your steak?’ 
>>> *question
>>>to someone that previously answered that’s a vegetarian).
>>>- Conditional enable for form pages based on other field values.
>>>- Versions and drafts.
>>>- Integration for Django models.
>>>- Signals.
>>>- Configurable actions – show a thank you screen, send an email, etc.
>>>- Built-in statistics in the dashboard
>>>- Basic field types answers can be filtered in the dashboard
>>>
>>> Since it was made to be flexible from the beginning, this can be
>>> extended to add new fields, validations and so on.
>>>
>>> We hope you enjoy it, and of coursed we are open to comments, questions
>>> and pull requests !
>>>
>> --
> 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/f5bc7597-8dd7-480c-8db3-3a092368b573%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks with regards,
Sarfaraz Ahmed

-- 
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/CAEPJdiygirAK7JPkYm2z5HB0DetXdMe604ZCD%2Bsyk3-UQUm-fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Speedy Mail Software

2015-08-02 Thread Stuart Longland
On 01/08/15 22:56, Uri Even-Chen wrote:
> I'm interested in creating a new webmail platform based on Python and
> Django (with jQuery and JavaScript), which will be free software & open
> source - Speedy Mail Software. I created a project called Speedy Mail
> Software  on
> sourceforge, and I'm looking for people who will participate in writing
> code for this project. I renamed the project to Speedy Mail Software
> because Speedy Mail will be the webmail itself, based on Speedy Mail
> Software but with a domain and a mail server(s), so people will able to
> create an account there and use the mail services of the website. I'm
> also trying to convince computer science students from the college I
> graduated (The academic college of Tel Aviv - Yaffo) to participate in
> this project.

Well, there are lots of webmail systems out there today, from classical
ones like SqurrelMail and Horde to more modern ones like RoundCube.

One possibility that might be interesting to explore, and could perhaps
make a JavaScript front-end easier to develop would be to expose the
email via a WebDAV-based interface, much as we have CalDAV and CardDAV
for calendaring and contacts, you'd have "MailDAV" which would
facilitate IMAP-like functionality over WebDAV.

I think a similar scheme is used with Outlook Web Access, although you
probably want to avoid the insanity that is MAPI, the email should be
stored in the form it was received.  I've seen what happens when mail
systems try to be "clever": Zarafa is one such system and it's a hideous
mess.

> I also have another idea - I want to create a Python Web Toolkit, which
> will be similar to Google Web Toolkit - people will write code in
> Python, and it will run on the server side, and on the client side with
> JavaScript (it will compile Python code to JavaScript, like Google Web
> Toolkit from Java to JavaScript).

That sounds an awful lot like the Pyjamas (now called PyJS) framework.
http://pyjs.org/
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-- 
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/55BDD4E3.7060801%40longlandclan.yi.org.
For more options, visit https://groups.google.com/d/optout.


Newbie

2015-08-02 Thread Matthew Yankey
Hi, matthew here.

I just started reading about django. hope to learn from this group as well.

Thanks

-- 
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/04d882f2-3b5b-4275-8f1a-4eacd375a435%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie

2015-08-02 Thread Sergiy Khohlov
Welcome aboard
2 серп. 2015 16:38 "Matthew Yankey"  пише:

> Hi, matthew here.
>
> I just started reading about django. hope to learn from this group as well.
>
> Thanks
>
> --
> 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/04d882f2-3b5b-4275-8f1a-4eacd375a435%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/CADTRxJPNXEdXqnN_KJzMdZ61BUxUq1pQ4FNr6hhibxiQ2%2BGVRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


New to Django

2015-08-02 Thread Prabath Peiris
Hi 

I am new to Django. I just complete the tutorial session and it looks 
awesome. I am a Zend Framework 2 + Apigility user. I have contribute to the 
Apigility codebase and looking to switch to Django. I always like (try) to 
contribute to the codebase as a learning process. Hope to do this for 
Django as well. I know it will take little bit more time to get up that 
speed, but I hope this community will be a help. 

Thanks
Prabath Peiris

-- 
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/2d6857e2-a1fa-4d54-8784-e41d4d9c98b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


same field in two classes

2015-08-02 Thread Giovanny Vizcaya
Good day,i'm new in django and i'm doing a project, i have a class 
"Employee" with atribute "salary", same time i have class "Payroll" with 
atribute "salary", how can i take the value of employee salary to payroll 
salary? thank you in advance for answers

-- 
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/5a479e43-4612-4b2e-92be-638b5eec9124%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: same field in two classes

2015-08-02 Thread Alex Heyden
Sorry, I think there might be a bit of a language barrier. What do you mean
by "take the value of employee salary to payroll salary?"

On Sun, Aug 2, 2015 at 12:12 PM, Giovanny Vizcaya  wrote:

> Good day,i'm new in django and i'm doing a project, i have a class
> "Employee" with atribute "salary", same time i have class "Payroll" with
> atribute "salary", how can i take the value of employee salary to payroll
> salary? thank you in advance for answers
>
> --
> 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/5a479e43-4612-4b2e-92be-638b5eec9124%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/CA%2Bv0ZYWmYsUj1v_q2h4ooK7u_UyrntYqzKGjB00FK3e6s410Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Custom User Migration Error

2015-08-02 Thread mddengo
Hi everyone,

I've recently started adding user authentication to my app using Google's 
OAuth2. I found a sample app online 
(http://blog.jez.io/2014/10/20/using-google-apps-for-cmu-authentication/), 
tweaked it slightly for my own needs, and got it working. However, once I 
tried changing the database to MySQL (the sample was just using the default 
SQLite3), I receive this ValueError: Lookup failed for model referenced by 
field admin.LogEntry.user: myApp.CustomUser.

This is the only thing that I've changed and I've scoured the internet with 
no luck. Any help would be greatly appreciated. 

Thank you!

Here is the full stacktrace for reference:

Rendering model states...Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
line 338, in execute_from_command_line
utility.execute()
  File 
"/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", 
line 390, in run_from_argv
self.execute(*args, **cmd_options)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", 
line 441, in execute
output = self.handle(*args, **options)
  File 
"/Library/Python/2.7/site-packages/django/core/management/commands/migrate.py", 
line 221, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File 
"/Library/Python/2.7/site-packages/django/db/migrations/executor.py", line 
100, in migrate
state.apps  # Render all real_apps -- performance critical
  File "/Library/Python/2.7/site-packages/django/utils/functional.py", line 
60, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", 
line 166, in apps
return StateApps(self.real_apps, self.models)
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", 
line 248, in __init__
raise ValueError(msg.format(field=operations[0][1], model=lookup_model))
ValueError: Lookup failed for model referenced by field 
admin.LogEntry.user: myApp.CustomUser

-- 
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/c9840577-7348-4b82-8de2-17f6ab05b3f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom User Migration Error

2015-08-02 Thread Amitt Bhardwj
Try deleting migration folder in your app and run ./manage.py migrate

On Sun, Aug 2, 2015 at 11:45 PM,   wrote:
> Hi everyone,
>
> I've recently started adding user authentication to my app using Google's
> OAuth2. I found a sample app online
> (http://blog.jez.io/2014/10/20/using-google-apps-for-cmu-authentication/),
> tweaked it slightly for my own needs, and got it working. However, once I
> tried changing the database to MySQL (the sample was just using the default
> SQLite3), I receive this ValueError: Lookup failed for model referenced by
> field admin.LogEntry.user: myApp.CustomUser.
>
> This is the only thing that I've changed and I've scoured the internet with
> no luck. Any help would be greatly appreciated.
>
> Thank you!
>
> Here is the full stacktrace for reference:
>
> Rendering model states...Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line
> 338, in execute_from_command_line
> utility.execute()
>   File
> "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line
> 330, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/Library/Python/2.7/site-packages/django/core/management/base.py",
> line 390, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "/Library/Python/2.7/site-packages/django/core/management/base.py",
> line 441, in execute
> output = self.handle(*args, **options)
>   File
> "/Library/Python/2.7/site-packages/django/core/management/commands/migrate.py",
> line 221, in handle
> executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
>   File "/Library/Python/2.7/site-packages/django/db/migrations/executor.py",
> line 100, in migrate
> state.apps  # Render all real_apps -- performance critical
>   File "/Library/Python/2.7/site-packages/django/utils/functional.py", line
> 60, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File "/Library/Python/2.7/site-packages/django/db/migrations/state.py",
> line 166, in apps
> return StateApps(self.real_apps, self.models)
>   File "/Library/Python/2.7/site-packages/django/db/migrations/state.py",
> line 248, in __init__
> raise ValueError(msg.format(field=operations[0][1], model=lookup_model))
> ValueError: Lookup failed for model referenced by field admin.LogEntry.user:
> myApp.CustomUser
>
> --
> 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/c9840577-7348-4b82-8de2-17f6ab05b3f3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Everyone starts as a noob. Not everyone ends like a pro...
Amitt Bhardwj
Blog: amittbhardwj.wordpress.com
Github: https://github.com/amittbhardwj
LinkedIn: https://in.linkedin.com/in/amittbhardwj

-- 
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/CAJWhTLoF9vqq40Xa-2UPD_K%3DBK%2B8ofcOpGs0_m1yVNnBfL-pZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom User Migration Error

2015-08-02 Thread mddengo
It worked, thanks!!

On Sunday, August 2, 2015 at 2:20:07 PM UTC-4, Amitt Bhardwj wrote:
>
> Try deleting migration folder in your app and run ./manage.py migrate 
>
> On Sun, Aug 2, 2015 at 11:45 PM,  > wrote: 
> > Hi everyone, 
> > 
> > I've recently started adding user authentication to my app using 
> Google's 
> > OAuth2. I found a sample app online 
> > (http://blog.jez.io/2014/10/20/using-google-apps-for-cmu-authentication/), 
>
> > tweaked it slightly for my own needs, and got it working. However, once 
> I 
> > tried changing the database to MySQL (the sample was just using the 
> default 
> > SQLite3), I receive this ValueError: Lookup failed for model referenced 
> by 
> > field admin.LogEntry.user: myApp.CustomUser. 
> > 
> > This is the only thing that I've changed and I've scoured the internet 
> with 
> > no luck. Any help would be greatly appreciated. 
> > 
> > Thank you! 
> > 
> > Here is the full stacktrace for reference: 
> > 
> > Rendering model states...Traceback (most recent call last): 
> >   File "manage.py", line 10, in  
> > execute_from_command_line(sys.argv) 
> >   File 
> > "/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
> line 
> > 338, in execute_from_command_line 
> > utility.execute() 
> >   File 
> > "/Library/Python/2.7/site-packages/django/core/management/__init__.py", 
> line 
> > 330, in execute 
> > self.fetch_command(subcommand).run_from_argv(self.argv) 
> >   File 
> "/Library/Python/2.7/site-packages/django/core/management/base.py", 
> > line 390, in run_from_argv 
> > self.execute(*args, **cmd_options) 
> >   File 
> "/Library/Python/2.7/site-packages/django/core/management/base.py", 
> > line 441, in execute 
> > output = self.handle(*args, **options) 
> >   File 
> > 
> "/Library/Python/2.7/site-packages/django/core/management/commands/migrate.py",
>  
>
> > line 221, in handle 
> > executor.migrate(targets, plan, fake=fake, 
> fake_initial=fake_initial) 
> >   File 
> "/Library/Python/2.7/site-packages/django/db/migrations/executor.py", 
> > line 100, in migrate 
> > state.apps  # Render all real_apps -- performance critical 
> >   File "/Library/Python/2.7/site-packages/django/utils/functional.py", 
> line 
> > 60, in __get__ 
> > res = instance.__dict__[self.name] = self.func(instance) 
> >   File 
> "/Library/Python/2.7/site-packages/django/db/migrations/state.py", 
> > line 166, in apps 
> > return StateApps(self.real_apps, self.models) 
> >   File 
> "/Library/Python/2.7/site-packages/django/db/migrations/state.py", 
> > line 248, in __init__ 
> > raise ValueError(msg.format(field=operations[0][1], 
> model=lookup_model)) 
> > ValueError: Lookup failed for model referenced by field 
> admin.LogEntry.user: 
> > myApp.CustomUser 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to django-users...@googlegroups.com . 
> > To post to this group, send email to django...@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/c9840577-7348-4b82-8de2-17f6ab05b3f3%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Everyone starts as a noob. Not everyone ends like a pro... 
> Amitt Bhardwj 
> Blog: amittbhardwj.wordpress.com 
> Github: https://github.com/amittbhardwj 
> LinkedIn: https://in.linkedin.com/in/amittbhardwj 
>

-- 
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/64bbe681-970d-4dd4-8663-e24594b633ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BaseListView's get_context_data is missing kwargs?

2015-08-02 Thread jordi collell
Not sure if i'm understanding what are you saying. But kwargs on get.. Are 
stored on a object property. Self.kwargs (prior the dispatch) 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/1956c0d6-42ff-49c8-bb01-54380b09fdae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BaseListView's get_context_data is missing kwargs?

2015-08-02 Thread jordi collell
Not sure if i'm understanding what are you saying. But kwargs on get.. Are 
stored on a object property. Self.kwargs (prior the dispatch) 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/5375c024-ee41-4b46-816d-e63fadb4a720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Restricting CreateView

2015-08-02 Thread jordi collell
I think you don't need extra packages for the task. You can overwrite the 
dispatch to validate permissions on get and post create view.

-- 
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/5af601d2-b5cb-422c-ad1c-7ea45a5b8a20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Models.clean() how to raise ValidationError WITH error_code and show field_based errors in the Form-Template?

2015-08-02 Thread jordi collell
An easy way is to test that the rendered form has the error message raised 
suring rhe validation.

-- 
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/eef3dbd2-f0ba-4c4c-8eef-af2aee8befe4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BaseListView's get_context_data is missing kwargs?

2015-08-02 Thread James Schneider
Is there a reason you are using BaseListView rather than ListView? The docs
mention that BaseListView is not really meant to be used directly. ListView
also includes some extra context processing beyond the base class that may
be of use.

-James
On Aug 2, 2015 3:21 PM, "jordi collell"  wrote:

> Not sure if i'm understanding what are you saying. But kwargs on get.. Are
> stored on a object property. Self.kwargs (prior the dispatch) 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/5375c024-ee41-4b46-816d-e63fadb4a720%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/CA%2Be%2BciUYpasGD-6iq9DJ7_VeHw4Y_pMxvoZFE0m87rgb-myEmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: same field in two classes

2015-08-02 Thread Robin Lery
You can use inheritance. Or content type. Or use signals to get the value
of salary from one model and save it to another model.
On 2 Aug 2015 23:38, "Alex Heyden"  wrote:

> Sorry, I think there might be a bit of a language barrier. What do you
> mean by "take the value of employee salary to payroll salary?"
>
> On Sun, Aug 2, 2015 at 12:12 PM, Giovanny Vizcaya <
> gio.vizcaya@gmail.com> wrote:
>
>> Good day,i'm new in django and i'm doing a project, i have a class
>> "Employee" with atribute "salary", same time i have class "Payroll" with
>> atribute "salary", how can i take the value of employee salary to payroll
>> salary? thank you in advance for answers
>>
>> --
>> 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/5a479e43-4612-4b2e-92be-638b5eec9124%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/CA%2Bv0ZYWmYsUj1v_q2h4ooK7u_UyrntYqzKGjB00FK3e6s410Zg%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/CA%2B4-nGqBBk-qYhVWKAeCqMv65A3-z%3DSb6LF6Be72nodi01Zmnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to Django

2015-08-02 Thread Lachlan Musicman
Hi Prabath,

The best place to get started if you would like to contribute is the "low
hanging fruit" part of the Django codebase:

https://code.djangoproject.com/query?status=!closed&easy=1

and the Django Developers email list if you want to ask for some help

https://docs.djangoproject.com/en/dev/internals/mailing-lists/#django-developers

cheers
L.

--
The most dangerous phrase in the language is, "We've always done it this
way."

- Grace Hopper

On 3 August 2015 at 00:13, Prabath Peiris 
wrote:

> Hi
>
> I am new to Django. I just complete the tutorial session and it looks
> awesome. I am a Zend Framework 2 + Apigility user. I have contribute to the
> Apigility codebase and looking to switch to Django. I always like (try) to
> contribute to the codebase as a learning process. Hope to do this for
> Django as well. I know it will take little bit more time to get up that
> speed, but I hope this community will be a help.
>
> Thanks
> Prabath Peiris
>
> --
> 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/2d6857e2-a1fa-4d54-8784-e41d4d9c98b4%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/CAGBeqiPs0GaqfUZahuzMCsUx-6q3o_9bxJM3yCvxROv3Lb4XRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to Django

2015-08-02 Thread Prabath Peiris

Hi Lachlan 


Thank you for pointing to the right direction. I know this is a long shot, 
but it will be worth the time 

Thank you 
Prabath 


On Sunday, August 2, 2015 at 7:01:51 PM UTC-4, Lachlan Musicman wrote:
>
> Hi Prabath,
>
> The best place to get started if you would like to contribute is the "low 
> hanging fruit" part of the Django codebase:
>
> https://code.djangoproject.com/query?status=!closed&easy=1
>
> and the Django Developers email list if you want to ask for some help
>
>
> https://docs.djangoproject.com/en/dev/internals/mailing-lists/#django-developers
>
> cheers
> L.
>
> --
> The most dangerous phrase in the language is, "We've always done it this 
> way."
>
> - Grace Hopper
>
> On 3 August 2015 at 00:13, Prabath Peiris  > wrote:
>
>> Hi 
>>
>> I am new to Django. I just complete the tutorial session and it looks 
>> awesome. I am a Zend Framework 2 + Apigility user. I have contribute to the 
>> Apigility codebase and looking to switch to Django. I always like (try) to 
>> contribute to the codebase as a learning process. Hope to do this for 
>> Django as well. I know it will take little bit more time to get up that 
>> speed, but I hope this community will be a help. 
>>
>> Thanks
>> Prabath Peiris
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@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/2d6857e2-a1fa-4d54-8784-e41d4d9c98b4%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/cb125a22-e820-437f-bfad-ea0174cb5fcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to Django

2015-08-02 Thread Lachlan Musicman
No Problems. Also, the Django tutorial is *excellent* intro - can't
recommend it enough.

--
The most dangerous phrase in the language is, "We've always done it this
way."

- Grace Hopper

On 3 August 2015 at 11:02, Prabath Peiris 
wrote:

>
> Hi Lachlan
>
>
> Thank you for pointing to the right direction. I know this is a long shot,
> but it will be worth the time
>
> Thank you
> Prabath
>
>
> On Sunday, August 2, 2015 at 7:01:51 PM UTC-4, Lachlan Musicman wrote:
>>
>> Hi Prabath,
>>
>> The best place to get started if you would like to contribute is the "low
>> hanging fruit" part of the Django codebase:
>>
>> https://code.djangoproject.com/query?status=!closed&easy=1
>>
>> and the Django Developers email list if you want to ask for some help
>>
>>
>> https://docs.djangoproject.com/en/dev/internals/mailing-lists/#django-developers
>>
>> cheers
>> L.
>>
>> --
>> The most dangerous phrase in the language is, "We've always done it this
>> way."
>>
>> - Grace Hopper
>>
>> On 3 August 2015 at 00:13, Prabath Peiris 
>> wrote:
>>
>>> Hi
>>>
>>> I am new to Django. I just complete the tutorial session and it looks
>>> awesome. I am a Zend Framework 2 + Apigility user. I have contribute to the
>>> Apigility codebase and looking to switch to Django. I always like (try) to
>>> contribute to the codebase as a learning process. Hope to do this for
>>> Django as well. I know it will take little bit more time to get up that
>>> speed, but I hope this community will be a help.
>>>
>>> Thanks
>>> Prabath Peiris
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@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/2d6857e2-a1fa-4d54-8784-e41d4d9c98b4%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/cb125a22-e820-437f-bfad-ea0174cb5fcf%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/CAGBeqiMKFFobAv5Njf%3Dhe2xASTMvUwE1vQFwv28Y8aMMRKxfLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introduction to Pulpo-Forms

2015-08-02 Thread jogaserbia
Nice one Luciano,

thanks for sharing!

Ivan

On Friday, July 31, 2015 at 5:25:35 PM UTC-4, Luciano Ferrari wrote:
>
> Excellent Fabio!!!
>
> Thanks for the suggestion we will take that into account.
>
> Luciano
>
> El viernes, 31 de julio de 2015, 17:30:07 (UTC-3), Fabio Caritas 
> Barrionuevo da Luz escribió:
>>
>> interesting, thanks for sharing.
>>
>> personally, I think that the organization of files on package is somewhat 
>> confusing.
>>
>> said that, you can use a template (skeleton) as a base to create and 
>> better organize the package.
>> I like these two
>>
>> for a django package:
>>
>> https://github.com/pydanny/cookiecutter-djangopackage
>>
>> or more generic to any python package:
>>
>> https://github.com/ionelmc/cookiecutter-pylibrary
>>
>> It is quite easy to generate a new project skeleton:
>>
>> pip install cookiecutter
>>
>> cookiecutter https://github.com/pydanny/cookiecutter-djangopackage
>>
>> or
>>
>> cookiecutter https://github.com/ionelmc/cookiecutter-pylibrary
>>
>>
>>
>> Em quinta-feira, 30 de julho de 2015 18:46:12 UTC-3, Luciano Ferrari 
>> escreveu:
>>>
>>> Last April we finished the development of a dynamic form builder, called 
>>> pulpo-forms, to use within a Django Project. Today we’re excited to 
>>> announce that we’re making the source code available on GitHub 
>>> .
>>>
>>> Here is a short list with the most important features of this new open 
>>> source tool:
>>>
>>>- Enable users to create forms with an easy drag&drop UI
>>>- Angular directives to render the form  
>>>and the dashboard
>>>- Multi pages forms.
>>>- RESTful API
>>>- Customizable fields validations such as required, length,etc.
>>>- Conditional enable for fields based on other field values (e.g. in 
>>>a food preferences survey, hide the *‘How do you like your steak?’ 
>>> *question 
>>>to someone that previously answered that’s a vegetarian).
>>>- Conditional enable for form pages based on other field values.
>>>- Versions and drafts.
>>>- Integration for Django models.
>>>- Signals.
>>>- Configurable actions – show a thank you screen, send an email, etc.
>>>- Built-in statistics in the dashboard
>>>- Basic field types answers can be filtered in the dashboard
>>>
>>> Since it was made to be flexible from the beginning, this can be 
>>> extended to add new fields, validations and so on.
>>>
>>> We hope you enjoy it, and of coursed we are open to comments, questions 
>>> and pull requests !
>>>
>>

-- 
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/5ee2c173-c5d8-4751-8f78-a5bf14c3fb96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.