Sunday, August 2, 2015

Re: Custom User Migration Error

Try deleting migration folder in your app and run ./manage.py migrate

On Sun, Aug 2, 2015 at 11:45 PM, <mddengo@gmail.com> 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 <module>
> 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+unsubscribe@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+unsubscribe@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.

Custom User Migration Error

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 <module>
    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+unsubscribe@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: same field in two classes

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.666@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+unsubscribe@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+unsubscribe@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.

same field in two classes

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+unsubscribe@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.

New to Django

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+unsubscribe@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.

Re: Newbie

Welcome aboard

2 серп. 2015 16:38 "Matthew Yankey" <myankeyjnr@gmail.com> пише:
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+unsubscribe@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+unsubscribe@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.

Re: Introduction to Pulpo-Forms

Demos looks great. Can you post some videos showing actual implementations....in 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 <lferrari@octobot.io> 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


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





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+unsubscribe@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+unsubscribe@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.